on develop help sign in
Merge pull request #2 from reflex-frp/aa-travis
a1691bbAli Abrar
.travis.ymlnew file+109
@@ -0,0 +1,109 @@
1+# This Travis job script has been generated by a script via
2+#
3+# haskell-ci 'reflex-vty.cabal' '--output' '.travis.yml'
4+#
5+# For more information, see https://github.com/haskell-CI/haskell-ci
6+#
7+# version: 0.3
8+#
9+language: c
10+dist: xenial
11+
12+git:
13+ submodules: false # whether to recursively clone submodules
14+
15+cache:
16+ directories:
17+ - $HOME/.cabal/packages
18+ - $HOME/.cabal/store
19+
20+before_cache:
21+ - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
22+ # remove files that are regenerated by 'cabal update'
23+ - rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*
24+ - rm -fv $CABALHOME/packages/hackage.haskell.org/*.json
25+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
26+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
27+ - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
28+
29+ - rm -rfv $CABALHOME/packages/head.hackage
30+
31+matrix:
32+ include:
33+ - compiler: "ghc-8.6.5"
34+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.5], sources: [hvr-ghc]}}
35+ - compiler: "ghc-8.4.4"
36+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
37+
38+before_install:
39+ - HC=/opt/ghc/bin/${CC}
40+ - HCPKG=${HC/ghc/ghc-pkg}
41+ - unset CC
42+ - CABAL=/opt/ghc/bin/cabal
43+ - CABALHOME=$HOME/.cabal
44+ - export PATH="$CABALHOME/bin:$PATH"
45+ - ROOTDIR=$(pwd)
46+ - HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
47+ - echo $HCNUMVER
48+
49+install:
50+ - ${CABAL} --version
51+ - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
52+ - TEST=--enable-tests
53+ - BENCH=--enable-benchmarks
54+ - GHCHEAD=${GHCHEAD-false}
55+ - travis_retry ${CABAL} update -v
56+ - sed -i.bak 's/^jobs:/-- jobs:/' $CABALHOME/config
57+ - rm -fv cabal.project cabal.project.local
58+ - grep -Ev -- '^\s*--' $CABALHOME/config | grep -Ev '^\s*$'
59+ - rm -f cabal.project
60+ - touch cabal.project
61+ - "printf 'packages: \".\"\\n' >> cabal.project"
62+ - "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
63+ - touch cabal.project.local
64+ - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(reflex-vty)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
65+ - cat cabal.project || true
66+ - cat cabal.project.local || true
67+ - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
68+ - rm -f cabal.project.freeze
69+ - ${CABAL} new-freeze -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dry
70+ - "cat \"cabal.project.freeze\" | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
71+ - rm "cabal.project.freeze"
72+ - ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all
73+ - ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all
74+ - rm -rf .ghc.environment.* "."/dist
75+ - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
76+
77+# Here starts the actual work to be performed for the package under test;
78+# any command which exits with a non-zero exit code causes the build to fail.
79+script:
80+ # test that source-distributions can be generated
81+ - ${CABAL} new-sdist all
82+ - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
83+ - cd ${DISTDIR} || false
84+ - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
85+ - rm -f cabal.project
86+ - touch cabal.project
87+ - "printf 'packages: \"reflex-vty-*/*.cabal\"\\n' >> cabal.project"
88+ - "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
89+ - touch cabal.project.local
90+ - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(reflex-vty)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
91+ - cat cabal.project || true
92+ - cat cabal.project.local || true
93+ # this builds all libraries and executables (without tests/benchmarks)
94+ - ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks all
95+
96+ # build & run tests, build benchmarks
97+ - ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} all
98+
99+ # cabal check
100+ - (cd reflex-vty-* && ${CABAL} check)
101+
102+ # haddock
103+ - ${CABAL} new-haddock -w ${HC} ${TEST} ${BENCH} all
104+
105+ # Build without installed constraints for packages in global-db
106+ - rm -f cabal.project.local; ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks all
107+
108+# REGENDATA ["reflex-vty.cabal","--output",".travis.yml"]
109+# EOF
ChangeLog.md+5
@@ -1,5 +1,10 @@
1# Revision history for reflex-vty
1# Revision history for reflex-vty
2
2
3+## 0.1.1.0
4+
5+* Set version bounds in cabal file
6+* Add travis CI config
7+
3## 0.1.0.0
8## 0.1.0.0
4
9
5* Initial release
10* Initial release
README.md+16−1
@@ -1,4 +1,4 @@
1−# reflex-vty ![hackage](https://img.shields.io/hackage/v/reflex-vty.svg)
1+# reflex-vty ![hackage](https://img.shields.io/hackage/v/reflex-vty.svg) ![travis](https://api.travis-ci.org/reflex-frp/reflex-vty.svg?branch=develop)
2
2
3## A library for building functional reactive terminal applications
3## A library for building functional reactive terminal applications
4
4
@@ -25,3 +25,18 @@ From within the nix-shell you can:
25* Build the docs: `cabal haddock`
25* Build the docs: `cabal haddock`
26* Run ghcid for immediate compiler feedback when you save a .hs file: `ghcid -c "cabal repl reflex-vty --ghc-options=-Wall"`
26* Run ghcid for immediate compiler feedback when you save a .hs file: `ghcid -c "cabal repl reflex-vty --ghc-options=-Wall"`
27* etc.
27* etc.
28+
29+#### With cabal
30+
31+Please see the `tested-with` field of the cabal file for known-compatible versions of GHC.
32+
33+From the reflex-vty project directory:
34+
35+```bash
36+cabal new-configure
37+cabal new-build # to build the library and example
38+cabal new-repl # to enter a repl for the library
39+cabal new-repl example # to enter a repl for the example executable
40+```
41+
42+
reflex-platform/github.jsondeleted−7
@@ -1,7 +0,0 @@
1−{
2− "owner": "reflex-frp",
3− "repo": "reflex-platform",
4− "branch": "develop",
5− "rev": "51e02339704b7502e63bccf10a72fa4dda744b17",
6− "sha256": "1mkimidf755968xzbm3z222xgpdvgg6xmmrfppv1hw0rap5w53iw"
7−}
reflex-platform/default.nix → reflex-platform/stable/default.nixrenamed

The content is the same.

reflex-platform/stable/github.jsonnew file+7
@@ -0,0 +1,7 @@
1+{
2+ "owner": "reflex-frp",
3+ "repo": "reflex-platform",
4+ "branch": "master",
5+ "rev": "04672fbd55bb6d97d4efcc3657af9f4bc0d1215d",
6+ "sha256": "1xzvjzrclh1qvw7ccnpwdhpg534ghyfg4kz1zdy063wr50hsqgna"
7+}
reflex-platform/unstable/default.nixnew file+7
@@ -0,0 +1,7 @@
1+# DO NOT HAND-EDIT THIS FILE
2+import ((import <nixpkgs> {}).fetchFromGitHub (
3+ let json = builtins.fromJSON (builtins.readFile ./github.json);
4+ in { inherit (json) owner repo rev sha256;
5+ private = json.private or false;
6+ }
7+))
reflex-platform/unstable/github.jsonnew file+7
@@ -0,0 +1,7 @@
1+{
2+ "owner": "reflex-frp",
3+ "repo": "reflex-platform",
4+ "branch": "ghc865-nixpkgs1903",
5+ "rev": "33907557fad929a19cd82df44bb4cd0276e1ffa5",
6+ "sha256": "1066pydpk7w8yhq9nlcv2r21zmiir7nr6c4hr10gdf6ar3vs965a"
7+}
reflex-vty.cabal+18−17
@@ -1,5 +1,5 @@
1name: reflex-vty
1name: reflex-vty
2−version: 0.1.0.0
2+version: 0.1.1.0
3synopsis: Reflex FRP host and widgets for vty applications
3synopsis: Reflex FRP host and widgets for vty applications
4description:
4description:
5 Host and widget library for Reflex-based FRP applications
5 Host and widget library for Reflex-based FRP applications
@@ -17,6 +17,7 @@ extra-source-files: README.md
17 ChangeLog.md
17 ChangeLog.md
18extra-doc-files: doc/welcome.gif
18extra-doc-files: doc/welcome.gif
19 , doc/tasks.png
19 , doc/tasks.png
20+tested-with: GHC ==8.6.5 || ==8.4.4
20
21
21library
22library
22 exposed-modules: Reflex.Vty
23 exposed-modules: Reflex.Vty
@@ -30,22 +31,22 @@ library
30 , Reflex.Spider.Orphans
31 , Reflex.Spider.Orphans
31 , Control.Monad.NodeId
32 , Control.Monad.NodeId
32 build-depends:
33 build-depends:
33− base <= 4.13,
34+ base >= 4.11.0 && < 4.13,
34− bimap,
35+ bimap >= 0.3.3 && < 0.4,
35− containers,
36+ containers >= 0.5.0 && < 0.7,
37+ mtl >= 2.2.2 && < 2.3,
38+ transformers >= 0.5.5 && < 0.6,
39+ stm >= 2.4 && < 2.6,
36− data-default,
40+ data-default >= 0.7.1 && < 0.8,
37− dependent-map,
41+ dependent-map >= 0.2.4 && < 0.4,
42+ text >= 1.2.3 && < 1.3,
38− dependent-sum,
43+ dependent-sum >= 0.3 && < 0.7,
39− exception-transformers,
44+ exception-transformers >= 0.4.0 && < 0.5,
40− mtl,
41− primitive,
45+ primitive >= 0.6.3 && < 0.7,
42− ref-tf,
46+ ref-tf >= 0.4.0 && < 0.5,
43− reflex >= 0.6.1,
47+ reflex >= 0.6 && < 0.7,
44− stm,
45− text,
46− time,
48+ time >= 1.8.0 && < 1.9,
47− transformers,
48− vty
49+ vty >= 5.21 && < 5.26
49 hs-source-dirs: src
50 hs-source-dirs: src
50 default-language: Haskell2010
51 default-language: Haskell2010
51 ghc-options: -Wall
52 ghc-options: -Wall
release.nix+6−2
@@ -1,2 +1,6 @@
1−{ rp ? import ./reflex-platform {}
1+{ p ? import ./reflex-platform/stable {}
2+}:
3+let
4+ inherit (p.nixpkgs) lib;
5+ platforms = p.thunkSet ./reflex-platform;
2−}: rp.ghc.callCabal2nix "reflex-vty" ./. {}
6+in (lib.mapAttrs (name: platform: (import platform {}).ghc.callCabal2nix "reflex-vty" ./. {})) platforms