Why did my mistake annotating a signature of this type not violate the situation?

I defined an alias for the function execState:

myCleverName = execState

GHC warned of top-level binding without an annotated type signature, so I wrote:

myCleverName :: State s a => s -> s

It’s immediately obvious to most of you that the “fat arrow” =>was supposed to be just skinny ->. But I just noticed that today, although both modules containing an alias and code using an alias have been compiled for several weeks, it’s not so much a warning that I used the wrong syntax. Why is this?

Thank!

+4
source share
1 answer

GHC 7.6.3 , , ( ) GHC 7.8. type , , 7.6.3 . , .

+8

All Articles