[Haskell-cafe] trouble compiling "import
GHC.Prim(MutableByteArray#, ....." (building regex-tdfa from darcs)
-- what's that # sign doing?
Stefan O'Rear
stefanor at cox.net
Fri Aug 17 20:38:02 EDT 2007
On Fri, Aug 17, 2007 at 08:13:55PM -0400, Thomas Hartman wrote:
> Thanks Stefan. I got regex tdfa to compile on 6.7. FWIW, here's a patch,
> generated with darcs whatsnew against a fresh unzip of regex tdfa 0.92
>
> I didn't patch against the darcs head because this uses a "language"
> progma in {-# options #-} in some file*, which ghc 6.7 didn't know what to
> do with, nor I.
>
> *: Text/Regex/TDFA/RunMutState.hs: {-# LANGUAGE CPP #-} (in darcs head,
> which as I said, I did not patch against, rather I patched against 0.92
> downloaded and unzipped.)
That's a bug, in either GHC 6.7.x (please specify the date if you can,
6.7 is a pretty wide range!) or regex-tdfa.
Does {-# OPTIONS_GHC -cpp #-} (theoretically equivalent) work?
What's the error message?
> If there is a better way than this to send patches please advise, as I
> don't do this terribly often. (Actually I have no idea how to apply the
> below patch... is there a way?)
$ mkdir ~/.darcs
$ echo 'Thomas Hartman <thomas.hartman at db.com>' > ~/.darcs/author
$ darcs record -a
<enter description>
$ darcs send
> [patch]
> {
> hunk ./Data/IntMap/CharMap.hs 1
> +{-# OPTIONS -XGeneralizedNewtypeDeriving #-}
Ick. {-# OPTIONS is very strongly deprecated, since it doesn't specify
a compiler but must use a compiler-specific syntax. Much better to use
LANGUAGE:
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
> +Build-Depends: regex-base >= 0.80, base >= 2.0, parsec, mtl,
> containers, array, bytestring
That won't work; you must indent continuation lines.
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20070817/cbc70616/attachment.bin
More information about the Haskell-Cafe
mailing list