Manipulating DynFlags importPaths

Joshua Ball joshbball at gmail.com
Tue May 31 05:14:51 CEST 2011


Never mind. Sometimes I forget that haskell lets are recursive.

On Mon, May 30, 2011 at 8:11 PM, Joshua Ball <joshbball at gmail.com> wrote:
> Hi,
>
> What's the right way to alter the importPaths in the DynFlags? The
> following program freezes:
>
> -- requires ghc package
>
> import GHC
> import DynFlags ( defaultDynFlags )
>
> main =
>    defaultErrorHandler defaultDynFlags $ do
>      runGhc (Just "/home/jball/lib/ghc-7.0.3") $ do
>        dflags <- getSessionDynFlags
>        let dflags = dflags { importPaths = ["/alt/path"] }
>        setSessionDynFlags dflags
>
> I am using ghc 7.0.3, as you might have guessed.
>
> Josh "Ua" Ball
>



-- 
Borrow my books: http://goo.gl/UBbSH



More information about the Glasgow-haskell-users mailing list