packages feed

express 0.1.2 → 0.1.3

raw patch · 52 files changed

+174/−140 lines, 52 filesdep ~leancheckPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: leancheck

API changes (from Hackage documentation)

Files

.gitignore view
@@ -3,6 +3,7 @@ .stack-work idx/ dist/+dist-newstyle/ log/ *.swp *.swo
.travis.yml view
@@ -1,6 +1,6 @@ # .travis.yml file for Express #-# Copyright:   (c) 2017-2019 Rudy Matela+# Copyright:   (c) 2017-2020 Rudy Matela # License:     3-Clause BSD  (see the file LICENSE) # Maintainer:  Rudy Matela <rudy@matela.com.br> @@ -22,6 +22,9 @@ - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH - ghc --version - cabal --version+- haddock --version+- du -hd3 ~/.cabal ~/.ghc || true+- du -hd4 ~/.stack || true - rm -f ~/.cabal/config && cabal update # Download and unpack the stack executable # "Once Travis whitelists the stack.dev files," simply include stack in the@@ -31,36 +34,39 @@ - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' - stack config set system-ghc --global true - stack --version-- cabal install leancheck+- cabal install leancheck || cabal install leancheck --lib  script: - make && make test - make haddock - make test-sdist - cabal test main --ghc-option=-O0-- stack $STACKR --no-terminal --skip-ghc-check test express:test:main --ghc-options=-O0+- stack --resolver $STACKVER --no-terminal --skip-ghc-check test --ghc-options=-O0  matrix:   allow_failures:   - ghc: 'head'   include:   - ghc: 'head'-    env:                   GHCVER=head         CABALVER=head+    env:                   GHCVER=head         CABALVER=head   STACKVER=nightly-2020-03-28     addons: {apt: {packages: [ghc-head,   cabal-install-head], sources: hvr-ghc}}+  - ghc: '8.8'+    env:                   GHCVER=8.8.3        CABALVER=3.0    STACKVER=lts-15.5+    addons: {apt: {packages: [ghc-8.8.3,  cabal-install-3.0],  sources: hvr-ghc}}   - ghc: '8.6'-    env:                   GHCVER=8.6.1        CABALVER=2.4-    addons: {apt: {packages: [ghc-8.6.1,  cabal-install-2.4],  sources: hvr-ghc}}+    env:                   GHCVER=8.6.5        CABALVER=2.4    STACKVER=lts-14.27+    addons: {apt: {packages: [ghc-8.6.5,  cabal-install-2.4],  sources: hvr-ghc}}   - ghc: '8.4'-    env:                   GHCVER=8.4.4        CABALVER=2.2+    env:                   GHCVER=8.4.4        CABALVER=2.2    STACKVER=lts-12.26     addons: {apt: {packages: [ghc-8.4.4,  cabal-install-2.2],  sources: hvr-ghc}}   - ghc: '8.2'-    env:                   GHCVER=8.2.2        CABALVER=2.0+    env:                   GHCVER=8.2.2        CABALVER=2.0    STACKVER=lts-11.22     addons: {apt: {packages: [ghc-8.2.2,  cabal-install-2.0],  sources: hvr-ghc}}   - ghc: '8.0'-    env:                   GHCVER=8.0.2        CABALVER=1.24+    env:                   GHCVER=8.0.2        CABALVER=1.24   STACKVER=lts-9.21     addons: {apt: {packages: [ghc-8.0.2,  cabal-install-1.24], sources: hvr-ghc}}   - ghc: '7.10'-    env:                   GHCVER=7.10.3       CABALVER=1.22   STACK_YAML=stack-lts-11.yaml+    env:                   GHCVER=7.10.3       CABALVER=1.22   STACKVER=lts-6.35     addons: {apt: {packages: [ghc-7.10.3, cabal-install-1.22], sources: hvr-ghc}}   # we only support stack with GHC >= 7.10   - ghc: '7.8'@@ -70,10 +76,12 @@     - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH     - ghc --version     - cabal --version+    - haddock --version     - rm -f ~/.cabal/config && cabal update     - cabal install Cabal==1.18.*     - cabal install leancheck     script:     - make && make test     - make haddock HADDOCKFLAGS=+    - make test-sdist     - cabal test
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2019, Rudy Matela+Copyright (c) 2019-2020, Rudy Matela  All rights reserved. 
Makefile view
@@ -32,6 +32,8 @@ GHCIMPORTDIRS = src:test GHCFLAGS = -O2 $(shell grep -q "Arch Linux" /etc/lsb-release && echo -dynamic) HADDOCKFLAGS = --no-print-missing-docs+HUGSIMPORTDIRS = .:./src:./test:./etc/hugs-backports:/usr/lib/hugs/packages/*+HUGSFLAGS = -98 -h32M RUNPARAMETERS = LIB_DEPS = base template-haskell 
README.md view
@@ -17,7 +17,7 @@ building, evaluating, comparing, folding, canonicalizing and matching [`Expr`]s.  See [Express's Haddock documentation] for more details. -This library has been used successfully in the implementation of+This library has been used in the implementation of [Speculate] and [Extrapolate].  @@ -33,6 +33,10 @@ Basics ------ +To import `Express` just:++	> import Data.Express+ For types that are [`Show`] instances, we can use [`val`] to encode values as [`Expr`]s. @@ -137,7 +141,7 @@ Example 3: u-Extrapolate ------------------------ -[u-Extrapolate] is a property-based testing property-based testing library+[u-Extrapolate] is a property-based testing library capable of generalizing counter-examples.  It's implementation has under 40 lines of code.  Besides, using Express to encode expressions, it uses [LeanCheck] for generating test values.@@ -338,8 +342,10 @@  [Express's Haddock documentation]: https://hackage.haskell.org/package/express/docs/Data-Express.html -[`Expr`]:         https://hackage.haskell.org/package/express/docs/Data-Express.html#t:val+[`Expr`]:         https://hackage.haskell.org/package/express/docs/Data-Express.html#t:Expr [`val`]:          https://hackage.haskell.org/package/express/docs/Data-Express.html#v:val+[`value`]:        https://hackage.haskell.org/package/express/docs/Data-Express.html#v:value+[`eval`]:         https://hackage.haskell.org/package/express/docs/Data-Express.html#v:eval [`evaluate`]:     https://hackage.haskell.org/package/express/docs/Data-Express.html#v:evaluate [`:$`]:           https://hackage.haskell.org/package/express-0.1.1/docs/Data-Express.html#v::-36- [`$$`]:           https://hackage.haskell.org/package/express/docs/Data-Express.html#v:-36--36-
eg/u-extrapolate.hs view
@@ -1,6 +1,6 @@ -- u-extrapolate.hs -- micro Extrapolate / Extrapolite ----- Copyright (c) 2019 Rudy Matela.+-- Copyright (c) 2019-2020 Rudy Matela. -- Distributed under the 3-Clause BSD licence (see the file LICENSE). -- -- A small property-based testing library capable of generalizing
eg/u-speculate.hs view
@@ -1,6 +1,6 @@ -- u-extrapolate.hs -- micro Speculate / Speculite ----- Copyright (c) 2019 Rudy Matela.+-- Copyright (c) 2019-2020 Rudy Matela. -- Distributed under the 3-Clause BSD licence (see the file LICENSE). -- -- A small library capable of conjecturing laws about Haskell functions
express.cabal view
@@ -1,6 +1,6 @@ -- Cabal file for express name: express-version: 0.1.2+version: 0.1.3 synopsis: Dynamically-typed expressions involving applications and variables. description:   Express is a library for manipulating dynamically typed Haskell expressions.@@ -31,10 +31,10 @@                   , mk/haskell.mk                   , mk/ghcdeps                   , mk/haddock-i+                  , mk/install-on                   , mk/All.hs                   , mk/Toplibs.hs                   , stack.yaml-                  , stack-lts-11.yaml                   , test/sdist                   , test/model/bench/*.out                   , test/model/eg/*.out@@ -42,7 +42,8 @@                   , bench/runtime/zero/versions                   , bench/runtime/zero/bench/*.runtime                   , bench/runtime/zero/eg/*.runtime-tested-with: GHC==8.6+tested-with: GHC==8.8+           , GHC==8.6            , GHC==8.4            , GHC==8.2            , GHC==8.0@@ -57,7 +58,7 @@ source-repository this   type:           git   location:       https://github.com/rudymatela/express-  tag:            v0.1.2+  tag:            v0.1.3  library   exposed-modules:     Data.Express@@ -87,7 +88,7 @@   main-is:             main.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite core@@ -95,7 +96,7 @@   main-is:             core.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite canon@@ -103,7 +104,7 @@   main-is:             canon.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite hole@@ -111,7 +112,7 @@   main-is:             hole.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite match@@ -119,7 +120,7 @@   main-is:             match.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite map@@ -127,7 +128,7 @@   main-is:             map.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite fixtures@@ -135,7 +136,7 @@   main-is:             fixtures.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite instances@@ -143,7 +144,7 @@   main-is:             instances.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite express-instances@@ -151,7 +152,7 @@   main-is:             express.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite express-derive@@ -159,7 +160,7 @@   main-is:             express-derive.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite ord@@ -167,7 +168,7 @@   main-is:             ord.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite listable@@ -175,7 +176,7 @@   main-is:             listable.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite name@@ -183,7 +184,7 @@   main-is:             name.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite name-derive@@ -191,7 +192,7 @@   main-is:             name-derive.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite fold@@ -199,7 +200,7 @@   main-is:             fold.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite show@@ -207,7 +208,7 @@   main-is:             show.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  test-suite utils@@ -215,7 +216,7 @@   main-is:             utils.hs   hs-source-dirs:      test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  benchmark compare@@ -223,7 +224,7 @@   main-is:             compare.hs   hs-source-dirs:      bench, test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  benchmark pairs@@ -231,7 +232,7 @@   main-is:             pairs.hs   hs-source-dirs:      bench, test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  benchmark tiers@@ -239,19 +240,19 @@   main-is:             tiers.hs   hs-source-dirs:      bench, test   other-modules:       Test, Test.ListableExpr-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  benchmark u-extrapolate   type:                exitcode-stdio-1.0   main-is:             u-extrapolate.hs   hs-source-dirs:      eg-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010  benchmark u-speculate   type:                exitcode-stdio-1.0   main-is:             u-speculate.hs   hs-source-dirs:      eg-  build-depends:       base >= 4 && < 5, express, leancheck >= 0.8+  build-depends:       base >= 4 && < 5, express, leancheck >= 0.9.3   default-language:    Haskell2010
mk/depend.mk view
@@ -165,11 +165,6 @@   src/Data/Express/Canon.hs \   src/Data/Express/Basic.hs \   mk/Toplibs.hs-Setup.o: \-  Setup.hs-Setup: \-  Setup.hs \-  mk/toplibs src/Data/Express/Basic.o: \   src/Data/Express/Utils/Typeable.hs \   src/Data/Express/Utils/String.hs \@@ -307,7 +302,8 @@ src/Data/Express/Utils/TH.o: \   src/Data/Express/Utils/TH.hs src/Data/Express/Utils/Typeable.o: \-  src/Data/Express/Utils/Typeable.hs+  src/Data/Express/Utils/Typeable.hs \+  src/Data/Express/Utils/List.hs test/canon.o: \   test/Test.hs \   test/Test/ListableExpr.hs \
mk/ghcdeps view
@@ -2,7 +2,7 @@ # # ghcdeps: generate Haskell make dependencies for compiling with GHC. #-# Copyright (c) 2015-2019 Rudy Matela.+# Copyright (c) 2015-2020 Rudy Matela. # Distributed under the 3-Clause BSD licence. # # From a list of files provided on standard input,
mk/haddock-i view
@@ -2,7 +2,7 @@ # # haddock-i: list haddock's -i parameters. #-# Copyright (c) 2015-2019 Rudy Matela.+# Copyright (c) 2015-2020 Rudy Matela. # Distributed under the 3-Clause BSD licence. # # $ haddock-i <package1> <package2> ... <packageN>
mk/haskell.mk view
@@ -1,6 +1,6 @@ # Implicit rules for compiling Haskell code. #-# Copyright (c) 2015-2019 Rudy Matela.+# Copyright (c) 2015-2020 Rudy Matela. # Distributed under the 3-Clause BSD licence. # # You can optionally configure the "Configuration variables" below in your main@@ -39,7 +39,7 @@ # ALL_HSS: all Haskell files # You can override ALL/LIB_HSS in your main Makefile LIST_LIB_HSS ?= find src -name "*.hs"-LIST_ALL_HSS ?= find \( -path "./dist" -o -path "./.stack-work" \) -prune \+LIST_ALL_HSS ?= find \( -path "./dist*" -o -path "./.stack-work" -o -path "./Setup.hs" \) -prune \                      -o -name "*.*hs" -print LIB_HSS ?= $(shell $(LIST_LIB_HSS)) ALL_HSS ?= $(shell $(LIST_ALL_HSS))@@ -97,7 +97,7 @@ haddock: doc/index.html  clean-haddock:-	rm -f doc/*.{html,css,js,png,gif,json} doc/src/*.{html,css,js} README.html+	rm -f doc/*.{html,css,js,png,gif,json} doc/src/* README.html  upload-haddock: 	@echo "use \`cabal upload -d' instead"
+ mk/install-on view
@@ -0,0 +1,30 @@+#!/bin/bash+#+# mk/install-on: install or updates the mk folder on a Haskell project+#+# usage: ./mk/install-on path/to/project+#+# This assumes a few things:+#+# * tests are stored in a "test/" folder+# * sources are stored in a "src/" folder+set -e++errxit() {+	echo "$@" > /dev/stderr+	exit 1+}++src=`dirname $0`/..+dst="$1"++[ -n "$dst" ] || errxit "destination folder not provided"++mkdir -p $dst/mk+mkdir -p $dst/test++cp $src/mk/ghcdeps    $dst/mk/ghcdeps+cp $src/mk/haddock-i  $dst/mk/haddock-i+cp $src/mk/haskell.mk $dst/mk/haskell.mk+cp $src/mk/install-on $dst/mk/install-on+cp $src/test/sdist    $dst/test/sdist
src/Data/Express.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Basic.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express.Basic--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Canon.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express.Canon--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Core.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express.Core--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Express.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express.Express--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Express/Derive.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE TemplateHaskell, CPP #-} -- | -- Module      : Data.Express.Express.Derive--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Fixtures.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express.Fixtures--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Fold.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express.Fold--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Hole.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express.Hole--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Instances.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express.Instances--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Map.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express.Map--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Match.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express.Match--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Name.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express.Name--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Name/Derive.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE TemplateHaskell, CPP #-} -- | -- Module      : Data.Express.Name.Derive--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Utils/List.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express.Utils.List--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Utils/String.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express.Utils.String--- Copyright   : (c) 2016-2019 Rudy Matela+-- Copyright   : (c) 2016-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Utils/TH.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE TemplateHaskell, CPP #-} -- | -- Module      : Data.Express.Name.Derive--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
src/Data/Express/Utils/Typeable.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Data.Express.Utils.Typeable--- Copyright   : (c) 2016-2019 Rudy Matela+-- Copyright   : (c) 2016-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
− stack-lts-11.yaml
@@ -1,17 +0,0 @@-# stack.yaml docs:-# https://docs.haskellstack.org/en/stable/yaml_configuration/--# resolver: nightly-2015-09-21-# resolver: ghc-7.10.2-resolver: lts-11.22--packages:-- .--extra-deps:-- leancheck-0.9.1-- speculate-0.3.5--flags: {}--extra-package-dbs: []
stack.yaml view
@@ -1,15 +1,7 @@-# stack.yaml docs:-# https://docs.haskellstack.org/en/stable/yaml_configuration/--# resolver: nightly-2015-09-21-# resolver: ghc-7.10.2-resolver: lts-13.6+resolver: lts-15.5 # or ghc-8.8.3  packages: - . -extra-deps: []--flags: {}--extra-package-dbs: []+extra-deps:+- leancheck-0.9.3
test/Test.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Test--- Copyright   : (c) 2019 Rudy Matela+-- Copyright   : (c) 2019-2020 Rudy Matela -- License     : 3-Clause BSD  (see the file LICENSE) -- Maintainer  : Rudy Matela <rudy@matela.com.br> --
test/canon.hs view
@@ -1,4 +1,5 @@--- Copyright (c) 2017-2018 Rudy Matela.  -- Distributed under the 3-Clause BSD licence (see the file LICENSE).+-- Copyright (c) 2017-2020 Rudy Matela.+-- Distributed under the 3-Clause BSD licence (see the file LICENSE). import Test  main :: IO ()
test/core.hs view
@@ -1,4 +1,5 @@--- Copyright (c) 2019 Rudy Matela.  -- Distributed under the 3-Clause BSD licence (see the file LICENSE).+-- Copyright (c) 2019-2020 Rudy Matela.+-- Distributed under the 3-Clause BSD licence (see the file LICENSE). import Test  import Data.Express.Utils.List
test/express-derive.hs view
@@ -1,4 +1,4 @@--- Copyright (c) 2019 Rudy Matela.+-- Copyright (c) 2019-2020 Rudy Matela. -- Distributed under the 3-Clause BSD licence (see the file LICENSE). {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveDataTypeable #-}
test/express.hs view
@@ -1,4 +1,4 @@--- Copyright (c) 2019 Rudy Matela.+-- Copyright (c) 2019-2020 Rudy Matela. -- Distributed under the 3-Clause BSD licence (see the file LICENSE). {-# LANGUAGE CPP #-} import Test
test/fixtures.hs view
@@ -1,4 +1,4 @@--- Copyright (c) 2017-2018 Rudy Matela.+-- Copyright (c) 2017-2020 Rudy Matela. -- Distributed under the 3-Clause BSD licence (see the file LICENSE). import Test 
test/fold.hs view
@@ -1,4 +1,5 @@--- Copyright (c) 2019 Rudy Matela.  -- Distributed under the 3-Clause BSD licence (see the file LICENSE).+-- Copyright (c) 2019-2020 Rudy Matela.+-- Distributed under the 3-Clause BSD licence (see the file LICENSE). import Test  main :: IO ()
test/hole.hs view
@@ -1,4 +1,4 @@--- Copyright (c) 2019 Rudy Matela.+-- Copyright (c) 2019-2020 Rudy Matela. -- Distributed under the 3-Clause BSD licence (see the file LICENSE). import Test 
test/instances.hs view
@@ -1,4 +1,4 @@--- Copyright (c) 2017-2019 Rudy Matela.+-- Copyright (c) 2017-2020 Rudy Matela. -- Distributed under the 3-Clause BSD licence (see the file LICENSE). {-# LANGUAGE NoMonomorphismRestriction #-} -- ACK! import Test
test/listable.hs view
@@ -1,4 +1,4 @@--- Copyright (c) 2017-2018 Rudy Matela.+-- Copyright (c) 2017-2020 Rudy Matela. -- Distributed under the 3-Clause BSD licence (see the file LICENSE). import Test 
test/main.hs view
@@ -1,4 +1,5 @@--- Copyright (c) 2019 Rudy Matela.  -- Distributed under the 3-Clause BSD licence (see the file LICENSE).+-- Copyright (c) 2019-2020 Rudy Matela.+-- Distributed under the 3-Clause BSD licence (see the file LICENSE). import Test  import Data.Express.Utils.List
test/map.hs view
@@ -1,4 +1,4 @@--- Copyright (c) 2019 Rudy Matela.+-- Copyright (c) 2019-2020 Rudy Matela. -- Distributed under the 3-Clause BSD licence (see the file LICENSE). import Test import Test.LeanCheck.Function
test/match.hs view
@@ -1,4 +1,4 @@--- Copyright (c) 2019 Rudy Matela.+-- Copyright (c) 2019-2020 Rudy Matela. -- Distributed under the 3-Clause BSD licence (see the file LICENSE). import Test 
test/name-derive.hs view
@@ -1,4 +1,4 @@--- Copyright (c) 2019 Rudy Matela.+-- Copyright (c) 2019-2020 Rudy Matela. -- Distributed under the 3-Clause BSD licence (see the file LICENSE). {-# LANGUAGE TemplateHaskell #-} 
test/name.hs view
@@ -1,4 +1,5 @@--- Copyright (c) 2017-2018 Rudy Matela.  -- Distributed under the 3-Clause BSD licence (see the file LICENSE).+-- Copyright (c) 2017-2020 Rudy Matela.+-- Distributed under the 3-Clause BSD licence (see the file LICENSE). import Test  import Data.Express.Utils.List
test/ord.hs view
@@ -1,4 +1,5 @@--- Copyright (c) 2019 Rudy Matela.  -- Distributed under the 3-Clause BSD licence (see the file LICENSE).+-- Copyright (c) 2019-2020 Rudy Matela.+-- Distributed under the 3-Clause BSD licence (see the file LICENSE). import Test  main :: IO ()
test/sdist view
@@ -2,32 +2,39 @@ # # test/sdist: tests the package generated by "cabal sdist". #-# Copyright (c) 2015-2018 Rudy Matela.+# Copyright (c) 2015-2020 Rudy Matela. # Distributed under the 3-Clause BSD licence.++set -xe+ export LC_ALL=C  # consistent sort+ pkgver=` cat *.cabal | grep "^version:" | sed -e "s/version: *//"` pkgname=`cat *.cabal | grep "^name:"    | sed -e "s/name: *//"`-pkg=$pkgname-$pkgver-set -x-cabal sdist &&-cd dist &&-tar -tf $pkg.tar.gz | sort --ignore-case          > ls-cabal-i  &&-tar -tf $pkg.tar.gz | sort --ignore-case --unique > ls-cabal-iu &&-diff -rud ls-cabal-i ls-cabal-iu &&-rm -f ls-cabal ls-cabal-ignore-case &&-if [ -d ../.git ]+pkgbase=$pkgname-$pkgver++cabal sdist++# Try to find the package generated by cabal.+pkg=`find dist* -name $pkgbase.tar.gz`+[ -f "$pkg" ]+# If the script fails here, either:+#   * no package was generated+#   * there are packages in both dist and dist-newstyle folders.++tmp=`mktemp -d /tmp/test-sdist-XXXXXXXXXX`++# Test if our file is compatible with case-insensitive filesystems.+tar -tf $pkg | sort --ignore-case          > $tmp/ls-cabal-i+tar -tf $pkg | sort --ignore-case --unique > $tmp/ls-cabal-iu+diff -rud $tmp/ls-cabal-i $tmp/ls-cabal-iu++if [ -d .git ] then-	# on git repo, test if files are the same-	git -C .. ls-files                                      | sort > ls-git   &&-	tar -tf $pkg.tar.gz | grep -v "/$" | sed -e "s,$pkg/,," | sort > ls-cabal &&-	diff -rud ls-git ls-cabal &&-	rm -f ls-git ls-cabal-else-	# outside of git repo, test build-	rm -rf $pkg/ &&-	tar -xzf $pkg.tar.gz &&-	cd $pkg/ &&-	cabal configure --enable-tests --enable-benchmarks &&-	cabal build &&-	cabal test+	# Test if files included by cabal are the same as files tracked in git.+	git ls-files                                         | sort > $tmp/ls-git+	tar -tf $pkg | grep -v "/$" | sed -e "s,$pkgbase/,," | sort > $tmp/ls-cabal+	diff -rud $tmp/ls-git $tmp/ls-cabal fi++rm -r $tmp
test/show.hs view
@@ -1,4 +1,5 @@--- Copyright (c) 2017-2018 Rudy Matela.  -- Distributed under the 3-Clause BSD licence (see the file LICENSE).+-- Copyright (c) 2017-2020 Rudy Matela.+-- Distributed under the 3-Clause BSD licence (see the file LICENSE). import Test  import Data.Express.Utils.List
test/utils.hs view
@@ -1,4 +1,5 @@--- Copyright (c) 2017-2018 Rudy Matela.  -- Distributed under the 3-Clause BSD licence (see the file LICENSE).+-- Copyright (c) 2017-2020 Rudy Matela.+-- Distributed under the 3-Clause BSD licence (see the file LICENSE). import Test  import Data.Express.Utils.List