monomorphic or not?

John Meacham john at repetae.net
Thu Mar 6 02:25:47 EST 2008


http://www.cse.unsw.edu.au/~dons/code/nobench/real/compress/compress.hs

if you notice this program has the line

> compress = map toEnum . codes_to_ascii . encode

It seems to me this should run afoul of the monomorphism restriction due
to the unknown ambiguous type in Enum, but ghc 6.8.2 happily accepts it.
Jhc thinks it is illegal according to my reading of the specification.
Any ideas about what is going on here?

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Glasgow-haskell-users mailing list