1{-# LANGUAGE ScopedTypeVariables #-}
9import Control.Monad.Trans.Maybe
10import Control.Exception
13import System.Directory
16findNodeProcess :: IO (Maybe String)
17findNodeProcess = runMaybeT . msum $ map (MaybeT . findExecutable) names
19 names = ["nodejs", "node"]
22-- Fetches code necessary to run the tests with. The resulting support code
23-- should then be checked in, so that npm/bower etc is not required to run the
26-- Simply rerun this (via ghci is probably easiest) when the support code needs
29updateSupportCode :: IO ()
31 setCurrentDirectory "tests/support"
32 if System.Info.os == "mingw32"
33 then callProcess "setup-win.cmd" []
35 callProcess "npm" ["install"]
36 -- Sometimes we run as a root (e.g. in simple docker containers)
37 -- And we are non-interactive: https://github.com/bower/bower/issues/1162
38 callProcess "node_modules/.bin/bower" ["--allow-root", "install", "--config.interactive=false"]
39 setCurrentDirectory "../.."
42-- The support modules that should be cached between test cases, to avoid
43-- excessive rebuilding.
45supportModules :: [String]
47 [ "Control.Applicative"
51 , "Control.Monad.Eff.Class"
52 , "Control.Monad.Eff.Console"
53 , "Control.Monad.Eff.Unsafe"
57 , "Control.Semigroupoid"
59 , "Data.BooleanAlgebra"
61 , "Data.CommutativeRing"
63 , "Data.EuclideanRing"
65 , "Data.Function.Uncurried"
68 , "Data.HeytingAlgebra"
84pushd :: forall a. FilePath -> IO a -> IO a
86 original <- getCurrentDirectory
87 setCurrentDirectory dir
88 result <- try act :: IO (Either IOException a)
89 setCurrentDirectory original
90 either throwIO return result
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list