[Haskell] PROPOSAL: class aliases
Wolfgang Jeltsch
wolfgang at jeltsch.net
Fri Oct 14 12:07:18 EDT 2005
Am Donnerstag, 13. Oktober 2005 15:43 schrieb Simon Peyton-Jones:
> John
>
> Replying just to you to avoid spamming everyone.
Hmm, you did write to the list as well...
> [...]
> I don't agree. What do you mean by "distinct types"? In H98 both of
> these are ok:
>
> f :: CD a => ty
> f = ...code...
>
> g :: (C a, D a) => ty
> g = f
This is not okay. Hugs gives this error message (with ty = a):
Cannot justify constraints in explicitly typed binding
*** Expression : g
*** Type : (C a, D a) => a
*** Given context : (C a, D a)
*** Constraints : CD a
> [...]
Best wishes,
Wolfgang
More information about the Haskell
mailing list