fix using Haskell LTS and Stackage GHC 7.10

This commit is contained in:
Yann Esposito (Yogsototh) 2015-05-01 18:49:16 +02:00
parent 581dc32b67
commit ba9e48cb12
4 changed files with 9 additions and 39 deletions

View file

@ -2,18 +2,18 @@
-- see http://haskell.org/cabal/users-guide/ -- see http://haskell.org/cabal/users-guide/
name: holy-project name: holy-project
version: 0.1.1.2 version: 0.2.0.0
synopsis: Start your Haskell project with cabal, git and tests. synopsis: Start your Haskell project with cabal, git and tests.
description: Holy Project is an application wich ask the user description: Holy Project is an application wich ask the user
some questions and create files to help you some questions and create files to help you
starting a new Haskell project. starting a new Haskell project.
There are example for tests using HUnit and SmallCheck There are example for tests using HUnit and SmallCheck
It initializes git, use cabal sandboxes, and provide It initializes git, use Haskell LTS, and provide
two useful scripts: \"auto-update\" and \"interact\". a useful script: \"auto-update\".
homepage: http://github.com/yogsototh/holy-project homepage: http://github.com/yogsototh/holy-project
license: MIT license: MIT
license-file: LICENSE license-file: LICENSE
author: Yann Esposito (Yogsototh) author: Yann Esposito (yogsototh)
maintainer: Yann.Esposito@gmail.com maintainer: Yann.Esposito@gmail.com
-- copyright: -- copyright:
category: Development category: Development
@ -23,7 +23,6 @@ data-files: scaffold/LICENSE
, scaffold/Setup.hs , scaffold/Setup.hs
, scaffold/auto-update , scaffold/auto-update
, scaffold/gitignore , scaffold/gitignore
, scaffold/interact
, scaffold/project.cabal , scaffold/project.cabal
, scaffold/src/Main.hs , scaffold/src/Main.hs
, scaffold/src/ModuleName.hs , scaffold/src/ModuleName.hs

View file

@ -1,15 +0,0 @@
#!/usr/bin/env zsh
packagedir=( ./.cabal-sandbox/*.conf.d(/N) )
(( ${#packagedir} == 0 )) && {
print -- "Error no package found in sandbox"
print -- "Please us cabal sandbox init"
exit 1
}>&2
(( ${#packagedir} > 1 )) && {
print -- "Error Too many packages:"
print -l -- $packagedir
exit 1
}>&2
export GHC_PACKAGE_PATH=$packagedir/:
GHC_PACKAGE_PATH=$packagedir/: ghci

View file

@ -1,15 +0,0 @@
#!/usr/bin/env zsh
packagedir=( ./.cabal-sandbox/*.conf.d(/N) )
(( ${#packagedir} == 0 )) && {
print -- "Error no package found in sandbox"
print -- "Please us cabal sandbox init"
exit 1
}>&2
(( ${#packagedir} > 1 )) && {
print -- "Error Too many packages:"
print -l -- $packagedir
exit 1
}>&2
export GHC_PACKAGE_PATH=$packagedir/:
GHC_PACKAGE_PATH=$packagedir/: ghci

View file

@ -196,13 +196,14 @@ createProject p = do
] ]
-- Change some execution access -- Change some execution access
_ <- setFileMode "auto-update" ((fst . head . readOct) "777") _ <- setFileMode "auto-update" ((fst . head . readOct) "777")
_ <- setFileMode "interact" ((fst . head . readOct) "777")
-- Execute some commands -- Execute some commands
-- We don't really need them to be succesful -- We don't really need them to be succesful
-- So we try them anyway -- So we try them anyway
_ <- system "git init ." _ <- system "git init ."
_ <- system "cabal sandbox init" -- Use Haskell LTS by downloading the cabal config
_ <- system "cabal install" _ <- system "curl -O https://www.stackage.org/snapshot/lts-2.5/cabal.config"
_ <- system "cabal install --dependencies-only --enable-tests . -j"
_ <- system "cabal build"
_ <- system "cabal test" _ <- system "cabal test"
_ <- system $ "./.cabal-sandbox/bin/test-" ++ projectName p _ <- system $ "cabal run test-" ++ projectName p
return () return ()