#7394: SafeHaskell permits OPTIONS_GHC pragmas
------------------------------+---------------------------------------------
Reporter: dag | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.4.1 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
This can be used to launch arbitrary processes at compile-time, and
possibly other dangerous things as well. For example, I'm curious if it
would be possible to override trust with {{{OPTIONS_GHC -trust foo}}}...
Test case, using the hsx preprocessor for XML literals:
{{{
{-# LANGUAGE Safe #-}
{-# OPTIONS_GHC -F -pgmF trhsx #-}
img = <img/>
}}}
The resulting error suggest that the trhsx program was in deed launched:
{{{
pp.hs:3:8: Not in scope: `genEElement'
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7394>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs