[Haskell] GHC Error question

Rene de Visser Rene_de_Visser at hotmail.com
Fri Dec 8 12:57:49 EST 2006


There may be a heuristic that would help more programs to go through... but 
I prefer asking the programmer to make the desired behaviour explicit.

Simon

How can the user make this explicit?

With the

class C a b where
    op :: a -> a
instance C Int Int where
    op a = -a

test d = op d

example,

I have been unable to figure out what type annotations I need to add to 
'test', for exampl,e to define test to be for the C Int Int instance.

Or is it simply impossible in GHC to give test a type signature and to use 
it as a useful function?

Example 





More information about the Glasgow-haskell-users mailing list