on master help sign in
support building with GHC 8.6

resolves #230

commitd71498b2e7219b194f17440b221000bda59f0d8d authorAgentM <agentm@themactionfaction.com> dateSat 7 Sep 2019, 02:06 (7 years ago) parentda7cee6
6 files changed+19−12
cabal.project+7−1 project-m36.cabal+4−4 src/bin/ProjectM36/Server/WebSocket.hs+2−2 src/bin/TutorialD/Interpreter/Base.hs+3−2 src/bin/TutorialD/Interpreter/RelationalExpr.hs+1−1 src/bin/benchmark/Handles.hs+2−2
cabal.project+7−1
@@ -1,3 +1,9 @@
11-- this is needed for GHC8 until distributed-process-extras is updated on Hackage with increased upper bounds
22packages: project-m36.cabal
3−allow-newer: distributed-process-extras:time,distributed-process-extras:binary,distributed-process-client-server:binary,distributed-process-client-server:time,distributed-process-async:time,distributed-process-async:binary
3+allow-newer: distributed-process-extras:time,distributed-process-extras:binary,distributed-process-client-server:binary,distributed-process-client-server:time,distributed-process-async:time,distributed-process-async:binary,distributed-process-extras:stm,distributed-process-extras:containers,network-transport-tcp:containers,distributed-process-client-server:stm,distributed-process-client-server:containers,distributed-process-async:stm,distributed-process-async:containers
4+
5+--necessary for GHC 8.6 support :/
6+source-repository-package
7+ type: git
8+ location: https://github.com/haskell-distributed/distributed-process.git
9+ tag: 660d554f6acd2dba8b605c84e8fa69e45708bc14
project-m36.cabal+4−4
@@ -29,7 +29,7 @@ Flag stack
2929 Default: False
3030
3131Library
32− Build-Depends: base>=4.8 && < 4.12, ghc >= 7.8 && < 8.5, ghc-paths, mtl, containers, unordered-containers, hashable, haskeline, directory, MonadRandom, random-shuffle, uuid >= 1.3.12, cassava >= 0.4.5.1 && < 0.6, text, bytestring, deepseq, deepseq-generics, vector, parallel, monad-parallel, exceptions, transformers, gnuplot, binary, filepath, zlib, directory, vector-binary-instances, temporary, stm, time, hashable-time, old-locale, rset, attoparsec, either, base64-bytestring, data-interval, extended-reals, network-transport, aeson >= 1.1, path-pieces, conduit, resourcet, http-api-data, semigroups, QuickCheck, quickcheck-instances, distributed-process-client-server >= 0.2.3, distributed-process >= 0.7.4, distributed-process-extras >= 0.3.2, distributed-process-async >= 0.2.4.1, network-transport-tcp >= 0.6.0, network-transport, list-t, stm-containers >= 0.2.15, foldl, optparse-applicative, Glob, cryptohash-sha256
32+ Build-Depends: base>=4.8 && < 4.13, ghc >= 8.2 && < 8.7, ghc-paths, mtl, containers, unordered-containers, hashable, haskeline, directory, MonadRandom, random-shuffle, uuid >= 1.3.12, cassava >= 0.4.5.1 && < 0.6, text, bytestring, deepseq, deepseq-generics, vector, parallel, monad-parallel, exceptions, transformers, gnuplot, binary, filepath, zlib, directory, vector-binary-instances, temporary, stm, time, hashable-time, old-locale, rset, attoparsec, either, base64-bytestring, data-interval, extended-reals, network-transport, aeson >= 1.1, path-pieces, conduit, resourcet, http-api-data, semigroups, QuickCheck, quickcheck-instances, distributed-process-client-server >= 0.2.3, distributed-process >= 0.7.4, distributed-process-extras >= 0.3.2, distributed-process-async >= 0.2.4.1, network-transport-tcp >= 0.6.0, network-transport, list-t, stm-containers >= 0.2.15, foldl, optparse-applicative, Glob, cryptohash-sha256
3333 if impl(ghc>= 8.6)
3434 Build-Depends: deferred-folds
3535 Exposed-Modules: ProjectM36.Error,
@@ -126,7 +126,7 @@ Library
126126
127127Executable tutd
128128 Build-Depends: base >=4.8 && <5.0,
129− ghc >= 7.8 && < 8.5,
129+ ghc >= 7.8 && < 8.7,
130130 ghc-paths,
131131 project-m36,
132132 containers,
@@ -154,7 +154,7 @@ Executable tutd
154154 directory,
155155 filepath,
156156 temporary,
157− megaparsec >= 5.2.0 && < 7,
157+ megaparsec >= 5.2.0 && < 8,
158158 haskeline,
159159 random, MonadRandom,
160160 base64-bytestring,
@@ -190,7 +190,7 @@ Executable tutd
190190
191191Executable project-m36-server
192192 Build-Depends: base,
193− ghc >= 7.8 && < 8.5,
193+ ghc >= 7.8 && < 8.7,
194194 ghc-paths,
195195 project-m36,
196196 binary,
src/bin/ProjectM36/Server/WebSocket.hs+2−2
@@ -23,7 +23,7 @@ import Control.Applicative
2323import Text.Megaparsec.Error
2424import Data.Functor
2525
26−#if __GLASGOW_HASKELL__ >= 806
26+#if MIN_VERSION_megaparsec(7,0,0)
2727import Data.List.NonEmpty as NE
2828#endif
2929
@@ -59,7 +59,7 @@ websocketProxyServer port host pending = do
5959 Right (presentation, tutdString) ->
6060 case parseTutorialD tutdString of
6161 Left err -> handleOpResult conn dbconn presentation
62−#if __GLASGOW_HASKELL__ >= 806
62+#if MIN_VERSION_megaparsec(7,0,0)
6363 (DisplayErrorResult
6464 ("parse error: " `T.append` T.pack
6565 (parseErrorPretty . NE.head . bundleErrors $ err)))
src/bin/TutorialD/Interpreter/Base.hs+3−2
@@ -45,11 +45,12 @@ import Data.Time.Clock
4545import Data.Time.Format
4646import Control.Monad (void)
4747
48−#if __GLASGOW_HASKELL__ < 806
48+#if !MIN_VERSION_megaparsec(7,0,0)
4949anySingle :: Parsec Void Text (Token Text)
5050anySingle = anyChar
5151#endif
5252
53+
5354displayOpResult :: TutorialDOperatorResult -> IO ()
5455displayOpResult QuitResult = return ()
5556displayOpResult (DisplayResult out) = TIO.putStrLn out
@@ -62,7 +63,7 @@ displayOpResult (DisplayRelationResult rel) = do
6263 let randomlySortedRel = evalRand (randomizeTupleOrder rel) gen
6364 TIO.putStrLn (showRelation randomlySortedRel)
6465displayOpResult (DisplayParseErrorResult mPromptLength err) = do
65−#if __GLASGOW_HASKELL__ >= 806
66+#if MIN_VERSION_megaparsec(7,0,0)
6667 let errorIndent = errorOffset . NE.head . bundleErrors $ err
6768 errString = T.pack (parseErrorPretty . NE.head . bundleErrors $ err)
6869#else
src/bin/TutorialD/Interpreter/RelationalExpr.hs+1−1
@@ -2,7 +2,7 @@
22
33module TutorialD.Interpreter.RelationalExpr where
44import Text.Megaparsec
5−#if __GLASGOW_HASKELL__ >= 806
5+#if MIN_VERSION_megaparsec(7,0,0)
66import Control.Monad.Combinators.Expr
77#else
88import Text.Megaparsec.Expr
src/bin/benchmark/Handles.hs+2−2
@@ -65,7 +65,7 @@ runOpenClose tutdSetup' tutdIterate' tCount dbdir' = do
6565 case res of
6666 DisplayErrorResult err -> error (T.unpack err)
6767 DisplayParseErrorResult _ err ->
68−#if __GLASGOW_HASKELL__ >= 806
68+#if MIN_VERSION_megaparsec(7,0,0)
6969 error (errorBundlePretty err)
7070#else
7171 error (parseErrorPretty err)
@@ -85,7 +85,7 @@ runTransaction tutdIterate' sess conn =
8585 case res of
8686 DisplayErrorResult err -> error (T.unpack err)
8787 DisplayParseErrorResult _ err ->
88−#if __GLASGOW_HASKELL__ >= 806
88+#if MIN_VERSION_megaparsec(7,0,0)
8989 error (errorBundlePretty err)
9090#else
9191 error (parseErrorPretty err)