upgraded LTS, stack stopped to work for previous LTS

This commit is contained in:
Yann Esposito (Yogsototh) 2019-09-07 08:18:39 +02:00
parent 212630f872
commit 0df0bd17e0
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
6 changed files with 52 additions and 66 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
/tutorial.md
/.stack-work/
.lish-history
*.tix
stack.yaml.lock

View file

@ -1,6 +1,10 @@
-- This file has been generated from package.yaml by hpack version 0.17.0.
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.31.2.
--
-- see: https://github.com/sol/hpack
--
-- hash: 3a261bc10b55766ddf87ee6ac6a456e51b1f7b79b7b6514d18b7dc4f51c4b8eb
name: lish
version: 0.1.0.0
@ -13,8 +17,6 @@ maintainer: Yann Esposito <yann.esposito@gmail.com>
license: PublicDomain
license-file: LICENSE
build-type: Simple
cabal-version: >= 1.10
extra-source-files:
README.md
stack.yaml
@ -28,16 +30,16 @@ library
src
ghc-options: -Wall -O2
build-depends:
base >= 4.8 && < 5
base >=4.8 && <5
, containers
, data-fix
, haskeline
, parsec >= 3 && < 4
, parsec >=3 && <4
, pipes
, protolude
, pretty
, pretty-show
, process
, protolude
, text
exposed-modules:
Data.Stack
@ -48,74 +50,80 @@ library
Lish.InternalCommands
Lish.Parser
Lish.Types
other-modules:
Paths_lish
default-language: Haskell2010
executable lish
main-is: Main.hs
other-modules:
Paths_lish
hs-source-dirs:
src-exe
ghc-options: -Wall -O2 -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >= 4.8 && < 5
base >=4.8 && <5
, containers
, data-fix
, haskeline
, parsec >= 3 && < 4
, lish
, parsec >=3 && <4
, pipes
, protolude
, pretty
, pretty-show
, process
, protolude
, text
, lish
default-language: Haskell2010
test-suite lish-benchmark
type: exitcode-stdio-1.0
main-is: Main.hs
other-modules:
Paths_lish
hs-source-dirs:
src-benchmark
ghc-options: -Wall -O2 -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >= 4.8 && < 5
base >=4.8 && <5
, containers
, criterion >=1.1
, data-fix
, haskeline
, parsec >= 3 && < 4
, lish
, parsec >=3 && <4
, pipes
, protolude
, pretty
, pretty-show
, process
, protolude
, text
, lish
, base >= 4.8 && < 5
, criterion >= 1.1
default-language: Haskell2010
test-suite lish-doctest
type: exitcode-stdio-1.0
main-is: Main.hs
other-modules:
Paths_lish
hs-source-dirs:
src-doctest
ghc-options: -Wall -O2 -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >= 4.8 && < 5
Glob >=0.7
, QuickCheck >=2.5
, base >=4.8 && <5
, containers
, data-fix
, doctest >=0.10
, haskeline
, parsec >= 3 && < 4
, lish
, parsec >=3 && <4
, pipes
, protolude
, pretty
, pretty-show
, process
, protolude
, text
, lish
, base >= 4.8 && < 5
, doctest >=0.10
, Glob >= 0.7
, QuickCheck >= 2.5
default-language: Haskell2010
test-suite lish-test
@ -125,24 +133,22 @@ test-suite lish-test
src-test
ghc-options: -Wall -O2 -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >= 4.8 && < 5
base >=4.8 && <5
, containers
, data-fix
, haskeline
, parsec >= 3 && < 4
, lish
, parsec >=3 && <4
, pipes
, protolude
, pretty
, pretty-show
, process
, text
, lish
, base >= 4.8 && < 5
, tasty >= 0.11
, tasty-hunit >= 0.9
, tasty-smallcheck >= 0.8
, protolude
, data-fix
, tasty >=0.11
, tasty-hunit >=0.9
, tasty-smallcheck >=0.8
, text
other-modules:
Lish.Test.Parser
Paths_lish
default-language: Haskell2010

View file

@ -46,7 +46,7 @@ toEnv env =
-- So if the first argument is not Nothing, it means we are in the middle
-- of a multiline expression.
mainLoop :: Maybe Char -- ^ Check to know if we are in the middle of the writting of a multiline expression
-> Env -- ^ The Lish environement
-> Env -- ^ The Lish environment
-> Text -- ^ The previous partial input (if in the middle of a multiline expression)
-> InputT IO ()
mainLoop mc env previousPartialnput = do

View file

@ -11,7 +11,7 @@ import Data.Fix
import qualified Data.Map.Strict as Map
import qualified Data.Text as Text
import GHC.IO.Handle (hGetContents)
import Protolude hiding (show)
import Protolude hiding (show,replace)
import System.Environment (setEnv)
import Lish.Parser (parseCmd)
@ -65,9 +65,7 @@ replace _ = evalErr "replace should take 3 String arguments"
-- | create a string and concat multiple elements
str :: ReduceUnawareCommand
str exprs = do
args <- catMaybes <$> mapM toArg exprs
return $ Str $ Text.concat args
str exprs = Str . Text.concat . catMaybes <$> mapM toArg exprs
-- | create an atom from a string (do nothing to atoms)
atom :: ReduceUnawareCommand
@ -268,12 +266,8 @@ evalStr _ _ = evalErr "evalStr error"
-- | retrieve the value of a var
getenv :: Command
getenv _ [Atom varname] = do
hm <- get
return $ fromMaybe Void (Map.lookup varname hm)
getenv _ [Str varname] = do
hm <- get
return $ fromMaybe Void (Map.lookup varname hm)
getenv _ [Atom varname] = fromMaybe Void . Map.lookup varname <$> get
getenv _ [Str varname] = fromMaybe Void . Map.lookup varname <$> get
getenv r (expr:_) = do
reduced <- r expr
hm <- get

View file

@ -25,7 +25,7 @@ import Data.Map.Strict (Map)
import qualified Data.Text as Text
import GHC.IO.Handle (Handle)
import GHC.Show (Show (..))
import Protolude hiding (show)
import Protolude hiding (show,repr)
data ExprF a = Atom Text
| Num Integer

View file

@ -1,21 +1,7 @@
# This file was automatically generated by 'stack init'
#
# Some commonly used options have been documented as comments in this file.
# For advanced use and comprehensive documentation of the format, please see:
# http://docs.haskellstack.org/en/stable/yaml_configuration/
# Resolver to choose a 'specific' stackage snapshot or a compiler version.
# A snapshot resolver dictates the compiler version and the set of packages
# to be used for project dependencies. For example:
#
# resolver: lts-3.5
# resolver: nightly-2015-09-21
# resolver: ghc-7.10.2
# resolver: ghcjs-0.1.0_ghc-7.10.2
# resolver:
# This file was automatically generated by 'stack init' # # Some commonly used options have been documented as comments in this file. # For advanced use and comprehensive documentation of the format, please see: # http://docs.haskellstack.org/en/stable/yaml_configuration/ # Resolver to choose a 'specific' stackage snapshot or a compiler version. # A snapshot resolver dictates the compiler version and the set of packages # to be used for project dependencies. For example: # # resolver: lts-3.5 # resolver: nightly-2015-09-21 # resolver: ghc-7.10.2 # resolver: ghcjs-0.1.0_ghc-7.10.2 # resolver:
# name: custom-snapshot
# location: "./custom-snapshot.yaml"
resolver: lts-8.0
resolver: lts-14.3
# User packages to be built.
# Various formats can be used as shown in the example below.
@ -39,9 +25,7 @@ packages:
- '.'
# Dependency packages to be pulled from upstream that are not in the resolver
# (e.g., acme-missiles-0.3)
extra-deps:
- haskeline-0.7.3.1
- data-fix-0.0.3
extra-deps: []
# Override default flag values for local packages and extra-deps
flags: {}