Instances which worked in ghc6.0.1 don't work for developmentsnapshot
6.3.20031201
George Russell
ger at informatik.uni-bremen.de
Thu Dec 11 12:06:07 EST 2003
For ghc6.0.1 on Linux
# ghc Test1.hs -c -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances
# ghc Test2.hs -c -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances
works.
But for ghc6.3.20031201 the second compilation produces the message:
> Test2.hs:6:
> No instance for (FormValue (Maybe [Char]))
> arising from use of `isFormValue' at Test2.hs:6
> In the definition of `is': is = isFormValue (Just "")
Oddly enough the compilation works if you do it in one step
using
# ghc --make Test2.hs -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances
-------------- next part --------------
module Test1 where
class FormValue value where
isFormValue :: value -> ()
isFormValue _ = ()
class FormTextField value
instance FormTextField String
instance FormTextField value => FormTextFieldIO value
class FormTextFieldIO value
instance FormTextFieldIO value => FormValue value
instance FormTextFieldIO value => FormTextFieldIO (Maybe value)
-------------- next part --------------
module Test2 where
import Test1
is :: ()
is = isFormValue (Just "")
More information about the Glasgow-haskell-bugs
mailing list