GHCi は、 type が typeA
ではないことを教えてくれA
ます。なんで?
>>> data A = A
>>> let x = A
>>> let id A = A
>>>
>>> data A = A
>>> let x' = A
>>> let id' A = A
>>>
>>> data A = A
>>>
>>> let y = id' x
<interactive>:18:13:
Couldn't match expected type `main::Interactive.A'
with actual type `main::Interactive.A'
In the first argument of id', namely `x'
In the expression: id' x
In an equation for `y': y = id' x