Re: How to use Control.Monad.State?
Larry Evans <[email protected]> Fri, 14 Nov 2008 07:54:08 -0600
| Newsgroups | gmane.comp.lang.haskell.hat |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------070903050903040401020909
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
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
--------------070903050903040401020909
Content-Type: text/plain;
name="Makefile"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Makefile"
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)
--------------070903050903040401020909
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Hat mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/hat
--------------070903050903040401020909--