fix using Haskell LTS and Stackage GHC 7.10
This commit is contained in:
parent
581dc32b67
commit
ba9e48cb12
4 changed files with 9 additions and 39 deletions
|
@ -2,18 +2,18 @@
|
|||
-- see http://haskell.org/cabal/users-guide/
|
||||
|
||||
name: holy-project
|
||||
version: 0.1.1.2
|
||||
version: 0.2.0.0
|
||||
synopsis: Start your Haskell project with cabal, git and tests.
|
||||
description: Holy Project is an application wich ask the user
|
||||
some questions and create files to help you
|
||||
starting a new Haskell project.
|
||||
There are example for tests using HUnit and SmallCheck
|
||||
It initializes git, use cabal sandboxes, and provide
|
||||
two useful scripts: \"auto-update\" and \"interact\".
|
||||
It initializes git, use Haskell LTS, and provide
|
||||
a useful script: \"auto-update\".
|
||||
homepage: http://github.com/yogsototh/holy-project
|
||||
license: MIT
|
||||
license-file: LICENSE
|
||||
author: Yann Esposito (Yogsototh)
|
||||
author: Yann Esposito (yogsototh)
|
||||
maintainer: Yann.Esposito@gmail.com
|
||||
-- copyright:
|
||||
category: Development
|
||||
|
@ -23,7 +23,6 @@ data-files: scaffold/LICENSE
|
|||
, scaffold/Setup.hs
|
||||
, scaffold/auto-update
|
||||
, scaffold/gitignore
|
||||
, scaffold/interact
|
||||
, scaffold/project.cabal
|
||||
, scaffold/src/Main.hs
|
||||
, scaffold/src/ModuleName.hs
|
||||
|
|
15
interact
15
interact
|
@ -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
|
|
@ -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
|
|
@ -196,13 +196,14 @@ createProject p = do
|
|||
]
|
||||
-- Change some execution access
|
||||
_ <- setFileMode "auto-update" ((fst . head . readOct) "777")
|
||||
_ <- setFileMode "interact" ((fst . head . readOct) "777")
|
||||
-- Execute some commands
|
||||
-- We don't really need them to be succesful
|
||||
-- So we try them anyway
|
||||
_ <- system "git init ."
|
||||
_ <- system "cabal sandbox init"
|
||||
_ <- system "cabal install"
|
||||
-- Use Haskell LTS by downloading the cabal config
|
||||
_ <- 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-sandbox/bin/test-" ++ projectName p
|
||||
_ <- system $ "cabal run test-" ++ projectName p
|
||||
return ()
|
||||
|
|
Loading…
Reference in a new issue