>I wish to use the FiniteMap module, lib/exts/FiniteMap.lhs, but want
>to use it from both GHC and hugs.  As it is hugs can't use it because
>it imports PrelBase.  (btw, why didn't it make it into the joint
>GHC/Hugs Libraries? - seems v. useful).  
>
>As far as I can see this can be fixed by placing the import PrelBase
>in an IF_GHC macro, and moving the definition of the macro above the
>import.  Or have I missed something (I haven't got as far as using the
>finite maps in anger yet, so maybe)

I'm pretty sure I was able to use FiniteMap with Hugs once before with one or two 
simple modifications.  I don't know about PrelBase---I think you can just delete the 
import---, but there is no Maybes module in Hugs.  FM only uses one function though, 
maybeToBool, so you can just add that to the module and it should compile(provided you 
preprocess it or enable the CPP option in Hugs).

--FC

Reply via email to