diff --git a/.gitignore b/.gitignore index dc4cd5d..895f7de 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,10 @@ cabal-dev/* dist/* +cabal.config +cabal.sandbox.config + +stack.yaml +.stack-work + +.idea* +*.iml diff --git a/HaskellKoans.cabal b/HaskellKoans.cabal index 1d7718b..75e97d6 100644 --- a/HaskellKoans.cabal +++ b/HaskellKoans.cabal @@ -86,25 +86,3 @@ test-suite koans -- Extra tools (e.g. alex, hsc2hs, ...) needed to build the source. -- Build-tools: - -Executable testloop - -- .hs or .lhs file containing the Main module. - Main-is: - TestLoop.hs - - -- Packages needed in order to build this package. - Build-depends: - base >= 4.5, - attoparsec, - containers, - HUnit, - mtl, - hspec, - text, - testloop - - HS-source-dirs: - test - - Default-language: - Haskell2010 diff --git a/README.md b/README.md index ec8a3f0..9b0e465 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ ## installation - $ ./bin/setup-koans +Make sure stack is installed, then: + + $ stack init This may take time. ## run - $ ./bin/koans + $ stack test This tells you what to do. Modify `test/BasicFunctions.hs`'s `replaceValue`s to let the test passes. diff --git a/bin/koans b/bin/koans deleted file mode 100755 index f9b1b8b..0000000 --- a/bin/koans +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec .cabal-sandbox/bin/testloop diff --git a/bin/setup-koans b/bin/setup-koans deleted file mode 100755 index 80c04b8..0000000 --- a/bin/setup-koans +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env runhaskell -import Control.Monad (unless) -import qualified System.Process as S -import qualified System.Exit as S - -sh :: String -> IO () -sh cmd = do - x <- S.system cmd - case x of - S.ExitFailure _ -> error $ "[ERROR]" ++ cmd ++ " failed." - _ -> return () - -cabalSandboxInit :: IO () -cabalSandboxInit = do - x <- S.system "cabal sandbox init" - case x of - S.ExitFailure _ -> error $ "[ERROR] initializing sandbox. Please ensure GHC version >= 7.8 and cabal >= 1.18 are installed and try again." - _ -> return () - -main :: IO () -main = do - cabalSandboxInit - sh "cabal install --only-dependencies" - sh "cabal configure --enable-test" - sh "cabal install --reinstall" diff --git a/test/TestLoop.hs b/test/TestLoop.hs deleted file mode 100644 index 09a86a6..0000000 --- a/test/TestLoop.hs +++ /dev/null @@ -1,6 +0,0 @@ -module Main where - -import System.TestLoop (setupTestLoop) - -main :: IO () -main = setupTestLoop