[Haskell-cafe] Problems instancing a class
Gerrit van den Geest
G.vandenGeest at students.uu.nl
Fri Feb 17 13:56:54 EST 2006
Mark
Mark Jones has (some time ago) also written a very detailed e-mail about this topic:
http://www.haskell.org/pipermail/haskell/2000-October/006128.html
Grt
> "type" introduce a type synonym, and Haskell98 forbids these in
> instances, so GHC complains. GHC also lifts this restriction when
> invoked with -fglasgow-exts .
> http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#type-synonyms
>
Flexible Instances will probably be added to HaskellPrime:
http://hackage.haskell.org/trac/haskell-prime/wiki/FlexibleInstances
This page:
http://cvs.haskell.org/Hugs/pages/users_guide/class-extensions.html#FLEXIBLE-INSTANCES
says that ultimately you would turn the type language pretty much into
Prolog (which would allow more expressive power---and less
inconvenience as we both would like--but make general type checking
undecidable). Instead they do a more conservative extension with a
fixed depth of constraints it will check so the compiler will
terminate.
Jared.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe at haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe
mailing list