Glasgow Haskell on different versions of Linux

George Russell ger at
Wed Jun 9 09:03:53 EDT 2004

Volker Stolz wrote (snipped):
> The functions are C89, so they should be present *somewhere* in libc
> anywhere.

Yes, you're right.  Normally isspace and friends are used as macros,
but ANSI C requires them to be also available as functions so they
must be exported that way.

Therefore if you don't import ctype.h, what happens is that (isspace) is
implicitly assumed to be a function of type Int -> Int, which (in this case)
happens to work.

The reason for the incompatibility is (see comments in ctype.h) something to
do with locales now being thread specific.

More information about the Glasgow-haskell-users mailing list