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 /tutorial.md
/.stack-work/ /.stack-work/
.lish-history .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 -- see: https://github.com/sol/hpack
--
-- hash: 3a261bc10b55766ddf87ee6ac6a456e51b1f7b79b7b6514d18b7dc4f51c4b8eb
name: lish name: lish
version: 0.1.0.0 version: 0.1.0.0
@ -13,8 +17,6 @@ maintainer: Yann Esposito <yann.esposito@gmail.com>
license: PublicDomain license: PublicDomain
license-file: LICENSE license-file: LICENSE
build-type: Simple build-type: Simple
cabal-version: >= 1.10
extra-source-files: extra-source-files:
README.md README.md
stack.yaml stack.yaml
@ -28,16 +30,16 @@ library
src src
ghc-options: -Wall -O2 ghc-options: -Wall -O2
build-depends: build-depends:
base >= 4.8 && < 5 base >=4.8 && <5
, containers , containers
, data-fix , data-fix
, haskeline , haskeline
, parsec >= 3 && < 4 , parsec >=3 && <4
, pipes , pipes
, protolude
, pretty , pretty
, pretty-show , pretty-show
, process , process
, protolude
, text , text
exposed-modules: exposed-modules:
Data.Stack Data.Stack
@ -48,74 +50,80 @@ library
Lish.InternalCommands Lish.InternalCommands
Lish.Parser Lish.Parser
Lish.Types Lish.Types
other-modules:
Paths_lish
default-language: Haskell2010 default-language: Haskell2010
executable lish executable lish
main-is: Main.hs main-is: Main.hs
other-modules:
Paths_lish
hs-source-dirs: hs-source-dirs:
src-exe src-exe
ghc-options: -Wall -O2 -threaded -rtsopts -with-rtsopts=-N ghc-options: -Wall -O2 -threaded -rtsopts -with-rtsopts=-N
build-depends: build-depends:
base >= 4.8 && < 5 base >=4.8 && <5
, containers , containers
, data-fix , data-fix
, haskeline , haskeline
, parsec >= 3 && < 4 , lish
, parsec >=3 && <4
, pipes , pipes
, protolude
, pretty , pretty
, pretty-show , pretty-show
, process , process
, protolude
, text , text
, lish
default-language: Haskell2010 default-language: Haskell2010
test-suite lish-benchmark test-suite lish-benchmark
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
main-is: Main.hs main-is: Main.hs
other-modules:
Paths_lish
hs-source-dirs: hs-source-dirs:
src-benchmark src-benchmark
ghc-options: -Wall -O2 -threaded -rtsopts -with-rtsopts=-N ghc-options: -Wall -O2 -threaded -rtsopts -with-rtsopts=-N
build-depends: build-depends:
base >= 4.8 && < 5 base >=4.8 && <5
, containers , containers
, criterion >=1.1
, data-fix , data-fix
, haskeline , haskeline
, parsec >= 3 && < 4 , lish
, parsec >=3 && <4
, pipes , pipes
, protolude
, pretty , pretty
, pretty-show , pretty-show
, process , process
, protolude
, text , text
, lish
, base >= 4.8 && < 5
, criterion >= 1.1
default-language: Haskell2010 default-language: Haskell2010
test-suite lish-doctest test-suite lish-doctest
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
main-is: Main.hs main-is: Main.hs
other-modules:
Paths_lish
hs-source-dirs: hs-source-dirs:
src-doctest src-doctest
ghc-options: -Wall -O2 -threaded -rtsopts -with-rtsopts=-N ghc-options: -Wall -O2 -threaded -rtsopts -with-rtsopts=-N
build-depends: build-depends:
base >= 4.8 && < 5 Glob >=0.7
, QuickCheck >=2.5
, base >=4.8 && <5
, containers , containers
, data-fix , data-fix
, doctest >=0.10
, haskeline , haskeline
, parsec >= 3 && < 4 , lish
, parsec >=3 && <4
, pipes , pipes
, protolude
, pretty , pretty
, pretty-show , pretty-show
, process , process
, protolude
, text , text
, lish
, base >= 4.8 && < 5
, doctest >=0.10
, Glob >= 0.7
, QuickCheck >= 2.5
default-language: Haskell2010 default-language: Haskell2010
test-suite lish-test test-suite lish-test
@ -125,24 +133,22 @@ test-suite lish-test
src-test src-test
ghc-options: -Wall -O2 -threaded -rtsopts -with-rtsopts=-N ghc-options: -Wall -O2 -threaded -rtsopts -with-rtsopts=-N
build-depends: build-depends:
base >= 4.8 && < 5 base >=4.8 && <5
, containers , containers
, data-fix , data-fix
, haskeline , haskeline
, parsec >= 3 && < 4 , lish
, parsec >=3 && <4
, pipes , pipes
, protolude
, pretty , pretty
, pretty-show , pretty-show
, process , process
, text
, lish
, base >= 4.8 && < 5
, tasty >= 0.11
, tasty-hunit >= 0.9
, tasty-smallcheck >= 0.8
, protolude , protolude
, data-fix , tasty >=0.11
, tasty-hunit >=0.9
, tasty-smallcheck >=0.8
, text
other-modules: other-modules:
Lish.Test.Parser Lish.Test.Parser
Paths_lish
default-language: Haskell2010 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 -- So if the first argument is not Nothing, it means we are in the middle
-- of a multiline expression. -- of a multiline expression.
mainLoop :: Maybe Char -- ^ Check to know if we are in the middle of the writting 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) -> Text -- ^ The previous partial input (if in the middle of a multiline expression)
-> InputT IO () -> InputT IO ()
mainLoop mc env previousPartialnput = do mainLoop mc env previousPartialnput = do

View file

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

View file

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

View file

@ -1,21 +1,7 @@
# This file was automatically generated by 'stack init' # 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:
#
# 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 # name: custom-snapshot
# location: "./custom-snapshot.yaml" # location: "./custom-snapshot.yaml"
resolver: lts-8.0 resolver: lts-14.3
# User packages to be built. # User packages to be built.
# Various formats can be used as shown in the example below. # 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 # Dependency packages to be pulled from upstream that are not in the resolver
# (e.g., acme-missiles-0.3) # (e.g., acme-missiles-0.3)
extra-deps: extra-deps: []
- haskeline-0.7.3.1
- data-fix-0.0.3
# Override default flag values for local packages and extra-deps # Override default flag values for local packages and extra-deps
flags: {} flags: {}