on ccbdb4b help sign in
10 files changed+83−155
since splitsnapshots
unifiedsplit
.travis.yml+14−23 INSTALL.md+2−11 idris.cabal+15−31 src/Idris/Parser/Stack.hs+1−14 stack-11.22.yaml−21 stack-12.26.yaml−20 stack-15.3.yaml−17 stack-15.4.yaml−17 stack-alt.yaml+25 stack.yaml+26−1
.travis.yml+14−23
@@ -8,7 +8,7 @@ env:
88
99matrix:
1010 include:
11− - env: CABALVER="2.4" GHCVER="8.6.5" STACKVER="15.4" STYLISH=YES
11+ - env: CABALVER="2.4" GHCVER="8.6.5" STACKVER="14.15" STYLISH=YES
1212 addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.5,hscolour], sources: [hvr-ghc]}}
1313 - env: CABALVER="2.4" GHCVER="8.2.2" TESTS="lib_doc doc"
1414 compiler: ": #GHC 8.2.2"
@@ -19,26 +19,18 @@ matrix:
1919 - env: CABALVER="2.4" GHCVER="8.2.2" TESTS="test_c"
2020 compiler: ": #GHC 8.2.2"
2121 addons: {apt: {packages: [cabal-install-2.4,ghc-8.2.2,cppcheck,hscolour], sources: [hvr-ghc]}}
22− - env: CABALVER="2.4" GHCVER="8.4.4" TESTS="lib_doc doc"
23− compiler: ": #GHC 8.4.4"
24− addons: {apt: {packages: [cabal-install-2.4,ghc-8.4.4,cppcheck,hscolour], sources: [hvr-ghc]}}
25− - env: CABALVER="2.4" GHCVER="8.4.4" TESTS="test_js"
26− compiler: ": #GHC 8.4.4"
27− addons: {apt: {packages: [cabal-install-2.4,ghc-8.4.4,cppcheck,hscolour], sources: [hvr-ghc]}}
28− - env: CABALVER="2.4" GHCVER="8.4.4" TESTS="test_c"
29− compiler: ": #GHC 8.4.4"
30− addons: {apt: {packages: [cabal-install-2.4,ghc-8.4.4,cppcheck,hscolour], sources: [hvr-ghc]}}
31− - env: CABALVER="3.0" GHCVER="8.8.3" TESTS="lib_doc doc"
32− compiler: ": #GHC 8.8.3"
33− addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}}
34− - env: CABALVER="3.0" GHCVER="8.8.3" TESTS="test_js"
35− compiler: ": #GHC 8.8.3"
36− addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}}
37− - env: CABALVER="3.0" GHCVER="8.8.3" TESTS="test_c"
38− compiler: ": #GHC 8.8.3"
39− addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}}
40− - env: CABALVER="3.0" GHCVER="8.8.3" IDRIS2=YES
41− addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3], sources: [hvr-ghc]}}
22+ - env: CABALVER="3.0" GHCVER="8.8.2" IDRIS2=YES
23+ addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.2], sources: [hvr-ghc]}}
24+
25+# - env: CABALVER="3.0" GHCVER="8.8.1" TESTS="lib_doc doc"
26+# compiler: ": #GHC 8.8.1"
27+# addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.1,cppcheck,hscolour], sources: [hvr-ghc]}}
28+# - env: CABALVER="3.0" GHCVER="8.8.1" TESTS="test_js"
29+# compiler: ": #GHC 8.8.1"
30+# addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.1,cppcheck,hscolour], sources: [hvr-ghc]}}
31+# - env: CABALVER="3.0" GHCVER="8.8.1" TESTS="test_c"
32+# compiler: ": #GHC 8.8.1"
33+# addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.1,cppcheck,hscolour], sources: [hvr-ghc]}}
4234 fast-finish: true
4335
4436cache:
@@ -127,7 +119,7 @@ install:
127119 cp -a $HOME/.ghc $HOME/.cabsnap/ghc;
128120 cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;
129121 fi
130−
122+
131123
132124before_script:
133125 - ORIGINAL_DIR=$(pwd)
@@ -136,7 +128,6 @@ before_script:
136128 - tar -xf ${ORIGINAL_DIR}/dist/${PKGNAME}*.tar.gz
137129 - cd ${PKGNAME}*
138130script:
139− - export LD_PRELOAD=/opt/ghc/${GHCVER}/lib/ghc-${GHCVER}/rts/libffi.so.7
140131###
141132 - echo 'Configure...' && echo -en 'travis_fold:start:script.configure\\r'
142133 - cabal v1-configure -f FFI -f CI --enable-tests
INSTALL.md+2−11
@@ -130,8 +130,7 @@ PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig stack build
130130## Issue with GHC on Ubuntu/Fedora
131131
132132There is an upstream issue with GHC on some Ubuntu and Fedora machines.
133−The issue is that for GHC versions greater than 8.4.X linking to libFFI uses the version of libFFI shipped with GHC, instead of the system version.
134−
133+The issue is that for GHC versions greater than 8.4.X linking to libFFI is broken.
135134See the following GHC issue page for more information:
136135
137136 <https://gitlab.haskell.org/ghc/ghc/issues/15397>
@@ -142,12 +141,4 @@ Specifically, one will see an error message along the lines of:
142141
143142> error while loading shared libraries: libffi.so.7: cannot open shared object file: No such file or directory
144143
145−A workround for this bug is to override the used libffi version (this is what we use on CI):
146−
147−```bash
148−export LD_PRELOAD=/opt/ghc/${GHCVER}/lib/ghc-${GHCVER}/rts/libffi.so.7
149−```
150−
151−## GHC 8.6
152−
153−For reasons that haven't been investigated building the Idris compiler with GHC 8.6 leads to a compiler which doesn't pass test.
144+We have supplied an alternative stack configuration file (`stack-alt.yaml`) that will use a version of GHC prior to the upstream issue being introduced.
idris.cabal+15−31
@@ -46,19 +46,12 @@ Build-type: Custom
4646
4747Tested-With: GHC == 7.10.3, GHC == 8.0.1
4848
49−-- NOTE: due to https://github.com/haskell/cabal/issues/6125 the use of ** is
50−-- heavily discouraged.
5149Data-files: idrisdoc/styles.css
52− jsrts/jsbn/*.js
53− jsrts/*.js
50+ jsrts/**/*.js
5451 jsrts/jsbn/LICENSE
5552 rts/Makefile
56− rts/*.c
57− rts/seL4/*.c
58− rts/arduino/*.c
59− rts/windows/*.c
60− rts/windows/*.h
61− rts/*.h
53+ rts/**/*.c
54+ rts/**/*.h
6255 rts/seL4/CMakeLists.txt
6356 rts/seL4/README.md
6457
@@ -71,13 +64,8 @@ Extra-doc-files:
7164 RELEASE-CHECKS.md
7265 idris-tutorial.pdf
7366 man/idris.1
74− samples/effects/*.idr
75− samples/misc/*.idr
76− samples/tutorial/*.idr
77− samples/ST/*.idr
78− samples/ST/Graphics/*.idr
79− samples/ST/Net/*.idr
80− samples/misc/*.lidr
67+ samples/**/*.idr
68+ samples/**/*.lidr
8169
8270-- extra-source-files is generated by Setup.hs using `git --ls-files`.
8371Extra-source-files:
@@ -85,20 +73,15 @@ Extra-source-files:
8573 config.mk
8674 custom.mk-alldeps
8775 mkpkg.sh
76+ stack-alt.yaml
8877 stack-shell.nix
8978 stack.yaml
9079 stylize.sh
9180 win-release.sh
92−
81+
9382 benchmarks/*.pl
94− benchmarks/fasta/*.idr
95− benchmarks/fasta/*.ipkg
96− benchmarks/pidigits/*.idr
97− benchmarks/pidigits/*.ipkg
98− benchmarks/quasigroups/*.idr
99− benchmarks/quasigroups/*.ipkg
100− benchmarks/trivial/*.idr
101− benchmarks/trivial/*.ipkg
83+ benchmarks/**/*.idr
84+ benchmarks/**/*.ipkg
10285 benchmarks/quasigroups/board
10386
10487 icons/*.png
@@ -321,13 +304,13 @@ Library
321304 Build-depends: base >=4 && <5
322305 , aeson >= 0.6 && < 1.5
323306 , annotated-wl-pprint >= 0.7 && < 0.8
324− , ansi-terminal < 0.11
307+ , ansi-terminal < 0.10
325308 , ansi-wl-pprint < 0.7
326309 , array >= 0.4.0.1 && < 0.6
327310 , base64-bytestring < 1.1
328311 , binary >= 0.8.4.1 && < 0.9
329312 , blaze-html >= 0.6.1.3 && < 0.10
330− , blaze-markup >= 0.5.2.1 && < 0.10
313+ , blaze-markup >= 0.5.2.1 && < 0.9
331314 , bytestring < 0.11
332315 , cheapskate >= 0.1.1.2 && < 0.2
333316 , code-page >= 0.1 && < 0.3
@@ -338,9 +321,9 @@ Library
338321 , fingertree >= 0.1.4.1 && < 0.2
339322 , haskeline >= 0.7 && < 0.8
340323 , ieee754 >= 0.7 && < 0.9
341− , megaparsec >= 7.0.4 && < 9
324+ , megaparsec >= 7.0.4 && < 8
342325 , mtl >= 2.1 && < 2.3
343− , network >= 2.7 && < 3.1.2
326+ , network >= 2.7 && < 2.9
344327 , optparse-applicative >= 0.13 && < 0.16
345328 , parser-combinators >= 1.0.0
346329 , pretty < 1.2
@@ -358,7 +341,7 @@ Library
358341 , vector < 0.13
359342 , vector-binary-instances < 0.3
360343 , zip-archive > 0.2.3.5 && < 0.5
361− , fsnotify >= 0.2 && < 0.4
344+ , fsnotify >= 0.2 && < 2.2
362345 , async < 2.3
363346
364347 if !impl(ghc >= 8.0)
@@ -476,3 +459,4 @@ Executable idris-codegen-node
476459 Default-Language: Haskell2010
477460 ghc-prof-options: -auto-all -caf-all
478461 ghc-options: -threaded -rtsopts -funbox-strict-fields
462+
src/Idris/Parser/Stack.hs+1−14
@@ -5,7 +5,7 @@ Description : Idris parser stack and its primitives.
55License : BSD3
66Maintainer : The Idris Community.
77-}
8−{-# LANGUAGE CPP, ConstraintKinds, FlexibleContexts, MultiParamTypeClasses #-}
8+{-# LANGUAGE ConstraintKinds, FlexibleContexts, MultiParamTypeClasses #-}
99module Idris.Parser.Stack
1010 ( -- * Parsing
1111 Parser(..)
@@ -77,20 +77,11 @@ parseErrorOffset = P.errorOffset . parseError
7777instance Message ParseError where
7878 messageExtent err = sourcePositionFC pos
7979 where
80−#if MIN_VERSION_megaparsec(8,0,0)
81− P.PosState {P.pstateSourcePos = pos} =
82− P.reachOffsetNoLine (parseErrorOffset err) (parseErrorPosState err)
83−#else
8480 (pos, _) = P.reachOffsetNoLine (parseErrorOffset err) (parseErrorPosState err)
85−#endif
8681 messageText = PP.text . init . P.parseErrorTextPretty . parseError
8782 messageSource err = Just sline
8883 where
89−#if MIN_VERSION_megaparsec(8,0,0)
90− (sline, _) = P.reachOffset (parseErrorOffset err) (parseErrorPosState err)
91−#else
9284 (_, sline, _) = P.reachOffset (parseErrorOffset err) (parseErrorPosState err)
93−#endif
9485
9586-- | A fully formatted parse error, with caret and bar, etc.
9687prettyError :: ParseError -> String
@@ -98,11 +89,7 @@ prettyError = P.errorBundlePretty . unParseError
9889
9990{- * Mark and restore -}
10091
101−#if MIN_VERSION_megaparsec(8,0,0)
102−type Mark = P.State String Void
103−#else
10492type Mark = P.State String
105−#endif
10693
10794-- | Retrieve the parser state so we can restart from this point later.
10895mark :: Parsing m => m Mark
stack-11.22.yamldeleted−21
@@ -1,21 +0,0 @@
1−#recheck extra-deps next on resolver or cabal file change
2−resolver: lts-11.22
3−
4−extra-deps:
5−- cheapskate-0.1.1.2
6−- megaparsec-7.0.5
7−- Cabal-2.4.1.0
8−- network-3.1.1.1
9−- parser-combinators-1.0.0
10−
11−flags:
12− idris:
13− FFI: true
14− GMP: true
15−
16−ghc-options:
17− idris: -fwarn-unused-imports -fwarn-unused-binds
18−
19−nix:
20− enable: false
21− shell-file: stack-shell.nix
stack-12.26.yamldeleted−20
@@ -1,20 +0,0 @@
1−#recheck extra-deps next on resolver or cabal file change
2−resolver: lts-12.26
3−
4−extra-deps:
5−- cheapskate-0.1.1.2
6−- megaparsec-7.0.5
7−- Cabal-2.4.1.0
8−- network-3.1.1.1
9−
10−flags:
11− idris:
12− FFI: true
13− GMP: true
14−
15−ghc-options:
16− idris: -fwarn-unused-imports -fwarn-unused-binds
17−
18−nix:
19− enable: false
20− shell-file: stack-shell.nix
stack-15.3.yamldeleted−17
@@ -1,17 +0,0 @@
1−#recheck extra-deps next on resolver or cabal file change
2−resolver: lts-15.3
3−
4−extra-deps:
5−- cheapskate-0.1.1.2
6−
7−flags:
8− idris:
9− FFI: true
10− GMP: true
11−
12−ghc-options:
13− idris: -fwarn-unused-imports -fwarn-unused-binds
14−
15−nix:
16− enable: false
17− shell-file: stack-shell.nix
stack-15.4.yamldeleted−17
@@ -1,17 +0,0 @@
1−#recheck extra-deps next on resolver or cabal file change
2−resolver: lts-15.4
3−
4−extra-deps:
5−- cheapskate-0.1.1.2
6−
7−flags:
8− idris:
9− FFI: true
10− GMP: true
11−
12−ghc-options:
13− idris: -fwarn-unused-imports -fwarn-unused-binds
14−
15−nix:
16− enable: false
17− shell-file: stack-shell.nix
stack-alt.yamlnew file+25
@@ -0,0 +1,25 @@
1+#recheck extra-deps next on resolver or cabal file change
2+resolver: lts-11.4
3+
4+packages:
5+ - location: .
6+
7+extra-deps:
8+ - network-2.8.0.0@sha256:aae171e6c6028a7791dbe4de5b9d2da398056359e3cc7927465ffa3cdae1aa0b
9+ - Cabal-2.2.0.1@sha256:2a80d8fb655474f0eaeb20434c47f64f84e6302e55973056f00df8ca050b9683
10+ - megaparsec-7.0.4
11+ - parser-combinators-1.0.0
12+ - zip-archive-0.3.3@sha256:47cf2d66cc8e237f7226837758e1b041e24048ef3820d3d10276c500edb921bf
13+ - containers-0.5.11.0@sha256:28ad7337057442f75bc689315ab4ec7bdf5e6b2c39668f306672cecd82c02798
14+
15+flags:
16+ idris:
17+ FFI: true
18+ GMP: true
19+
20+ghc-options:
21+ idris: -fwarn-unused-imports -fwarn-unused-binds
22+
23+nix:
24+ enable: false
25+ shell-file: stack-shell.nix
stack.yamlmode 120000 → 100644+26−1
@@ -1 +0,0 @@
1−stack-15.4.yaml
@@ -0,0 +1,26 @@
1+#recheck extra-deps next on resolver or cabal file change
2+resolver: lts-13.21
3+
4+extra-deps:
5+ - network-2.8.0.0@sha256:aae171e6c6028a7791dbe4de5b9d2da398056359e3cc7927465ffa3cdae1aa0b
6+ - megaparsec-7.0.4
7+ - parser-combinators-1.0.0
8+ - zip-archive-0.3.3@sha256:47cf2d66cc8e237f7226837758e1b041e24048ef3820d3d10276c500edb921bf
9+ - containers-0.5.11.0@sha256:28ad7337057442f75bc689315ab4ec7bdf5e6b2c39668f306672cecd82c02798
10+ - tasty-rerun-1.1.14@sha256:ba9c19a281535bea566e1044bc02c36ef17abcb310af4b6a149ec11780c7ce35
11+ - binary-0.8.7.0@sha256:ae3e6cca723ac55c54bbb3fa771bcf18142bc727afd57818e66d6ee6c8044f12
12+ - text-1.2.4.0@sha256:8c24450feb8e3bbb7ea3e17af24ef57e85db077c4bf53e5bcc345b283d1b1d5b
13+ - HsYAML-0.2.1.0@sha256:e4677daeba57f7a1e9a709a1f3022fe937336c91513e893166bd1f023f530d68,5311
14+ - HsYAML-aeson-0.2.0.0@sha256:04796abfc01cffded83f37a10e6edba4f0c0a15d45bef44fc5bb4313d9c87757,1791
15+
16+flags:
17+ idris:
18+ FFI: true
19+ GMP: true
20+
21+ghc-options:
22+ idris: -fwarn-unused-imports -fwarn-unused-binds
23+
24+nix:
25+ enable: false
26+ shell-file: stack-shell.nix