Yet more text pedantry
George Russell
ger@tzi.de
Fri, 09 Aug 2002 15:24:55 +0200
"Ketil Z. Malde" wrote:
>
> George Russell <ger@tzi.de> writes:
>
> > Ketil wrote (quoting Ken)
>
> >>> On most machines, Char will be a wrapper around Word8. (This
> >>> contradicts the present language standard.)
>
> >> Can you point out any machine where this is not the case? One with a
> >> Haskell implementation, or likely to have one in the future
>
> > That's easy enough. On Sun/Solaris (which I use and which came out as
> > being very popular on the Haskell survey) characters are SIGNED, so the
> > values run from -128 to 127 and the wrapper would be not Word8 but Int8.
>
> How does the file system know the difference? I think you mean that
> C chars on Solaris are signed, not that files and sockets don't
> contain octets.
Well, you can define the files to contain only directed graphs if it makes
you feel any happier, but the fact is that the standard access functions
return characters*, and on Solaris the default representation of a characters is
as a signed quantity.
*. Though in fact it must be admitted that some, such as fgetc, actually return
an integer usually containing an _unsigned_ char, so that negative values can
be preserved for other information. Life can be very complicated sometimes.