Re: ghc 4.06 fix



About this list Date view Thread view Subject view Author view

José Romildo Malaquias (romildo@urano.iceb.ufop.br)
Fri, 10 Mar 2000 12:19:40 -0300


The patch posted by Malcom corrects hmake to work with ghc-4.06, but the source code for nhc also seems to need corrections. I have applied the following patch, which incorporates Malcom's, and change the "--syslib extsi --syslib misc" to "--syslib lang" when it appears in makefiles. Also there is no Native module but NativeInfo in ghc-4.06, so I made this change. But I am still having errors. There is a variable "showBytes" in nhc98-1.0pre16/lib/ix86-Linux/nhc98comp/GcodeLowC.hs which is undefined. Any hints? ======================== output of make [...] ghc -syslib lang -c -cpp -o /home/romildo/rpms/BUILD/nhc98-1.0pre16/targets/ix86-Linux/obj/compil er98/GcodeLowC.o GcodeLowC.hs GcodeLowC.hs:154: Variable not in scope: `showBytes' GcodeLowC.hs:157: Variable not in scope: `showBytes' Compilation had errors make[1]: *** [/home/romildo/rpms/BUILD/nhc98-1.0pre16/lib/ix86-Linux/nhc98comp] Error 1 make[1]: Leaving directory `/home/romildo/rpms/BUILD/nhc98-1.0pre16/src/compiler98' make: *** [targets/ix86-Linux/compiler-ghc] Error 2 ========================= -- Prof. José Romildo Malaquias <romildo@iceb.ufop.br> Departamento de Computação Universidade Federal de Ouro Preto Brasil

diff -ur nhc98-1.0pre16.orig/script/confhc nhc98-1.0pre16/script/confhc --- nhc98-1.0pre16.orig/script/confhc Thu Jan 13 09:57:42 2000 +++ nhc98-1.0pre16/script/confhc Fri Mar 10 11:00:18 2000 @@ -229,6 +229,7 @@ 0.29) sed -e "s|^GHC=0$|GHC=2|" ;; 2.*) sed -e "s|^GHC=0$|GHC=3|" ;; 3.*) sed -e "s|^GHC=0$|GHC=4|" ;; + 4.06) sed -e "s|^GHC=0$|GHC=6|" ;; 4.*) sed -e "s|^GHC=0$|GHC=5|" ;; *) sed -e "s|^GHC=0$|GHC=6|" ;; esac diff -ur nhc98-1.0pre16.orig/script/hmakeconfig.inst nhc98-1.0pre16/script/hmakeconfig.inst --- nhc98-1.0pre16.orig/script/hmakeconfig.inst Tue Jan 25 08:30:06 2000 +++ nhc98-1.0pre16/script/hmakeconfig.inst Fri Mar 10 11:00:18 2000 @@ -90,6 +90,7 @@ # Depending on compiler version, we have to choose cpp symbols. # GHC can take the values 2,3,4,5, corresponding to 1.2, 1.3, 1.4, and 98. +# (value 6 added to allow for hslibs reorganisation) GHC=0 if [ ${GHC} -lt 5 ] then @@ -97,10 +98,16 @@ # GHCINCPATH is a colon-separated list of directories containing .hi files GHCINCPATH=":"${GHCINCPATH-${GHCINCDIR}} GHCCPP="-Z__HASKELL1__=${GHC}" -else +elif [ ${GHC} -lt 6 ] +then # ghc, for Haskell'98 # GHCINCPATH is a colon-separated list of directories containing .hi files GHCINCPATH=":"${GHCINCPATH-"${GHCINCDIR}/std:${GHCINCDIR}/exts:${GHCINCDIR}/misc:${GHCINCDIR}/posix"} + GHCCPP="-Z__HASKELL1__=5 ${HASKELL98}" +else + # ghc, for Haskell'98, with new hslibs + # GHCINCPATH is a colon-separated list of directories containing .hi files + GHCINCPATH=":"${GHCINCPATH-"${GHCINCDIR}/std:${GHCINCDIR}/data:${GHCINCDIR}/lang:${GHCINCDIR}/posix:${GHCINCDIR}/net:${GHCINCDIR}/num:${GHCINCDIR}/text:${GHCINCDIR}/util:${GHCINCDIR}/win32"} GHCCPP="-Z__HASKELL1__=5 ${HASKELL98}" fi GHCPRELOPTS=`echo $GHCINCPATH | sed -e "s/:/ -P/g"` diff -ur nhc98-1.0pre16.orig/src/compiler98/GcodeLowC.hs nhc98-1.0pre16/src/compiler98/GcodeLowC.hs --- nhc98-1.0pre16.orig/src/compiler98/GcodeLowC.hs Thu Dec 16 09:12:23 1999 +++ nhc98-1.0pre16/src/compiler98/GcodeLowC.hs Fri Mar 10 11:02:48 2000 @@ -16,8 +16,10 @@ import EmitState import Prim(strPrim) import Machine -#if defined(__HBC__) || defined(__GLASGOW_HASKELL__) +#if defined(__HBC__) import Native +#elif defined(__GLASGOW_HASKELL__) +import NativeInfo #elif defined(__NHC__) import NhcFloats #endif diff -ur nhc98-1.0pre16.orig/src/compiler98/Makefile nhc98-1.0pre16/src/compiler98/Makefile --- nhc98-1.0pre16.orig/src/compiler98/Makefile Tue Feb 15 13:58:17 2000 +++ nhc98-1.0pre16/src/compiler98/Makefile Fri Mar 10 11:00:18 2000 @@ -48,7 +48,7 @@ export HFLAGS endif ifeq "ghc" "${HC}" -HMAKEFLAGS = +CTS -syslib exts -syslib misc -CTS +HMAKEFLAGS = +CTS -syslib lang -CTS endif diff -ur nhc98-1.0pre16.orig/src/greencard/Makefile nhc98-1.0pre16/src/greencard/Makefile --- nhc98-1.0pre16.orig/src/greencard/Makefile Thu Dec 16 09:12:26 1999 +++ nhc98-1.0pre16/src/greencard/Makefile Fri Mar 10 11:00:18 2000 @@ -7,7 +7,7 @@ HFLAGS = $(NHEAP) endif ifeq "ghc" "$(HC)" - HFLAGS = +CTS -syslib exts -CTS + HFLAGS = +CTS -syslib lang -CTS endif ## Since adopting hmake, all of this junk is obsolete -------------------------------------------------------------------- To unsubscribe, send a message containing the word `unsubscribe' to: nhc-users-request@cs.york.ac.uk --------------------------------------------------------------------


About this list Date view Thread view Subject view Author view