Benjamin Franksen wrote:

>data (?val::Bool) => Test = Test { name :: String }
>
>is rejected by the compiler:
>
>TestBug.hs:3:
>    Illegal constraint ?val :: Bool
>    In the context: (?val :: Bool)
>    While checking the context of the data type declaration for `Test'
>    In the data type declaration for `Test'
>
>which is unfortunate since it means that you cannot put a function that
>depends on an implicit parameter into a data structure.

Does this do what you want?:

   data Test = Test { name :: (?val::Bool) => String }

-- Ben

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to