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 :-) Roman
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users