mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-08-16 12:10:39 +03:00
commit
c6c928f76c
37
.travis.yml
37
.travis.yml
@ -8,7 +8,7 @@ env:
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- env: CABALVER="2.4" GHCVER="8.6.5" STACKVER="14.15" STYLISH=YES
|
||||
- env: CABALVER="2.4" GHCVER="8.6.5" STACKVER="15.4" STYLISH=YES
|
||||
addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.5,hscolour], sources: [hvr-ghc]}}
|
||||
- env: CABALVER="2.4" GHCVER="8.2.2" TESTS="lib_doc doc"
|
||||
compiler: ": #GHC 8.2.2"
|
||||
@ -19,18 +19,26 @@ matrix:
|
||||
- env: CABALVER="2.4" GHCVER="8.2.2" TESTS="test_c"
|
||||
compiler: ": #GHC 8.2.2"
|
||||
addons: {apt: {packages: [cabal-install-2.4,ghc-8.2.2,cppcheck,hscolour], sources: [hvr-ghc]}}
|
||||
- env: CABALVER="3.0" GHCVER="8.8.2" IDRIS2=YES
|
||||
addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.2], sources: [hvr-ghc]}}
|
||||
|
||||
# - env: CABALVER="3.0" GHCVER="8.8.1" TESTS="lib_doc doc"
|
||||
# compiler: ": #GHC 8.8.1"
|
||||
# addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.1,cppcheck,hscolour], sources: [hvr-ghc]}}
|
||||
# - env: CABALVER="3.0" GHCVER="8.8.1" TESTS="test_js"
|
||||
# compiler: ": #GHC 8.8.1"
|
||||
# addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.1,cppcheck,hscolour], sources: [hvr-ghc]}}
|
||||
# - env: CABALVER="3.0" GHCVER="8.8.1" TESTS="test_c"
|
||||
# compiler: ": #GHC 8.8.1"
|
||||
# addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.1,cppcheck,hscolour], sources: [hvr-ghc]}}
|
||||
- env: CABALVER="2.4" GHCVER="8.4.4" TESTS="lib_doc doc"
|
||||
compiler: ": #GHC 8.4.4"
|
||||
addons: {apt: {packages: [cabal-install-2.4,ghc-8.4.4,cppcheck,hscolour], sources: [hvr-ghc]}}
|
||||
- env: CABALVER="2.4" GHCVER="8.4.4" TESTS="test_js"
|
||||
compiler: ": #GHC 8.4.4"
|
||||
addons: {apt: {packages: [cabal-install-2.4,ghc-8.4.4,cppcheck,hscolour], sources: [hvr-ghc]}}
|
||||
- env: CABALVER="2.4" GHCVER="8.4.4" TESTS="test_c"
|
||||
compiler: ": #GHC 8.4.4"
|
||||
addons: {apt: {packages: [cabal-install-2.4,ghc-8.4.4,cppcheck,hscolour], sources: [hvr-ghc]}}
|
||||
- env: CABALVER="3.0" GHCVER="8.8.3" TESTS="lib_doc doc"
|
||||
compiler: ": #GHC 8.8.3"
|
||||
addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}}
|
||||
- env: CABALVER="3.0" GHCVER="8.8.3" TESTS="test_js"
|
||||
compiler: ": #GHC 8.8.3"
|
||||
addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}}
|
||||
- env: CABALVER="3.0" GHCVER="8.8.3" TESTS="test_c"
|
||||
compiler: ": #GHC 8.8.3"
|
||||
addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}}
|
||||
- env: CABALVER="3.0" GHCVER="8.8.3" IDRIS2=YES
|
||||
addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3], sources: [hvr-ghc]}}
|
||||
fast-finish: true
|
||||
|
||||
cache:
|
||||
@ -119,7 +127,7 @@ install:
|
||||
cp -a $HOME/.ghc $HOME/.cabsnap/ghc;
|
||||
cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;
|
||||
fi
|
||||
|
||||
|
||||
|
||||
before_script:
|
||||
- ORIGINAL_DIR=$(pwd)
|
||||
@ -128,6 +136,7 @@ before_script:
|
||||
- tar -xf ${ORIGINAL_DIR}/dist/${PKGNAME}*.tar.gz
|
||||
- cd ${PKGNAME}*
|
||||
script:
|
||||
- export LD_PRELOAD=/opt/ghc/${GHCVER}/lib/ghc-${GHCVER}/rts/libffi.so.7
|
||||
###
|
||||
- echo 'Configure...' && echo -en 'travis_fold:start:script.configure\\r'
|
||||
- cabal v1-configure -f FFI -f CI --enable-tests
|
||||
|
13
INSTALL.md
13
INSTALL.md
@ -130,7 +130,8 @@ PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig stack build
|
||||
## Issue with GHC on Ubuntu/Fedora
|
||||
|
||||
There is an upstream issue with GHC on some Ubuntu and Fedora machines.
|
||||
The issue is that for GHC versions greater than 8.4.X linking to libFFI is broken.
|
||||
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.
|
||||
|
||||
See the following GHC issue page for more information:
|
||||
|
||||
<https://gitlab.haskell.org/ghc/ghc/issues/15397>
|
||||
@ -141,4 +142,12 @@ Specifically, one will see an error message along the lines of:
|
||||
|
||||
> error while loading shared libraries: libffi.so.7: cannot open shared object file: No such file or directory
|
||||
|
||||
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.
|
||||
A workround for this bug is to override the used libffi version (this is what we use on CI):
|
||||
|
||||
```bash
|
||||
export LD_PRELOAD=/opt/ghc/${GHCVER}/lib/ghc-${GHCVER}/rts/libffi.so.7
|
||||
```
|
||||
|
||||
## GHC 8.6
|
||||
|
||||
For reasons that haven't been investigated building the Idris compiler with GHC 8.6 leads to a compiler which doesn't pass test.
|
||||
|
46
idris.cabal
46
idris.cabal
@ -46,12 +46,19 @@ Build-type: Custom
|
||||
|
||||
Tested-With: GHC == 7.10.3, GHC == 8.0.1
|
||||
|
||||
-- NOTE: due to https://github.com/haskell/cabal/issues/6125 the use of ** is
|
||||
-- heavily discouraged.
|
||||
Data-files: idrisdoc/styles.css
|
||||
jsrts/**/*.js
|
||||
jsrts/jsbn/*.js
|
||||
jsrts/*.js
|
||||
jsrts/jsbn/LICENSE
|
||||
rts/Makefile
|
||||
rts/**/*.c
|
||||
rts/**/*.h
|
||||
rts/*.c
|
||||
rts/seL4/*.c
|
||||
rts/arduino/*.c
|
||||
rts/windows/*.c
|
||||
rts/windows/*.h
|
||||
rts/*.h
|
||||
rts/seL4/CMakeLists.txt
|
||||
rts/seL4/README.md
|
||||
|
||||
@ -64,8 +71,13 @@ Extra-doc-files:
|
||||
RELEASE-CHECKS.md
|
||||
idris-tutorial.pdf
|
||||
man/idris.1
|
||||
samples/**/*.idr
|
||||
samples/**/*.lidr
|
||||
samples/effects/*.idr
|
||||
samples/misc/*.idr
|
||||
samples/tutorial/*.idr
|
||||
samples/ST/*.idr
|
||||
samples/ST/Graphics/*.idr
|
||||
samples/ST/Net/*.idr
|
||||
samples/misc/*.lidr
|
||||
|
||||
-- extra-source-files is generated by Setup.hs using `git --ls-files`.
|
||||
Extra-source-files:
|
||||
@ -73,15 +85,20 @@ Extra-source-files:
|
||||
config.mk
|
||||
custom.mk-alldeps
|
||||
mkpkg.sh
|
||||
stack-alt.yaml
|
||||
stack-shell.nix
|
||||
stack.yaml
|
||||
stylize.sh
|
||||
win-release.sh
|
||||
|
||||
|
||||
benchmarks/*.pl
|
||||
benchmarks/**/*.idr
|
||||
benchmarks/**/*.ipkg
|
||||
benchmarks/fasta/*.idr
|
||||
benchmarks/fasta/*.ipkg
|
||||
benchmarks/pidigits/*.idr
|
||||
benchmarks/pidigits/*.ipkg
|
||||
benchmarks/quasigroups/*.idr
|
||||
benchmarks/quasigroups/*.ipkg
|
||||
benchmarks/trivial/*.idr
|
||||
benchmarks/trivial/*.ipkg
|
||||
benchmarks/quasigroups/board
|
||||
|
||||
icons/*.png
|
||||
@ -304,13 +321,13 @@ Library
|
||||
Build-depends: base >=4 && <5
|
||||
, aeson >= 0.6 && < 1.5
|
||||
, annotated-wl-pprint >= 0.7 && < 0.8
|
||||
, ansi-terminal < 0.10
|
||||
, ansi-terminal < 0.11
|
||||
, ansi-wl-pprint < 0.7
|
||||
, array >= 0.4.0.1 && < 0.6
|
||||
, base64-bytestring < 1.1
|
||||
, binary >= 0.8.4.1 && < 0.9
|
||||
, blaze-html >= 0.6.1.3 && < 0.10
|
||||
, blaze-markup >= 0.5.2.1 && < 0.9
|
||||
, blaze-markup >= 0.5.2.1 && < 0.10
|
||||
, bytestring < 0.11
|
||||
, cheapskate >= 0.1.1.2 && < 0.2
|
||||
, code-page >= 0.1 && < 0.3
|
||||
@ -321,9 +338,9 @@ Library
|
||||
, fingertree >= 0.1.4.1 && < 0.2
|
||||
, haskeline >= 0.7 && < 0.8
|
||||
, ieee754 >= 0.7 && < 0.9
|
||||
, megaparsec >= 7.0.4 && < 8
|
||||
, megaparsec >= 7.0.4 && < 9
|
||||
, mtl >= 2.1 && < 2.3
|
||||
, network >= 2.7 && < 2.9
|
||||
, network >= 2.7 && < 3.1.2
|
||||
, optparse-applicative >= 0.13 && < 0.16
|
||||
, parser-combinators >= 1.0.0
|
||||
, pretty < 1.2
|
||||
@ -341,7 +358,7 @@ Library
|
||||
, vector < 0.13
|
||||
, vector-binary-instances < 0.3
|
||||
, zip-archive > 0.2.3.5 && < 0.5
|
||||
, fsnotify >= 0.2 && < 2.2
|
||||
, fsnotify >= 0.2 && < 0.4
|
||||
, async < 2.3
|
||||
|
||||
if !impl(ghc >= 8.0)
|
||||
@ -459,4 +476,3 @@ Executable idris-codegen-node
|
||||
Default-Language: Haskell2010
|
||||
ghc-prof-options: -auto-all -caf-all
|
||||
ghc-options: -threaded -rtsopts -funbox-strict-fields
|
||||
|
||||
|
@ -5,7 +5,7 @@ Description : Idris parser stack and its primitives.
|
||||
License : BSD3
|
||||
Maintainer : The Idris Community.
|
||||
-}
|
||||
{-# LANGUAGE ConstraintKinds, FlexibleContexts, MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE CPP, ConstraintKinds, FlexibleContexts, MultiParamTypeClasses #-}
|
||||
module Idris.Parser.Stack
|
||||
( -- * Parsing
|
||||
Parser(..)
|
||||
@ -77,11 +77,20 @@ parseErrorOffset = P.errorOffset . parseError
|
||||
instance Message ParseError where
|
||||
messageExtent err = sourcePositionFC pos
|
||||
where
|
||||
#if MIN_VERSION_megaparsec(8,0,0)
|
||||
P.PosState {P.pstateSourcePos = pos} =
|
||||
P.reachOffsetNoLine (parseErrorOffset err) (parseErrorPosState err)
|
||||
#else
|
||||
(pos, _) = P.reachOffsetNoLine (parseErrorOffset err) (parseErrorPosState err)
|
||||
#endif
|
||||
messageText = PP.text . init . P.parseErrorTextPretty . parseError
|
||||
messageSource err = Just sline
|
||||
where
|
||||
#if MIN_VERSION_megaparsec(8,0,0)
|
||||
(sline, _) = P.reachOffset (parseErrorOffset err) (parseErrorPosState err)
|
||||
#else
|
||||
(_, sline, _) = P.reachOffset (parseErrorOffset err) (parseErrorPosState err)
|
||||
#endif
|
||||
|
||||
-- | A fully formatted parse error, with caret and bar, etc.
|
||||
prettyError :: ParseError -> String
|
||||
@ -89,7 +98,11 @@ prettyError = P.errorBundlePretty . unParseError
|
||||
|
||||
{- * Mark and restore -}
|
||||
|
||||
#if MIN_VERSION_megaparsec(8,0,0)
|
||||
type Mark = P.State String Void
|
||||
#else
|
||||
type Mark = P.State String
|
||||
#endif
|
||||
|
||||
-- | Retrieve the parser state so we can restart from this point later.
|
||||
mark :: Parsing m => m Mark
|
||||
|
21
stack-11.22.yaml
Normal file
21
stack-11.22.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
#recheck extra-deps next on resolver or cabal file change
|
||||
resolver: lts-11.22
|
||||
|
||||
extra-deps:
|
||||
- cheapskate-0.1.1.2
|
||||
- megaparsec-7.0.5
|
||||
- Cabal-2.4.1.0
|
||||
- network-3.1.1.1
|
||||
- parser-combinators-1.0.0
|
||||
|
||||
flags:
|
||||
idris:
|
||||
FFI: true
|
||||
GMP: true
|
||||
|
||||
ghc-options:
|
||||
idris: -fwarn-unused-imports -fwarn-unused-binds
|
||||
|
||||
nix:
|
||||
enable: false
|
||||
shell-file: stack-shell.nix
|
20
stack-12.26.yaml
Normal file
20
stack-12.26.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
#recheck extra-deps next on resolver or cabal file change
|
||||
resolver: lts-12.26
|
||||
|
||||
extra-deps:
|
||||
- cheapskate-0.1.1.2
|
||||
- megaparsec-7.0.5
|
||||
- Cabal-2.4.1.0
|
||||
- network-3.1.1.1
|
||||
|
||||
flags:
|
||||
idris:
|
||||
FFI: true
|
||||
GMP: true
|
||||
|
||||
ghc-options:
|
||||
idris: -fwarn-unused-imports -fwarn-unused-binds
|
||||
|
||||
nix:
|
||||
enable: false
|
||||
shell-file: stack-shell.nix
|
17
stack-15.3.yaml
Normal file
17
stack-15.3.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
#recheck extra-deps next on resolver or cabal file change
|
||||
resolver: lts-15.3
|
||||
|
||||
extra-deps:
|
||||
- cheapskate-0.1.1.2
|
||||
|
||||
flags:
|
||||
idris:
|
||||
FFI: true
|
||||
GMP: true
|
||||
|
||||
ghc-options:
|
||||
idris: -fwarn-unused-imports -fwarn-unused-binds
|
||||
|
||||
nix:
|
||||
enable: false
|
||||
shell-file: stack-shell.nix
|
17
stack-15.4.yaml
Normal file
17
stack-15.4.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
#recheck extra-deps next on resolver or cabal file change
|
||||
resolver: lts-15.4
|
||||
|
||||
extra-deps:
|
||||
- cheapskate-0.1.1.2
|
||||
|
||||
flags:
|
||||
idris:
|
||||
FFI: true
|
||||
GMP: true
|
||||
|
||||
ghc-options:
|
||||
idris: -fwarn-unused-imports -fwarn-unused-binds
|
||||
|
||||
nix:
|
||||
enable: false
|
||||
shell-file: stack-shell.nix
|
@ -1,25 +0,0 @@
|
||||
#recheck extra-deps next on resolver or cabal file change
|
||||
resolver: lts-11.4
|
||||
|
||||
packages:
|
||||
- location: .
|
||||
|
||||
extra-deps:
|
||||
- network-2.8.0.0@sha256:aae171e6c6028a7791dbe4de5b9d2da398056359e3cc7927465ffa3cdae1aa0b
|
||||
- Cabal-2.2.0.1@sha256:2a80d8fb655474f0eaeb20434c47f64f84e6302e55973056f00df8ca050b9683
|
||||
- megaparsec-7.0.4
|
||||
- parser-combinators-1.0.0
|
||||
- zip-archive-0.3.3@sha256:47cf2d66cc8e237f7226837758e1b041e24048ef3820d3d10276c500edb921bf
|
||||
- containers-0.5.11.0@sha256:28ad7337057442f75bc689315ab4ec7bdf5e6b2c39668f306672cecd82c02798
|
||||
|
||||
flags:
|
||||
idris:
|
||||
FFI: true
|
||||
GMP: true
|
||||
|
||||
ghc-options:
|
||||
idris: -fwarn-unused-imports -fwarn-unused-binds
|
||||
|
||||
nix:
|
||||
enable: false
|
||||
shell-file: stack-shell.nix
|
26
stack.yaml
26
stack.yaml
@ -1,26 +0,0 @@
|
||||
#recheck extra-deps next on resolver or cabal file change
|
||||
resolver: lts-13.21
|
||||
|
||||
extra-deps:
|
||||
- network-2.8.0.0@sha256:aae171e6c6028a7791dbe4de5b9d2da398056359e3cc7927465ffa3cdae1aa0b
|
||||
- megaparsec-7.0.4
|
||||
- parser-combinators-1.0.0
|
||||
- zip-archive-0.3.3@sha256:47cf2d66cc8e237f7226837758e1b041e24048ef3820d3d10276c500edb921bf
|
||||
- containers-0.5.11.0@sha256:28ad7337057442f75bc689315ab4ec7bdf5e6b2c39668f306672cecd82c02798
|
||||
- tasty-rerun-1.1.14@sha256:ba9c19a281535bea566e1044bc02c36ef17abcb310af4b6a149ec11780c7ce35
|
||||
- binary-0.8.7.0@sha256:ae3e6cca723ac55c54bbb3fa771bcf18142bc727afd57818e66d6ee6c8044f12
|
||||
- text-1.2.4.0@sha256:8c24450feb8e3bbb7ea3e17af24ef57e85db077c4bf53e5bcc345b283d1b1d5b
|
||||
- HsYAML-0.2.1.0@sha256:e4677daeba57f7a1e9a709a1f3022fe937336c91513e893166bd1f023f530d68,5311
|
||||
- HsYAML-aeson-0.2.0.0@sha256:04796abfc01cffded83f37a10e6edba4f0c0a15d45bef44fc5bb4313d9c87757,1791
|
||||
|
||||
flags:
|
||||
idris:
|
||||
FFI: true
|
||||
GMP: true
|
||||
|
||||
ghc-options:
|
||||
idris: -fwarn-unused-imports -fwarn-unused-binds
|
||||
|
||||
nix:
|
||||
enable: false
|
||||
shell-file: stack-shell.nix
|
1
stack.yaml
Symbolic link
1
stack.yaml
Symbolic link
@ -0,0 +1 @@
|
||||
stack-15.4.yaml
|
Loading…
Reference in New Issue
Block a user