Skip to content

Commit e79407e

Browse files
authoredJun 10, 2020
Merge pull request #17 from reflex-frp/rc/0.1.4.1
Release 0.1.4.1
2 parents ea476f4 + 4c45c57 commit e79407e

15 files changed

+134
-193
lines changed
 

‎.travis.yml

+36-36
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
# This Travis job script has been generated by a script via
22
#
3-
# haskell-ci 'reflex-ghci.cabal' '--output' '.travis.yml'
3+
# haskell-ci 'reflex-ghci.cabal'
4+
#
5+
# To regenerate the script (for example after adjusting tested-with) run
6+
#
7+
# haskell-ci regenerate
48
#
59
# For more information, see https://github.com/haskell-CI/haskell-ci
610
#
7-
# version: 0.3.20190814
11+
# version: 0.10.2
812
#
13+
version: ~> 1.0
914
language: c
15+
os: linux
1016
dist: xenial
11-
sudo: required
1217
git:
1318
# whether to recursively clone submodules
1419
submodules: false
1520
cache:
1621
directories:
1722
- $HOME/.cabal/packages
1823
- $HOME/.cabal/store
24+
- $HOME/.hlint
1925
before_cache:
2026
- rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
2127
# remove files that are regenerated by 'cabal update'
@@ -25,13 +31,15 @@ before_cache:
2531
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
2632
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
2733
- rm -rfv $CABALHOME/packages/head.hackage
28-
matrix:
34+
jobs:
2935
include:
3036
- compiler: ghc-8.6.5
31-
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
37+
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.2"]}}
38+
os: linux
3239
before_install:
3340
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
3441
- WITHCOMPILER="-w $HC"
42+
- HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')
3543
- HCPKG="$HC-pkg"
3644
- unset CC
3745
- CABAL=/opt/ghc/bin/cabal
@@ -40,29 +48,8 @@ before_install:
4048
- TOP=$(pwd)
4149
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
4250
- echo $HCNUMVER
43-
- CABAL="$CABAL -vnormal+nowrap+markoutput"
51+
- CABAL="$CABAL -vnormal+nowrap"
4452
- set -o pipefail
45-
- |
46-
echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
47-
echo 'BEGIN { state = "output"; }' >> .colorful.awk
48-
echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
49-
echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
50-
echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
51-
echo ' if (state == "cabal") {' >> .colorful.awk
52-
echo ' print blue($0)' >> .colorful.awk
53-
echo ' } else {' >> .colorful.awk
54-
echo ' print $0' >> .colorful.awk
55-
echo ' }' >> .colorful.awk
56-
echo '}' >> .colorful.awk
57-
- cat .colorful.awk
58-
- |
59-
color_cabal_output () {
60-
awk -f $TOP/.colorful.awk
61-
}
62-
- echo text | color_cabal_output
63-
install:
64-
- ${CABAL} --version
65-
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
6653
- TEST=--enable-tests
6754
- BENCH=--enable-benchmarks
6855
- HEADHACKAGE=false
@@ -83,6 +70,12 @@ install:
8370
echo " prefix: $CABALHOME" >> $CABALHOME/config
8471
echo "repository hackage.haskell.org" >> $CABALHOME/config
8572
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
73+
install:
74+
- ${CABAL} --version
75+
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
76+
- |
77+
echo "program-default-options" >> $CABALHOME/config
78+
echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
8679
- cat $CABALHOME/config
8780
- rm -fv cabal.project cabal.project.local cabal.project.freeze
8881
- travis_retry ${CABAL} v2-update -v
@@ -91,20 +84,22 @@ install:
9184
- touch cabal.project
9285
- |
9386
echo "packages: ." >> cabal.project
87+
- echo 'package reflex-ghci' >> cabal.project
88+
- "echo ' ghc-options: -Werror=missing-methods' >> cabal.project"
9489
- |
9590
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(reflex-ghci)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
9691
- cat cabal.project || true
9792
- cat cabal.project.local || true
9893
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
99-
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
94+
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}
10095
- "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
10196
- rm cabal.project.freeze
102-
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
103-
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
97+
- travis_wait 40 ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
98+
- travis_wait 40 ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all
10499
script:
105100
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
106101
# Packaging...
107-
- ${CABAL} v2-sdist all | color_cabal_output
102+
- ${CABAL} v2-sdist all
108103
# Unpacking...
109104
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
110105
- cd ${DISTDIR} || false
@@ -116,23 +111,28 @@ script:
116111
- touch cabal.project
117112
- |
118113
echo "packages: ${PKGDIR_reflex_ghci}" >> cabal.project
114+
- echo 'package reflex-ghci' >> cabal.project
115+
- "echo ' ghc-options: -Werror=missing-methods' >> cabal.project"
119116
- |
120117
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(reflex-ghci)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
121118
- cat cabal.project || true
122119
- cat cabal.project.local || true
123120
# Building...
124121
# this builds all libraries and executables (without tests/benchmarks)
125-
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
122+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
126123
# Building with tests and benchmarks...
127124
# build & run tests, build benchmarks
128-
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
125+
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all
126+
# Testing...
127+
- export PATH="$(dirname "$HC"):$PATH" # MANUAL ADDITION
128+
- (cd ${PKGDIR_reflex_ghci} && ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all) # MANUAL MODIFICATION
129129
# cabal check...
130130
- (cd ${PKGDIR_reflex_ghci} && ${CABAL} -vnormal check)
131131
# haddock...
132-
- ${CABAL} v2-haddock $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
132+
- ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all
133133
# Building without installed constraints for packages in global-db...
134134
- rm -f cabal.project.local
135-
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
135+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
136136

137-
# REGENDATA ["reflex-ghci.cabal","--output",".travis.yml"]
137+
# REGENDATA ("0.10.2",["reflex-ghci.cabal"])
138138
# EOF

‎ChangeLog.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Revision history for reflex-ghci
22

3+
## 0.1.4.1
4+
5+
* Library: Require at least version 0.7.1 of `reflex`.
6+
* Library: Require at least version 0.3 of `reflex-process`.
7+
* Library: Expand version bounds for `regex-tdfa` and `vty`.
8+
* Tests: Include test fixtures in sdist.
9+
* Tests: Fix some bugs.
10+
311
## 0.1.4.0
412

513
* Library: Export `shutdown` and `getExitEvent` to make it easier for library users to cleanly exit

‎README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,18 @@ This package includes a [reflex-vty](https://github.com/reflex-frp/reflex-vty)-b
2020

2121
```bash
2222
$ reflex-ghci -h
23-
Welcome to reflex-ghci!
23+
Welcome to reflex-ghci 0.1.4.0
2424

25-
Usage: <interactive> [-c|--command COMMAND] [-e|--expression EXPR]
25+
Usage: reflex-ghci [-c|--command COMMAND] [-e|--expression EXPR]
2626
Run a Haskell REPL that automatically reloads when source files change.
2727

2828
Available options:
2929
-c,--command COMMAND The ghci/cabal repl command to
30-
run (default: "cabal repl")
30+
run (default: "cabal repl --repl-options=-Wall")
3131
-e,--expression EXPR The optional expression to evaluate once modules have
32-
successfully loaded (default: no expression)
32+
successfully loaded
3333
-h,--help Show this help text
34+
3435
```
3536

3637
Acknowledgements

‎default.nix

+11-30
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,11 @@
1-
{ mkDerivation, base, bytestring, dependent-sum, directory
2-
, filepath, fsnotify, mtl, optparse-applicative, primitive, process
3-
, ref-tf, reflex, reflex-fsnotify, reflex-process, reflex-vty
4-
, regex-tdfa, stdenv, temporary, text, unix, vty, which
5-
, ghc
6-
}:
7-
mkDerivation {
8-
pname = "reflex-ghci";
9-
version = "0.1.4.0";
10-
src = ./.;
11-
isLibrary = true;
12-
isExecutable = true;
13-
libraryHaskellDepends = [
14-
base bytestring directory filepath fsnotify process reflex
15-
reflex-fsnotify reflex-process reflex-vty regex-tdfa text unix vty
16-
];
17-
executableHaskellDepends = [
18-
base optparse-applicative process reflex reflex-process reflex-vty
19-
text vty
20-
];
21-
testHaskellDepends = [
22-
base bytestring dependent-sum directory mtl primitive process
23-
ref-tf reflex reflex-process reflex-vty temporary text which
24-
];
25-
testToolDepends = [
26-
ghc
27-
];
28-
description = "A GHCi widget library for use in reflex applications";
29-
license = stdenv.lib.licenses.bsd3;
30-
}
1+
{ callCabal2nix }:
2+
let
3+
src = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
4+
"release.nix"
5+
".git"
6+
"dist"
7+
"dist-newstyle"
8+
"cabal.project"
9+
".travis.yml"
10+
])) ./.;
11+
in callCabal2nix "reflex-ghci" src {}

‎reflex-ghci.cabal

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
cabal-version: >=1.10
1+
cabal-version: 2.4
22
name: reflex-ghci
3-
version: 0.1.4.0
3+
version: 0.1.4.1
44
synopsis: A GHCi widget library for use in reflex applications
55
description:
66
Run GHCi from within a reflex application and interact with it using a functional-reactive interface.
77
.
88
<<https://i.imgur.com/5y61Qx7.png>>
99
.
1010
bug-reports: https://github.com/reflex-frp/reflex-ghci/issues
11-
license: BSD3
11+
license: BSD-3-Clause
1212
license-file: LICENSE
1313
author: Obsidian Systems LLC
1414
maintainer: maintainer@obsidian.systems
@@ -18,6 +18,8 @@ build-type: Simple
1818
extra-source-files: ChangeLog.md
1919
README.md
2020
screenshot.png
21+
tests/**/*.hs
22+
tests/**/*.cabal
2123
tested-with: GHC ==8.6.5
2224

2325
library
@@ -31,14 +33,14 @@ library
3133
, filepath >= 1.4 && < 1.5
3234
, fsnotify >= 0.3 && < 0.4
3335
, process >= 1.6 && < 1.7
34-
, reflex >= 0.6.3 && < 0.7
36+
, reflex >= 0.7.1.0 && < 0.8
3537
, reflex-fsnotify >= 0.2 && < 0.3
36-
, reflex-process >= 0.2.1 && < 0.3
37-
, regex-tdfa >= 1.2.3 && < 1.3
38+
, reflex-process >= 0.3 && < 0.4
39+
, regex-tdfa >= 1.2.3 && < 1.4
3840
, reflex-vty >= 0.1.3 && < 0.2
3941
, text >= 1.2 && < 1.3
4042
, unix >= 2.7 && < 2.8
41-
, vty >= 5.25 && < 5.26
43+
, vty >=5.21 && <5.29
4244
hs-source-dirs: src
4345
default-language: Haskell2010
4446
ghc-options: -Wall
@@ -50,12 +52,13 @@ executable reflex-ghci
5052
base
5153
, optparse-applicative >= 0.14.0 && < 0.16
5254
, process
53-
, reflex
55+
, reflex >= 0.7.1.0
5456
, reflex-ghci
5557
, reflex-vty
5658
, reflex-process
5759
, text
5860
, vty
61+
autogen-modules: Paths_reflex_ghci
5962
other-modules: Paths_reflex_ghci
6063
ghc-options: -threaded -rtsopts
6164
default-language: Haskell2010
@@ -70,7 +73,7 @@ test-suite test
7073
, dependent-sum >= 0.6 && < 0.7
7174
, directory
7275
, mtl >= 2.2 && < 2.3
73-
, primitive >= 0.6.4 && < 0.7
76+
, primitive >= 0.6.4 && < 0.8
7477
, process
7578
, ref-tf >= 0.4 && < 0.5
7679
, reflex
@@ -79,7 +82,6 @@ test-suite test
7982
, reflex-vty
8083
, temporary >= 1.3 && < 1.4
8184
, text
82-
other-modules: HeadlessHost
8385
ghc-options: -threaded -rtsopts
8486
default-language: Haskell2010
8587

‎reflex-platform/default.nix

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
11
# 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-
))
2+
import (import ./thunk.nix)

‎reflex-platform/github.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"owner": "reflex-frp",
33
"repo": "reflex-platform",
4-
"branch": "aa-bump-reflex-process",
5-
"rev": "22f8ea48c15d2be6af6808826a63c6b03eb672c8",
6-
"sha256": "08i6wvgwcmnlnncq66hjhagk45kyiy5ldi15vfm007fvv1kgnamm"
4+
"branch": "master",
5+
"private": false,
6+
"rev": "c13cb19f49c8093de4718d2aced1930128476cfa",
7+
"sha256": "0v87ilal9355xwz8y9m0zh14pm9c0f7pqch0854kkj92ybc5l62q"
78
}

‎reflex-platform/thunk.nix

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# DO NOT HAND-EDIT THIS FILE
2+
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3+
if !fetchSubmodules && !private then builtins.fetchTarball {
4+
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5+
} else (import <nixpkgs> {}).fetchFromGitHub {
6+
inherit owner repo rev sha256 fetchSubmodules private;
7+
};
8+
json = builtins.fromJSON (builtins.readFile ./github.json);
9+
in fetch json

‎release.nix

+30-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
1-
{ p ? import ./reflex-platform {}
1+
{ reflex-platform-fun ? import ./reflex-platform
22
}:
3-
let
4-
inherit (p.nixpkgs) lib;
5-
in p.ghc.callPackage ./. {}
3+
(reflex-platform-fun {
4+
haskellOverlaysPost = [
5+
(self: super: {
6+
reflex = self.callHackageDirect {
7+
pkg = "reflex";
8+
ver = "0.7.1.0";
9+
sha256 = "0a933xz7yl931m90bbwi9akfz77q6px36grlx6wba55mn1klpn27";
10+
} {};
11+
12+
reflex-fsnotify = self.callHackageDirect {
13+
pkg = "reflex-fsnotify";
14+
ver = "0.2.1.1";
15+
sha256 = "1snbvf8z942fpb0r5spaxcdc036v6b1akgdscpfghz81bdvcxy8i";
16+
} {};
17+
18+
reflex-process = self.callHackageDirect {
19+
pkg = "reflex-process";
20+
ver = "0.3.0.0";
21+
sha256 = "0xx8gzs7c60zh8rj794hyisljp0gwb26m34ns8z9xgp1k8jgkdgj";
22+
} {};
23+
24+
reflex-vty = self.callHackageDirect {
25+
pkg = "reflex-vty";
26+
ver = "0.1.4.0";
27+
sha256 = "0djs7y4mmkb2q5hvp1fr1gn81k08hzab8v3c6qvh7nyn1fdh8zvh";
28+
} {};
29+
})
30+
];
31+
}).ghc.callPackage ./default.nix {}

0 commit comments

Comments
 (0)
Please sign in to comment.