[Haskell-cafe] Problems instancing a class
Jared Updike
jupdike at gmail.com
Fri Feb 17 13:50:29 EST 2006
> "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.
More information about the Haskell-Cafe
mailing list