Package: haskell-mueval / 0.9.1.1.2-9

newer-hint Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
--- a/Mueval/Interpreter.hs
+++ b/Mueval/Interpreter.hs
@@ -18,11 +18,12 @@
 import           Data.List
 
 import           Language.Haskell.Interpreter (eval, set, reset, setImportsQ, loadModules, liftIO,
-                                     installedModulesInScope, languageExtensions,
-                                     typeOf, setTopLevelModules, runInterpreter, glasgowExtensions,
+                                     installedModulesInScope, languageExtensions, availableExtensions,
+                                     typeOf, setTopLevelModules, runInterpreter,
                                      OptionVal(..), Interpreter,
                                      InterpreterError(..),GhcError(..),
                                      Extension(UnknownExtension))
+import           Language.Haskell.Interpreter.Extension (asExtension)
 import           Language.Haskell.Interpreter.Unsafe (unsafeSetGhcOption)
 
 import           Mueval.ArgsParse (Options(..))
@@ -177,3 +178,39 @@
                 \(E.SomeException e) -> return . Exception . toStream . show $ e
     where uncons [] = End
           uncons (x:xs) = x `seq` Cons x (toStream xs)
+
+glasgowExtensions :: [Extension]
+glasgowExtensions = intersect availableExtensions exts612
+    where exts612 = map asExtension ["PrintExplicitForalls",
+                                     "ForeignFunctionInterface",
+                                     "UnliftedFFITypes",
+                                     "GADTs",
+                                     "ImplicitParams",
+                                     "ScopedTypeVariables",
+                                     "UnboxedTuples",
+                                     "TypeSynonymInstances",
+                                     "StandaloneDeriving",
+                                     "DeriveDataTypeable",
+                                     "FlexibleContexts",
+                                     "FlexibleInstances",
+                                     "ConstrainedClassMethods",
+                                     "MultiParamTypeClasses",
+                                     "FunctionalDependencies",
+                                     "MagicHash",
+                                     "PolymorphicComponents",
+                                     "ExistentialQuantification",
+                                     "UnicodeSyntax",
+                                     "PostfixOperators",
+                                     "PatternGuards",
+                                     "LiberalTypeSynonyms",
+                                     "ExplicitForAll",
+                                     "RankNTypes",
+                                     "ImpredicativeTypes",
+                                     "TypeOperators",
+                                     "RecursiveDo",
+                                     "DoRec",
+                                     "ParallelListComp",
+                                     "EmptyDataDecls",
+                                     "KindSignatures",
+                                     "GeneralizedNewtypeDeriving",
+                                     "TypeFamilies" ]
--- a/mueval.cabal
+++ b/mueval.cabal
@@ -32,7 +32,7 @@
         exposed-modules:     Mueval.Parallel, Mueval.Context, Mueval.Interpreter,
                              Mueval.ArgsParse, Mueval.Resources
         build-depends:       base>=4 && < 5, containers, directory, mtl>2, filepath, unix, process,
-                             hint>=0.3.1, show>=0.3, Cabal, extensible-exceptions, simple-reflect,
+                             hint>=0.5.0, show>=0.3, Cabal, extensible-exceptions, simple-reflect,
                              QuickCheck
         ghc-options:         -Wall -static