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

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


{-
Nhc performs no kind check in type definitions.
So it accepts the following program although it is wrong as Hugs states:
Reading file "nhc98test19.hs":
ERROR "nhc98test19.hs" (line 6): Illegal type "WrongFix PreNat" in constructor application
-}

newtype WrongFix f = Fold [f]

data PreNat r = Zero | Succ r

type Nat = WrongFix PreNat

main = print "Test"

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.