
26 May
2016
26 May
'16
7:21 p.m.
Aha, that's because `:t` operates on expressions, and when a pattern synonym is used as an expression the required and provided contexts are merged into one. Makes sense. / Emil Den 2016-05-26 kl. 20:59, skrev Emil Axelsson:
However, it seems that `:t` gives the wrong type:
*Main> :t AddP AddP :: (Num a, Eq a) => Exp a -> Exp a -> Exp a
This type is reported whether or not I include the (correct) signature for `AddP`.
`:i` is correct though:
*Main> :i AddP pattern AddP :: () => (Num a, Eq a) => Exp a -> Exp a -> Exp a
/ Emil