Although it's not good style to simply post to a mailing list without
thoroughly browsing the its archives for a similar problem, I'll do it
anyway... >:-)
To build NHC98 1.12 with a current (= from CVS) GHC, two patches have to
be applied:
* PrelBase has gone and there are probably *very* few people out there
(if any :-) with an ancient GHC <= 2.02, so the lines which make hmake
fail can simply be nuked.
* Besides other things, -fglasgow-exts switches on the handling of implicit
paramters and the syntax %foo for linear implicit parameters. Alas, a space
is missing then in LexLow.hs.
Cheers,
S.
diff -u -r nhc98-1.12-orig/src/greencard/Decl.lhs nhc98-1.12/src/greencard/Decl.lhs
--- nhc98-1.12-orig/src/greencard/Decl.lhs Mon Oct 11 12:50:38 1999
+++ nhc98-1.12/src/greencard/Decl.lhs Tue Apr 2 06:52:53 2002
@@ -20,10 +20,6 @@
import Pretty
-#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 202
-import PrelBase(maybe) -- workaround for GHC 2.02
-#endif
-
\end{code}
\begin{code}
diff -u -r nhc98-1.12-orig/src/greencard/FillIn.lhs nhc98-1.12/src/greencard/FillIn.lhs
--- nhc98-1.12-orig/src/greencard/FillIn.lhs Tue Oct 12 12:19:38 1999
+++ nhc98-1.12/src/greencard/FillIn.lhs Tue Apr 2 06:53:10 2002
@@ -33,11 +33,6 @@
import Monad (MonadPlus(mplus))
#endif
-#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 202
-import PrelBase(maybe) -- workaround for GHC 2.02
-#endif
-
-
\end{code}
%************************************************************************
diff -u -r nhc98-1.12-orig/src/greencard/Process.lhs nhc98-1.12/src/greencard/Process.lhs
--- nhc98-1.12-orig/src/greencard/Process.lhs Fri Jun 8 19:03:58 2001
+++ nhc98-1.12/src/greencard/Process.lhs Tue Apr 2 06:53:25 2002
@@ -24,10 +24,6 @@
import Target( Target(..) )
import NHCBackend (cNhc, hNhc)
-#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 202
-import PrelBase(maybe) -- workaround for GHC 2.02
-#endif
-
#if defined(__HASKELL98__)
# if !defined(__HBC__)
import IO(hPutStrLn)
diff -u -r nhc98-1.12-orig/src/compiler98/LexLow.hs nhc98-1.12/src/compiler98/LexLow.hs
--- nhc98-1.12-orig/src/compiler98/LexLow.hs Tue Dec 11 10:55:13 2001
+++ nhc98-1.12/src/compiler98/LexLow.hs Tue Apr 2 07:28:21 2002
@@ -240,7 +240,7 @@
lexHelp i (c'',s,m,e:xs'') | (e == 'e' || e == 'E') =
case lexExp c'' xs'' of
- (c''',e,xs''') -> (r,c''',L_RATIONAL ((((i*s+m)%s)::Rational)*10^^e),xs''')
+ (c''',e,xs''') -> (r,c''',L_RATIONAL ((((i*s+m) % s)::Rational)*10^^e),xs''')
--- (c''',e,xs''') -> (r,c''',L_RATIONAL ((((i*s+m)%s)::Rational){-*(fromInteger 10^^e)-}),xs''') --- GOFER ONLY !!!
lexHelp i (c'',s,m,xs'') =
(r,c'',L_RATIONAL ((i*s+m) % s),xs'')