[Haskell-cafe] mueval, interpreter options

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Tue Apr 2 19:34:50 CEST 2013


What am I missing? 

I want to use mueval to read a file
that contains "instance Serial m a => Serial m (Tree a)"

(as in
http://hackage.haskell.org/packages/archive/smallcheck/1.0.2/doc/html/Test-SmallCheck-Series.html)

so I put in my call of mueval:         

            let Right opts = M.interpreterOpts []
            keepCurrentDir $ do
                System.Directory.setCurrentDirectory d
                I.runInterpreter $ Mueval.Interpreter.interpreter $ opts
                    { M.timeLimit = 10 -- seconds?
                    , M.modules = Just [ "Prelude"
                        , "Test.SmallCheck.Drivers", "Test.SmallCheck.Series"
                        , "GHC.Generics" ]
                    , M.namedExtensions = [ "MultiParamTypeClasses"
                          , "FlexibleInstances", "DeriveGeneric" ]
   

but it gives me "MultiParamTypeClasses is not enabled" on inputs like

{-# language MultiParamTypeClasses #-}

import  Test.SmallCheck.Series
import GHC.Generics

data Tree a = Null | Fork (Tree a) a (Tree a)
    deriving Generic

instance Serial m a => Serial m (Tree a) where


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.)


Thanks - J.W.




More information about the Haskell-Cafe mailing list