[Haskell-cafe] trouble compiling "import GHC.Prim(MutableByteArray#, ....." (building regex-tdfa from darcs) -- what's that # sign doing?

Thomas Hartman thomas.hartman at db.com
Fri Aug 17 16:27:29 EDT 2007

trying to compile regex-tdfa, I ran into another issue. (earlier I had a 
cabal problem but that's resolved.)

there's a line that won't compile, neither for ghc 6.6.1 nor 6.7 


so the fresh darcs regex tdfa package won't build.

This line (line 16 below) causes this error for 

  ghc -e '' RunMutState.hs

for both ghc 6.1 and 6.7 

Much obliged for any help,



hartthoma at linuxpt:~/installs/regex_darcs/regex-tdfa>runghc Setup.hs build
Preprocessing library regex-tdfa-0.93...
Building regex-tdfa-0.93...

Text/Regex/TDFA/RunMutState.hs:16:32: parse error on input `#'
hartthoma at linuxpt:~/installs/regex_darcs/regex-tdfa>head -n20 
Text/Regex/TDFA/RunMutState.hs | cat -n 
     1  {-# LANGUAGE CPP #-}
     2  module 
     3                                    ,newScratch,tagsToGroupsST
     4 ,toInstructions,compareWith,resetScratch
     5                                    ,SScratch(..),MScratch,WScratch) 
     7  import Control.Monad(forM_,liftM,liftM2,liftM3,foldM)
     8  --import Control.Monad.ST.Strict as S (ST)
     9  --import qualified Control.Monad.ST.Lazy as L (ST)
    10  import Control.Monad.State(MonadState(..),execState)
    12  import Data.Array.Base(unsafeRead,unsafeWrite,STUArray(..))
    13  #ifdef __GLASGOW_HASKELL__
    14  import GHC.Arr(STArray(..))
    15  import GHC.ST(ST(..))
*** 16  import 
    17  #else
    18  import Control.Monad(when)
    19  import Control.Monad.ST(ST)
    20  import Data.Array.ST(STArray)
hartthoma at linuxpt:~/installs/regex_darcs/regex-tdfa>


This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070817/97cda0bd/attachment.htm

More information about the Haskell-Cafe mailing list