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
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users

Reply via email to