git.iko.soy/typeable/nixpkgs
on master help sign in
haskell-mueval has been fixed upstream.
commit2f111381e0c405faadd769ebeb2e45c021bddb99 authorPeter Simons <simons@cryp.to> dateSun 5 Jul 2015, 00:48 (11 years ago) parent26a9fcd
3 files changed−116
pkgs/development/haskell-modules/configuration-common.nix−3 pkgs/development/haskell-modules/mueval-fix.patch−90 pkgs/development/haskell-modules/mueval-nix.patch−23
pkgs/development/haskell-modules/configuration-common.nix−3
@@ -781,9 +781,6 @@ self: super: {
781781 # Patch to consider NIX_GHC just like xmonad does
782782 dyre = appendPatch super.dyre ./dyre-nix.patch;
783783
784− # https://github.com/gwern/mueval/issues/9
785− mueval = appendPatch (appendPatch super.mueval ./mueval-fix.patch) ./mueval-nix.patch;
786−
787784 # Test suite won't compile against tasty-hunit 0.9.x.
788785 zlib = dontCheck super.zlib;
789786
pkgs/development/haskell-modules/mueval-fix.patchdeleted−90
@@ -1,90 +0,0 @@
1−diff --git a/Mueval/ArgsParse.hs b/Mueval/ArgsParse.hs
2−index 05c8fd9..0c32e27 100644
3−--- a/Mueval/ArgsParse.hs
4−+++ b/Mueval/ArgsParse.hs
5−@@ -1,10 +1,9 @@
6−+{-# LANGUAGE CPP #-}
7− module Mueval.ArgsParse (Options(..), interpreterOpts, getOptions) where
8−
9− import Control.Monad (liftM)
10− import System.Console.GetOpt
11−
12−-import qualified Codec.Binary.UTF8.String as Codec (decodeString)
13−-
14− import Mueval.Context (defaultModules, defaultPackages)
15−
16− -- | See the results of --help for information on what each option means.
17−@@ -98,4 +97,11 @@ header = "Usage: mueval [OPTION...] --expression EXPRESSION..."
18− -- | Just give us the end result options; this parsing for
19− -- us. Bonus points for handling UTF.
20− getOptions :: [String] -> Either (Bool, String) Options
21−-getOptions = interpreterOpts . map Codec.decodeString
22−\ No newline at end of file
23−+getOptions = interpreterOpts . map decodeString
24−+
25−+decodeString :: String -> String
26−+#if __GLASGOW_HASKELL__ >= 702
27−+decodeString = id
28−+#else
29−+decodeString = Codec.decodeString
30−+#endif
31−diff --git a/Mueval/Context.hs b/Mueval/Context.hs
32−index 78925cf..548514c 100644
33−--- a/Mueval/Context.hs
34−+++ b/Mueval/Context.hs
35−@@ -1,3 +1,4 @@
36−+{-# LANGUAGE CPP #-}
37− module Mueval.Context (
38− cleanModules,
39− defaultModules,
40−@@ -32,7 +33,9 @@ defaultModules = ["Prelude",
41− "Control.Monad.Error",
42− "Control.Monad.Fix",
43− "Control.Monad.Identity",
44−+#if !MIN_VERSION_base(4,7,0)
45− "Control.Monad.Instances",
46−+#endif
47− "Control.Monad.RWS",
48− "Control.Monad.Reader",
49− "Control.Monad.State",
50−diff --git a/Mueval/Interpreter.hs b/Mueval/Interpreter.hs
51−index 29b771f..6c39482 100644
52−--- a/Mueval/Interpreter.hs
53−+++ b/Mueval/Interpreter.hs
54−@@ -1,4 +1,5 @@
55− {-# LANGUAGE PatternGuards #-}
56−+{-# LANGUAGE FlexibleContexts #-}
57− -- TODO: suggest the convenience functions be put into Hint proper?
58− module Mueval.Interpreter where
59−
60−@@ -12,8 +13,6 @@ import System.Exit (exitFailure)
61− import System.FilePath.Posix (takeFileName)
62− import qualified Control.Exception.Extensible as E (evaluate,catch,SomeException(..))
63−
64−-import qualified System.IO.UTF8 as UTF (putStrLn)
65−-
66− import Language.Haskell.Interpreter (eval, set, reset, setImportsQ, loadModules, liftIO,
67− installedModulesInScope, languageExtensions,
68− typeOf, setTopLevelModules, runInterpreter, glasgowExtensions,
69−@@ -100,7 +99,7 @@ mvload lfl = do canonfile <- makeRelativeToCurrentDirectory lfl
70− -- flooding. Lambdabot has a similar limit.
71− sayIO :: String -> IO ()
72− sayIO str = do (out,b) <- render 1024 str
73−- UTF.putStrLn out
74−+ putStrLn out
75− when b exitFailure
76−
77− -- | Oh no, something has gone wrong. If it's a compilation error pretty print
78−diff --git a/mueval.cabal b/mueval.cabal
79−index 3f9406d..b86d796 100644
80−--- a/mueval.cabal
81−+++ b/mueval.cabal
82−@@ -32,7 +32,7 @@ library
83− exposed-modules: Mueval.Parallel, Mueval.Context, Mueval.Interpreter,
84− Mueval.ArgsParse, Mueval.Resources
85− build-depends: base>=4 && < 5, containers, directory, mtl>2, filepath, unix, process,
86−- hint>=0.3.1, show>=0.3, utf8-string, Cabal, extensible-exceptions, simple-reflect
87−+ hint>=0.3.1, show>=0.3, Cabal, extensible-exceptions, simple-reflect
88− ghc-options: -Wall -static
89−
90− executable mueval-core
pkgs/development/haskell-modules/mueval-nix.patchdeleted−23
@@ -1,23 +0,0 @@
1−diff --git a/Mueval/Interpreter.hs b/Mueval/Interpreter.hs
2−index 29b771f..6360ee3 100644
3−--- a/Mueval/Interpreter.hs
4−+++ b/Mueval/Interpreter.hs
5−@@ -8,6 +8,7 @@ import Control.Monad.Writer (Any(..),runWriterT,tell)
6− import Data.Char (isDigit)
7− import Data.List (stripPrefix)
8− import System.Directory (copyFile, makeRelativeToCurrentDirectory, removeFile, setCurrentDirectory)
9−+import System.Environment (lookupEnv)
10− import System.Exit (exitFailure)
11− import System.FilePath.Posix (takeFileName)
12− import qualified Control.Exception.Extensible as E (evaluate,catch,SomeException(..))
13−@@ -47,6 +48,10 @@ interpreter Options { extensions = exts, namedExtensions = nexts,
14− -- Explicitly adding ImplicitPrelude because of
15− -- http://darcsden.com/jcpetruzza/hint/issue/1
16− unless (null lexts) $ set [languageExtensions := (UnknownExtension "ImplicitPrelude" : lexts)]
17−+ pkgs' <- liftIO $ lookupEnv "NIX_GHC_LIBDIR"
18−+ case pkgs' of
19−+ Just pkgs -> unsafeSetGhcOption ("-package-db " ++ pkgs ++ "/package.conf.d")
20−+ Nothing -> return ()
21− when trust $ do
22− unsafeSetGhcOption "-fpackage-trust"
23− forM_ (trustPkgs >>= words) $ \pkg ->