git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Use base-compat in tests
621a5a7Oleg Grenrus
purescript.cabal+2−2
@@ -260,7 +260,7 @@ test-suite tests
260 build-depends: base >=4 && <5, containers -any, directory -any,
260 build-depends: base >=4 && <5, containers -any, directory -any,
261 filepath -any, mtl -any, parsec -any, purescript -any,
261 filepath -any, mtl -any, parsec -any, purescript -any,
262 transformers -any, process -any, transformers-compat -any, time -any,
262 transformers -any, process -any, transformers-compat -any, time -any,
263− Glob -any
263+ Glob -any, base-compat >=0.6.0
264 type: exitcode-stdio-1.0
264 type: exitcode-stdio-1.0
265 main-is: Main.hs
265 main-is: Main.hs
266 other-modules: TestsSetup
266 other-modules: TestsSetup
@@ -272,7 +272,7 @@ test-suite psci-tests
272 mtl -any, optparse-applicative >= 0.10.0, parsec -any,
272 mtl -any, optparse-applicative >= 0.10.0, parsec -any,
273 haskeline >= 0.7.0.0, purescript -any, transformers -any,
273 haskeline >= 0.7.0.0, purescript -any, transformers -any,
274 transformers-compat -any, process -any, HUnit -any, time -any,
274 transformers-compat -any, process -any, HUnit -any, time -any,
275− Glob -any
275+ Glob -any, base-compat >=0.6.0
276 type: exitcode-stdio-1.0
276 type: exitcode-stdio-1.0
277 main-is: Main.hs
277 main-is: Main.hs
278 other-modules: TestsSetup
278 other-modules: TestsSetup
tests/Main.hs+3−7
@@ -16,7 +16,6 @@
16{-# LANGUAGE TupleSections #-}
16{-# LANGUAGE TupleSections #-}
17{-# LANGUAGE GeneralizedNewtypeDeriving #-}
17{-# LANGUAGE GeneralizedNewtypeDeriving #-}
18{-# LANGUAGE FlexibleInstances #-}
18{-# LANGUAGE FlexibleInstances #-}
19−{-# LANGUAGE CPP #-}
20
19
21-- Failing tests can specify the kind of error that should be thrown with a
20-- Failing tests can specify the kind of error that should be thrown with a
22-- @shouldFailWith declaration. For example:
21-- @shouldFailWith declaration. For example:
@@ -35,6 +34,9 @@
35
34
36module Main (main) where
35module Main (main) where
37
36
37+import Prelude ()
38+import Prelude.Compat
39+
38import qualified Language.PureScript as P
40import qualified Language.PureScript as P
39import qualified Language.PureScript.CodeGen.JS as J
41import qualified Language.PureScript.CodeGen.JS as J
40import qualified Language.PureScript.CoreFn as CF
42import qualified Language.PureScript.CoreFn as CF
@@ -42,18 +44,12 @@ import qualified Language.PureScript.CoreFn as CF
42import Data.Char (isSpace)
44import Data.Char (isSpace)
43import Data.Maybe (mapMaybe, fromMaybe)
45import Data.Maybe (mapMaybe, fromMaybe)
44import Data.List (isSuffixOf, sort, stripPrefix)
46import Data.List (isSuffixOf, sort, stripPrefix)
45−#if __GLASGOW_HASKELL__ < 710
46−import Data.Traversable (traverse)
47−#endif
48import Data.Time.Clock (UTCTime())
47import Data.Time.Clock (UTCTime())
49
48
50import qualified Data.Map as M
49import qualified Data.Map as M
51
50
52import Control.Monad
51import Control.Monad
53import Control.Monad.IO.Class (liftIO)
52import Control.Monad.IO.Class (liftIO)
54−#if __GLASGOW_HASKELL__ < 710
55−import Control.Applicative
56−#endif
57import Control.Arrow ((>>>))
53import Control.Arrow ((>>>))
58
54
59import Control.Monad.Reader
55import Control.Monad.Reader
tests/common/TestsSetup.hs+3−8
@@ -10,18 +10,13 @@
10-- |
10-- |
11--
11--
12-----------------------------------------------------------------------------
12-----------------------------------------------------------------------------
13−
14−{-# LANGUAGE CPP #-}
15−
16module TestsSetup where
13module TestsSetup where
17
14
18−import Data.Maybe (fromMaybe)
15+import Prelude ()
16+import Prelude.Compat
19
17
20−#if __GLASGOW_HASKELL__ < 710
18+import Data.Maybe (fromMaybe)
21−import Control.Applicative
22−#endif
23import Control.Monad
19import Control.Monad
24−
25import Control.Monad.Trans.Maybe
20import Control.Monad.Trans.Maybe
26
21
27import System.Process
22import System.Process