haskellleksah

How can I add an extra switch in Leksah?


I would like to add an extra switch "-XDeriveDataTypeable" to the compiler.

Otherwise, I would like to able to compile Typeable.

Where can i do that in Leksah?


Solution

  • Generally

    Here's a editor/ide-agnostic solution to your problem:

    For language extensions, you can add this at the top of the source as a compiler pragma, which I prefer anyway:

    {-# LANGUAGE DeriveDataTypeable #-}
    

    instead of -XDeriveDataTypeable on the command line

    You can pass other command line options to GHC, like this:

    {-# OPTIONS_GHC -fno-warn-name-shadowing #-}
    

    In Leksah

    Leksah uses cabal for build configuration, so there's no special Leksah magic, that's all standard, but you can use the package editor as a GUI to edit the cabal file.

    2/3 of the way down is the Extensions section where you can specify what language extensions you want.

    package editor