Skip to content

Commit

Permalink
dev-lang/idris: 1.3.3-r2, update dep upperbounds
Browse files Browse the repository at this point in the history
Specifically, `aeson` and `optparse-applicative`. [An issue][1] has been
opened upstream to apply these changes.

[1]: idris-lang/Idris-dev#4895

Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com>
  • Loading branch information
ezzieyguywuf committed Jan 16, 2021
1 parent 299c2bd commit d6605ee
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 6 deletions.
16 changes: 16 additions & 0 deletions dev-lang/idris/files/idris-1.3.3-megaparsec-9.0.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/src/Idris/Parser/Stack.hs b/src/Idris/Parser/Stack.hs
index fb7b61144..879786f4d 100644
--- a/src/Idris/Parser/Stack.hs
+++ b/src/Idris/Parser/Stack.hs
@@ -84,7 +84,11 @@ instance Message ParseError where
(pos, _) = P.reachOffsetNoLine (parseErrorOffset err) (parseErrorPosState err)
#endif
messageText = PP.text . init . P.parseErrorTextPretty . parseError
+#if MIN_VERSION_megaparsec(9,0,0)
+ messageSource err = sline
+#else
messageSource err = Just sline
+#endif
where
#if MIN_VERSION_megaparsec(8,0,0)
(sline, _) = P.reachOffset (parseErrorOffset err) (parseErrorPosState err)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/Setup.hs b/Setup.hs
index d8963d73a..6666a7a77 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -117,9 +117,10 @@ idrisClean _ flags _ _ = cleanStdLib
-- Configure

gitHash :: IO String
-gitHash = do h <- Control.Exception.catch (readProcess "git" ["rev-parse", "--short", "HEAD"] "")
- (\e -> let e' = (e :: SomeException) in return "PRE")
- return $ takeWhile (/= '\n') h
+gitHash = pure "1.1.3"
+-- do h <- Control.Exception.catch (readProcess "git" ["rev-parse", "--short", "HEAD"] "")
+-- (\e -> let e' = (e :: SomeException) in return "PRE")
+-- return $ takeWhile (/= '\n') h

-- Generate a module that contains extra library directories passed
-- via command-line to cabal
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ IUSE="ffi gmp"

RESTRICT=test # pulls stack

RDEPEND=">=dev-haskell/aeson-0.6:=[profile?] <dev-haskell/aeson-1.5:=[profile?]
RDEPEND=">=dev-haskell/aeson-0.6:=[profile?]
>=dev-haskell/annotated-wl-pprint-0.7:=[profile?] <dev-haskell/annotated-wl-pprint-0.8:=[profile?]
<dev-haskell/ansi-terminal-0.11:=[profile?]
<dev-haskell/ansi-wl-pprint-0.7:=[profile?]
Expand All @@ -34,10 +34,10 @@ RDEPEND=">=dev-haskell/aeson-0.6:=[profile?] <dev-haskell/aeson-1.5:=[profile?]
>=dev-haskell/fsnotify-0.2:=[profile?] <dev-haskell/fsnotify-0.4:=[profile?]
>=dev-haskell/haskeline-0.8:=[profile?]
>=dev-haskell/ieee754-0.7:=[profile?] <dev-haskell/ieee754-0.9:=[profile?]
>=dev-haskell/megaparsec-7.0.4:=[profile?] <dev-haskell/megaparsec-9:=[profile?]
>=dev-haskell/megaparsec-7.0.4:=[profile?]
>=dev-haskell/mtl-2.1:=[profile?] <dev-haskell/mtl-2.3:=[profile?]
>=dev-haskell/network-2.7:=[profile?] <dev-haskell/network-3.1.2:=[profile?]
>=dev-haskell/optparse-applicative-0.13:=[profile?] <dev-haskell/optparse-applicative-0.16:=[profile?]
>=dev-haskell/optparse-applicative-0.13:=[profile?]
>=dev-haskell/parser-combinators-1.0.0:=[profile?]
>=dev-haskell/regex-tdfa-1.2:=[profile?]
>=dev-haskell/safe-0.3.9:=[profile?]
Expand All @@ -57,13 +57,17 @@ RDEPEND=">=dev-haskell/aeson-0.6:=[profile?] <dev-haskell/aeson-1.5:=[profile?]
"
DEPEND="${RDEPEND}
>=dev-haskell/cabal-2.4
test? ( dev-haskell/tagged
test? ( dev-haskell/cabal
dev-haskell/tagged
>=dev-haskell/tasty-0.8
>=dev-haskell/tasty-golden-2.0
>=dev-haskell/tasty-rerun-1.0.0 )
"

PATCHES=( "${FILESDIR}"/${P}-haskeline-0.8.patch )
PATCHES=( "${FILESDIR}"/${P}-haskeline-0.8.patch
"${FILESDIR}"/${PN}-1.3.3-remove-git-from-test-configuration.patch
"${FILESDIR}"/${PN}-1.3.3-megaparsec-9.0.1.patch
)

src_prepare() {
default
Expand All @@ -79,7 +83,10 @@ src_prepare() {

cabal_chdeps \
'Cabal >= 2.4 && < 3.1' 'Cabal >= 2.4' \
'haskeline >= 0.7 && < 0.8' 'haskeline >= 0.8'
'haskeline >= 0.7 && < 0.8' 'haskeline >= 0.8' \
'aeson >= 0.6 && < 1.5' 'aeson >= 0.6' \
'optparse-applicative >= 0.13 && < 0.16' 'optparse-applicative >= 0.13' \
'megaparsec >= 7.0.4 && < 9' 'megaparsec >= 7.0.4'
}

src_configure() {
Expand Down

0 comments on commit d6605ee

Please sign in to comment.