GHC での線形型 › 部分型多相
- multiplicity に関しても部分型多相はない
f :: Int %1-> (Int, Int)
f a = (a, 1)
h :: Int -> (Int, Int)
h = f
<interactive>:4:29: error:
• Couldn't match type ‘'One’ with ‘'Many’
Expected: Int -> (Int, Int)
Actual: Int %1 -> (Int, Int)
• In the expression: f
In an equation for ‘h’: h = f