[redirected to [EMAIL PROTECTED]]
Arjan van Ijzendoorn (or is it Kees?) writes:
> I've a complete program written using Haskell (GHC 3.02) but I'm unable to
> load the program in Hugs (jan98, 1.4). I get an error that "showLitChar" is
> not defined. I could try to adjust the Hugs prelude file to include the
> definition of "showLitChar".
It sounds like you've found a bug in GHC and a bug in Hugs:
o showLitChar shouldn't be exported from the Prelude (ghc is wrong)
o showLitChar should be exported from Char (Hugs is wrong)
The following patch fixes Hugs.
(The fact that Hugs will now export showLitChar from the Prelude
is a regrettable but unavoidable bug - you should continue/start to
import it from Char.)
Index: lib/Char.hs
===================================================================
RCS file: /net/haskell/homes/systems/hcompile/CVS/hugs/lib/Char.hs,v
retrieving revision 1.4
diff -c -r1.4 Char.hs
*** Char.hs 1997/03/27 21:40:29 1.4
--- Char.hs 1998/06/09 15:11:05
***************
*** 9,15 ****
isAlpha, isDigit, isOctDigit, isHexDigit, isAlphanum,
digitToInt, intToDigit,
toUpper, toLower,
! ord, chr ) where
-- This module is empty; Char operations are currently defined in the
-- prelude, but should eventually be moved to this library file instead.
--- 9,18 ----
isAlpha, isDigit, isOctDigit, isHexDigit, isAlphanum,
digitToInt, intToDigit,
toUpper, toLower,
! ord, chr,
! readLitChar, showLitChar, lexLitChar
! ) where
!
-- This module is empty; Char operations are currently defined in the
-- prelude, but should eventually be moved to this library file instead.
Index: lib/Prelude.hs
===================================================================
RCS file: /net/haskell/homes/systems/hcompile/CVS/hugs/lib/Prelude.hs,v
retrieving revision 1.31
diff -c -r1.31 Prelude.hs
*** Prelude.hs 1998/04/30 19:41:52 1.31
--- Prelude.hs 1998/06/09 15:11:05
***************
*** 51,56 ****
--- 51,57 ----
digitToInt, intToDigit,
toUpper, toLower,
ord, chr,
+ readLitChar, showLitChar, lexLitChar,
-- module Numeric
showSigned, showInt,
readSigned, readInt,
--
Alastair Reid Yale Haskell Project Hacker
[EMAIL PROTECTED] http://WWW.CS.Yale.EDU/homes/reid-alastair/