Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/docs/bugs/nhc98test23.hs

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


{-
For this incorrectly typed program nhc gives a wrong and irritating
error message:

====================================
	Error after type deriving/checking:
Derived type for Main.f at 4:1 does not match due to:
    different contexts
Derived:(Prelude.Eq a) => (b -> (b -> Prelude.Bool))
Given  :(a -> (a -> Prelude.Bool))

The type variables in the context of the derived type actually refer
to the type variables in the given type.
-}


f :: a -> a -> Bool

f = (==)

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].