
On 11/14/08 06:22, Malcolm Wallace wrote:
Larry,
Sorry for the delay in response - I have only just seen your messages.
No problem. Thanks, Malcolm.
I think your first approach, using a Makefile, was sound. The only thing missing was the specification of the package in which the module Control.Monad.State lives. I.e. you need to add "-package mtl" to the compilation commands.
[snip] I tried with the attached Makefile (including your suggested -package mtl flag); however, I still got: {--cut here-- Compilation started at Fri Nov 14 07:47:34 make -k hat hmake -hat -package mtl -P/usr/lib/haskell-packages/ghc6/lib/hat-2.05/ghc-6.8.2/Hat -XMultiParamTypeClasses -XFunctionalDependencies -XFlexibleInstances tickSimple hat-trans -P/usr/lib/haskell-packages/ghc6/lib/hat-2.05/ghc-6.8.2/Hat tickSimple.hs Wrote Hat/tickSimple.hs /usr/bin/haskell-compiler -package mtl -XMultiParamTypeClasses -XFunctionalDependencies -XFlexibleInstances -i/usr/lib/haskell-packages/ghc6/lib/hat-2.05/ghc-6.8.2/Hat -c -package hat -o Hat/tickSimple.o Hat/tickSimple.hs Hat/tickSimple.hs:4:0: Bad interface file: /usr/lib/haskell-packages/ghc6/lib/hat-2.05/ghc-6.8.2/Hat/Prelude.hi Something is amiss; requested module main:Prelude differs from name found in the interface file hat-2.5:Hat.Prelude make: *** [hat] Error 1 Compilation exited abnormally with code 2 at Fri Nov 14 07:47:37 }--cut here-- I'd appreciate any further help you could provide. -regards, Larry MAIN=Insort MAIN=tickSimple HAT.dir=/usr/lib/haskell-packages/ghc6/lib/hat-2.05/ghc-6.8.2/Hat INCS=$(HAT.dir) GHC.FLAGS=-P$(INCS) GHC.LANG=-XMultiParamTypeClasses -XFunctionalDependencies -XFlexibleInstances GHC.OPTS=$(GHC.FLAGS) $(GHC.LANG) run: runghc $(GHC.LANG) $(MAIN).hs hat: hmake -hat -package mtl $(GHC.OPTS) $(MAIN)