Ketil Z. Malde
11 Aug 2003 09:07:47 +0200
Marcin 'Qrczak' Kowalczyk <firstname.lastname@example.org> writes:
> Dnia pon 11. sierpnia 2003 00:49, Wolfgang Jeltsch napisa=B3:
>> The main problem is that you need binary I/O. Haskell 98 only provides t=
> You don't need binary I/O for UTF-8 now; because implementations use=20
> ISO-8859-1, UTF-8 octets can be faked as characters by (chr . fromIntegra=
Would it cause a lot of compatibility trouble to wrap IO functions in
class IOData a where
readFile :: FilePath -> a
instance IOData Char where ...
instance IOData Word8 where ...
(Defaulting to Char the same way as Integer)
Would this let us start writing byte-based IO without sacrificing
compatibility or designing specific interfaces for it?
Perhaps one could even do record-based IO by declaring instantiation
IOData for custom data structures?
If I haven't seen further, it is by standing in the footprints of giants