[Haskell-cafe] mueval, interpreter options

Gwern Branwen gwern at gwern.net
Tue Apr 2 20:32:34 CEST 2013


On Tue, Apr 2, 2013 at 1:34 PM, Johannes Waldmann <
waldmann at imn.htwk-leipzig.de> wrote:

> I don't understand mueval's design anyway here:
> do the interpreter options mean that these are automatically on,
> or just that the source text will be allowed to switch then on?
> (I'd prefer the latter.)
>

I'm not clear on what you're doing there (I don't recognize your snippet),
but extensions are enabled as options:

  -X EXTENSION   --extension=EXTENSION    Pass additional flags enabling
extensions just like you would to ghc. Example: -XViewPatterns

So for example:

    $ mueval -e "let f (id -> x) = x in f 1" -XViewPatterns
     1
    $ mueval -e "let f (id -> x) = x in f 1" -XMultiParamTypeClasses
     Illegal view pattern:  id -> x
     Use -XViewPatterns to enable view patterns

-- 
gwern
http://www.gwern.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130402/02ad7ce1/attachment.htm>


More information about the Haskell-Cafe mailing list