8 Nov
2004
8 Nov
'04
3:36 p.m.
Benjamin Franksen wrote:
On Sunday 07 November 2004 23:19, Ben Rudiak-Gould wrote:
Does this do what you want?:
data Test = Test { name :: (?val::Bool) => String }
Thanks for the hint, but no:
TestBug.hs:4: Illegal constraint ?val :: Bool In the type: ({?val :: Bool} => String) -> Test While checking the type of constructor `Test' In the data type declaration for `Test'
Try using -fglasgow-exts instead of -fimplicit-params. Without glasgow-exts you can't use nested contexts in any circumstances; e.g. you can't write test :: ((?val::Bool) => String) -> () which is (similar to) the type that the data constructor Test needs to have. -- Ben