Discovery of source dependencies without --make

Roman Cheplyaka roma at
Thu Nov 27 10:16:35 UTC 2014

On 25/11/14 12:29, Joachim Breitner wrote:
> Dear Lars,
> Am Dienstag, den 25.11.2014, 10:36 +0100 schrieb Lars Hupel:
>> The invocation is similar to this:
>> ghc -c -outputdir "$OUT"          -XTrustworthy Library.hs
>> ghc -c -outputdir "$OUT" -i"$OUT" -XSafe "$SUBMISSION"
>> ghc -c -outputdir "$OUT" -i"$OUT" Test_Suite.hs
>> ghc    -outputdir "$OUT" -i"$OUT" -o "$OUT/runner"
> the only reason you do these in individual steps is that you need to
> pass different flags, or are there other reasons?
> Have you tried putting the pragma {-# LANGUAGE Safe #-} as the first
> line into the submission file? I’m not sure how safe that actually is,
> but at least
>         {-# LANGUAGE Safe #-}
>         {-# LANGUAGE Trustworthy #-}
>         module Foo where
>         import Unsafe.Coerce
> is rejected by 7.6.3. This way, it could work with a single invocation
> of --make.

The only problem I see with that is that error message locations will be
a bit off, since the file being compiled is different from the file
submitted. But since we're in the hacks territory anyway, this could be
fixed up with a simple regex :-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Glasgow-haskell-users mailing list