pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/idris
Module Name: pkgsrc
Committed By: pho
Date: Mon Jan 20 23:32:39 UTC 2020
Added Files:
pkgsrc/lang/idris: DESCR Makefile buildlink3.mk distinfo options.mk
pkgsrc/lang/idris/patches: patch-Setup.hs patch-idris.cabal
patch-rts_Makefile patch-rts_idris__net.c patch-src_IRTS_System.hs
patch-src_Idris_CmdOptions.hs patch-src_Idris_Core_CaseTree.hs
patch-src_Idris_Core_TT.hs patch-src_Idris_Package_Parser.hs
patch-src_Idris_Parser_Data.hs patch-src_Idris_Parser_Helpers.hs
patch-src_Idris_Parser_Ops.hs patch-src_Idris_Parser_Stack.hs
Log Message:
Import idris-1.3.2
Idris is a general purpose language with full dependent types. It is
compiled, with eager evaluation. Dependent types allow types to be
predicated on values, meaning that some aspects of a program's
behaviour can be specified precisely in the type. The language is
closely related to Epigram and Agda. There is a tutorial at
http://www.idris-lang.org/documentation
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/idris/DESCR pkgsrc/lang/idris/Makefile \
pkgsrc/lang/idris/buildlink3.mk pkgsrc/lang/idris/distinfo \
pkgsrc/lang/idris/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/idris/patches/patch-Setup.hs \
pkgsrc/lang/idris/patches/patch-idris.cabal \
pkgsrc/lang/idris/patches/patch-rts_Makefile \
pkgsrc/lang/idris/patches/patch-rts_idris__net.c \
pkgsrc/lang/idris/patches/patch-src_IRTS_System.hs \
pkgsrc/lang/idris/patches/patch-src_Idris_CmdOptions.hs \
pkgsrc/lang/idris/patches/patch-src_Idris_Core_CaseTree.hs \
pkgsrc/lang/idris/patches/patch-src_Idris_Core_TT.hs \
pkgsrc/lang/idris/patches/patch-src_Idris_Package_Parser.hs \
pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Data.hs \
pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Helpers.hs \
pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Ops.hs \
pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Stack.hs
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/lang/idris/DESCR
diff -u /dev/null pkgsrc/lang/idris/DESCR:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/DESCR Mon Jan 20 23:32:38 2020
@@ -0,0 +1,6 @@
+Idris is a general purpose language with full dependent types. It is
+compiled, with eager evaluation. Dependent types allow types to be
+predicated on values, meaning that some aspects of a program's
+behaviour can be specified precisely in the type. The language is
+closely related to Epigram and Agda. There is a tutorial at
+http://www.idris-lang.org/documentation
Index: pkgsrc/lang/idris/Makefile
diff -u /dev/null pkgsrc/lang/idris/Makefile:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/Makefile Mon Jan 20 23:32:38 2020
@@ -0,0 +1,74 @@
+# $NetBSD: Makefile,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+DISTNAME= idris-1.3.2
+PKGNAME= ${DISTNAME}
+CATEGORIES= lang
+
+MAINTAINER= pho%cielonegro.org@localhost
+COMMENT= Functional Programming Language with Dependent Types
+LICENSE= modified-bsd
+
+CONFIGURE_ARGS+= -f release
+
+# ${WRKSRC}/Setup.hs has a postBuild hook that invokes gmake to build
+# its standard libraries.
+USE_TOOLS+= gmake
+SUBST_CLASSES+= tools
+SUBST_STAGE.tools= pre-configure
+SUBST_FILES.tools= Setup.hs
+SUBST_VARS.tools= GMAKE PKGSRC_SETENV
+
+# ${WRKSRC}/src/IRTS/System.hs has several hardcoded paths to be used at
+# run time.
+SUBST_CLASSES+= runtime
+SUBST_STAGE.runtime= pre-configure
+SUBST_FILES.runtime= src/IRTS/System.hs
+SUBST_VARS.runtime= CC PREFIX COMPILER_RPATH_FLAG
+
+# When -O2 is in effect, GHC 8.8.1 uses whopping 1 TiB of virtual
+# memory (what?) to compile src/Idris/IBC.hs for some unknown reason,
+# possibly related to https://gitlab.haskell.org/ghc/ghc/issues/5642
+# or https://gitlab.haskell.org/ghc/ghc/issues/13535
+HASKELL_OPTIMIZATION_LEVEL= 1
+
+# Parallelization is unsafe because of the high memory consumption
+# even with -O1. Setting it to -O0 may seem desirable, but that makes
+# the resulting compiler way too slow.
+MAKE_JOBS_SAFE= NO
+
+# bin/idris cannot survive PaX MPROTECT because of GHC rts not being
+# safe. We can hopefully get rid of this in the near future. See also
+# ../../lang/ghc88/Makefile
+NOT_PAX_MPROTECT_SAFE+= bin/idris
+
+.include "options.mk"
+
+.include "../../converters/hs-aeson/buildlink3.mk"
+.include "../../textproc/hs-annotated-wl-pprint/buildlink3.mk"
+.include "../../devel/hs-ansi-terminal/buildlink3.mk"
+.include "../../textproc/hs-ansi-wl-pprint/buildlink3.mk"
+.include "../../devel/hs-async/buildlink3.mk"
+.include "../../converters/hs-base64-bytestring/buildlink3.mk"
+.include "../../textproc/hs-blaze-html/buildlink3.mk"
+.include "../../textproc/hs-blaze-markup/buildlink3.mk"
+.include "../../textproc/hs-cheapskate/buildlink3.mk"
+.include "../../devel/hs-code-page/buildlink3.mk"
+.include "../../devel/hs-fingertree/buildlink3.mk"
+.include "../../devel/hs-fsnotify/buildlink3.mk"
+.include "../../math/hs-ieee754/buildlink3.mk"
+.include "../../textproc/hs-megaparsec/buildlink3.mk"
+.include "../../net/hs-network/buildlink3.mk"
+.include "../../devel/hs-optparse-applicative/buildlink3.mk"
+.include "../../devel/hs-parser-combinators/buildlink3.mk"
+.include "../../textproc/hs-regex-tdfa/buildlink3.mk"
+.include "../../devel/hs-safe/buildlink3.mk"
+.include "../../devel/hs-split/buildlink3.mk"
+.include "../../devel/hs-terminal-size/buildlink3.mk"
+.include "../../devel/hs-uniplate/buildlink3.mk"
+.include "../../devel/hs-unordered-containers/buildlink3.mk"
+.include "../../devel/hs-utf8-string/buildlink3.mk"
+.include "../../devel/hs-vector/buildlink3.mk"
+.include "../../devel/hs-vector-binary-instances/buildlink3.mk"
+.include "../../archivers/hs-zip-archive/buildlink3.mk"
+.include "../../mk/haskell.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/lang/idris/buildlink3.mk
diff -u /dev/null pkgsrc/lang/idris/buildlink3.mk:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/buildlink3.mk Mon Jan 20 23:32:38 2020
@@ -0,0 +1,41 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+BUILDLINK_TREE+= idris
+
+.if !defined(IDRIS_BUILDLINK3_MK)
+IDRIS_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.idris+= idris>=1.3.2
+BUILDLINK_ABI_DEPENDS.idris+= idris>=1.3.2
+BUILDLINK_PKGSRCDIR.idris?= ../../lang/idris
+
+.include "../../converters/hs-aeson/buildlink3.mk"
+.include "../../textproc/hs-annotated-wl-pprint/buildlink3.mk"
+.include "../../devel/hs-ansi-terminal/buildlink3.mk"
+.include "../../textproc/hs-ansi-wl-pprint/buildlink3.mk"
+.include "../../devel/hs-async/buildlink3.mk"
+.include "../../converters/hs-base64-bytestring/buildlink3.mk"
+.include "../../textproc/hs-blaze-html/buildlink3.mk"
+.include "../../textproc/hs-blaze-markup/buildlink3.mk"
+.include "../../textproc/hs-cheapskate/buildlink3.mk"
+.include "../../devel/hs-code-page/buildlink3.mk"
+.include "../../devel/hs-fingertree/buildlink3.mk"
+.include "../../devel/hs-fsnotify/buildlink3.mk"
+.include "../../math/hs-ieee754/buildlink3.mk"
+.include "../../textproc/hs-megaparsec/buildlink3.mk"
+.include "../../net/hs-network/buildlink3.mk"
+.include "../../devel/hs-optparse-applicative/buildlink3.mk"
+.include "../../devel/hs-parser-combinators/buildlink3.mk"
+.include "../../textproc/hs-regex-tdfa/buildlink3.mk"
+.include "../../devel/hs-safe/buildlink3.mk"
+.include "../../devel/hs-split/buildlink3.mk"
+.include "../../devel/hs-terminal-size/buildlink3.mk"
+.include "../../devel/hs-uniplate/buildlink3.mk"
+.include "../../devel/hs-unordered-containers/buildlink3.mk"
+.include "../../devel/hs-utf8-string/buildlink3.mk"
+.include "../../devel/hs-vector/buildlink3.mk"
+.include "../../devel/hs-vector-binary-instances/buildlink3.mk"
+.include "../../archivers/hs-zip-archive/buildlink3.mk"
+.endif # IDRIS_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -idris
Index: pkgsrc/lang/idris/distinfo
diff -u /dev/null pkgsrc/lang/idris/distinfo:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/distinfo Mon Jan 20 23:32:38 2020
@@ -0,0 +1,19 @@
+$NetBSD: distinfo,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+SHA1 (idris-1.3.2.tar.gz) = fb4ac3904368a3d8c935855873d73a6ffc90beec
+RMD160 (idris-1.3.2.tar.gz) = 6b1ec85978e62c32691920429e0d2f97e3685b63
+SHA512 (idris-1.3.2.tar.gz) = 2db0fbcad6b596b7e34dcbb0c4fbe30ccbbcfbb5f469d4b077bf010391a98bb743162656c608d154f62f78f607662548cc1f00fc710f59d89612a3552a3e037f
+Size (idris-1.3.2.tar.gz) = 2092794 bytes
+SHA1 (patch-Setup.hs) = 7ebb64474acee7d0c37978d912d47ea229bf89ec
+SHA1 (patch-idris.cabal) = 5ba95f0156d634207eb951ef123e8b83598a8c3e
+SHA1 (patch-rts_Makefile) = fe88269e184aa0d80e13723c9e4fe47aba68eb3e
+SHA1 (patch-rts_idris__net.c) = fcb226e8752c34661fc1a81fff11e41342c3e0f8
+SHA1 (patch-src_IRTS_System.hs) = 4451e03f4e9095fcac9e014eb7ad4b997d5e308d
+SHA1 (patch-src_Idris_CmdOptions.hs) = 01b8ecb9b02c214ebff8c46b74e1e2b82c18e206
+SHA1 (patch-src_Idris_Core_CaseTree.hs) = 273e8335623ff07ccf4206fdb68558a42644c785
+SHA1 (patch-src_Idris_Core_TT.hs) = d80aa0777f443d6487fa3349a3dad54ae4aedb08
+SHA1 (patch-src_Idris_Package_Parser.hs) = 3394ec6fbf1323f4331d614426b48377815b7347
+SHA1 (patch-src_Idris_Parser_Data.hs) = 5b6d2d3944233fba22e93d631f92de49e64b35a8
+SHA1 (patch-src_Idris_Parser_Helpers.hs) = bfd9b16dafa0581147c6b22e5d4e43ae2b701f96
+SHA1 (patch-src_Idris_Parser_Ops.hs) = 2ebc3ffc1c909362c4945e556056d5428a8d0a25
+SHA1 (patch-src_Idris_Parser_Stack.hs) = 35c903e02b5ec6f21cc04047d9c474082cd97663
Index: pkgsrc/lang/idris/options.mk
diff -u /dev/null pkgsrc/lang/idris/options.mk:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/options.mk Mon Jan 20 23:32:38 2020
@@ -0,0 +1,25 @@
+# $NetBSD: options.mk,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.idris
+PKG_SUPPORTED_OPTIONS= idris-ffi gmp
+PKG_SUGGESTED_OPTIONS= idris-ffi gmp
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/bsd.options.mk"
+
+###
+### Build support for libffi
+###
+.if !empty(PKG_OPTIONS:Midris-ffi)
+CONFIGURE_ARGS+= -f ffi
+. include "../../devel/hs-libffi/buildlink3.mk"
+.endif
+
+###
+### Use GMP for Integers
+###
+.if !empty(PKG_OPTIONS:Mgmp)
+CONFIGURE_ARGS+= -f gmp
+. include "../../devel/gmp/buildlink3.mk"
+. include "../../devel/hs-libffi/buildlink3.mk"
+.endif
Index: pkgsrc/lang/idris/patches/patch-Setup.hs
diff -u /dev/null pkgsrc/lang/idris/patches/patch-Setup.hs:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/patches/patch-Setup.hs Mon Jan 20 23:32:38 2020
@@ -0,0 +1,80 @@
+$NetBSD: patch-Setup.hs,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+* Don't hard-code the gmake command (pkgsrc specific).
+
+* Set LD_LIBRARY_PATH while building its standard libraries. This is
+ needed because we link idris dynamically.
+
+* Don't try to invoke git. Cabal packages don't come with .git
+ directory.
+
+* Fix build with GHC 8.8
+
+--- Setup.hs.orig 2019-07-22 10:47:26.000000000 +0000
++++ Setup.hs
+@@ -42,19 +42,19 @@ import Distribution.Types.UnqualComponen
+ (<//>) = (Px.</>)
+ idrisCmd local = Px.joinPath $ splitDirectories $ ".." <//> ".." <//> buildDir local <//> "idris" <//> "idris"
+ #else
+-idrisCmd local = ".." </> ".." </> buildDir local </> "idris" </> "idris"
++idrisCmd local = "@PKGSRC_SETENV@ " ++ "LD_LIBRARY_PATH=" ++ idrisLibPath ++
++ " DYLD_LIBRARY_PATH=" ++ idrisLibPath ++ " " ++
++ idrisCmdPath
++ where
++ idrisCmdPath = ".." </> ".." </> buildDir local </> "idris" </> "idris"
++ idrisLibPath = ".." </> ".." </> buildDir local
+ #endif
+
+ -- -----------------------------------------------------------------------------
+ -- Make Commands
+
+--- use GNU make on FreeBSD
+-#if defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS)\
+- || defined(openbsd_HOST_OS) || defined(netbsd_HOST_OS)
+-mymake = "gmake"
+-#else
+-mymake = "make"
+-#endif
++mymake = "@GMAKE@"
++
+ make verbosity =
+ P.runProgramInvocation verbosity . P.simpleProgramInvocation mymake
+
+@@ -117,9 +117,7 @@ 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 = return ""
+
+ -- Generate a module that contains extra library directories passed
+ -- via command-line to cabal
+@@ -215,6 +213,7 @@ idrisConfigure _ flags pkgdesc local = d
+ autogenComponentModulesDir lbi _ = autogenModulesDir lbi
+ #endif
+
++#if !MIN_VERSION_Cabal(3,0,0)
+ idrisPreSDist args flags = do
+ let dir = S.fromFlag (S.sDistDirectory flags)
+ let verb = S.fromFlag (S.sDistVerbosity flags)
+@@ -244,6 +243,7 @@ idrisPostSDist args flags desc lbi = do
+ removeFile targetFile)
+ (\e -> let e' = (e :: SomeException) in return ())
+ postSDist simpleUserHooks args flags desc lbi
++#endif
+
+ #if !(MIN_VERSION_Cabal(2,0,0))
+ rewriteFileEx :: Verbosity -> FilePath -> String -> IO ()
+@@ -353,8 +353,10 @@ main = defaultMainWithHooks $ simpleUser
+ , postInst = \_ flags pkg local ->
+ idrisInstall (S.fromFlag $ S.installVerbosity flags)
+ NoCopyDest pkg local
++#if !MIN_VERSION_Cabal(3,0,0)
+ , preSDist = idrisPreSDist
+ , sDistHook = idrisSDist (sDistHook simpleUserHooks)
+ , postSDist = idrisPostSDist
++#endif
+ , testHook = idrisTestHook
+ }
Index: pkgsrc/lang/idris/patches/patch-idris.cabal
diff -u /dev/null pkgsrc/lang/idris/patches/patch-idris.cabal:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/patches/patch-idris.cabal Mon Jan 20 23:32:38 2020
@@ -0,0 +1,38 @@
+$NetBSD: patch-idris.cabal,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+Fix build with recent libraries.
+
+--- idris.cabal.orig 2019-07-22 10:47:26.000000000 +0000
++++ idris.cabal
+@@ -272,7 +272,7 @@ Library
+ Build-depends: base >=4 && <5
+ , aeson >= 0.6 && < 1.5
+ , annotated-wl-pprint >= 0.7 && < 0.8
+- , ansi-terminal < 0.9
++ , ansi-terminal < 0.11
+ , ansi-wl-pprint < 0.7
+ , array >= 0.4.0.1 && < 0.6
+ , base64-bytestring < 1.1
+@@ -289,10 +289,10 @@ 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
+- , optparse-applicative >= 0.13 && < 0.15
++ , network >= 2.7 && < 4
++ , optparse-applicative >= 0.13 && < 1
+ , parser-combinators >= 1.0.0
+ , pretty < 1.2
+ , process < 1.7
+@@ -301,7 +301,7 @@ Library
+ , split < 0.3
+ , terminal-size < 0.4
+ , text >=1.2.1.0 && < 1.3
+- , time >= 1.4 && < 1.9
++ , time >= 1.4 && < 2
+ , transformers >= 0.5 && < 0.6
+ , uniplate >=1.6 && < 1.7
+ , unordered-containers < 0.3
Index: pkgsrc/lang/idris/patches/patch-rts_Makefile
diff -u /dev/null pkgsrc/lang/idris/patches/patch-rts_Makefile:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/patches/patch-rts_Makefile Mon Jan 20 23:32:38 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-rts_Makefile,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+Don't set executable bit on non-executables.
+
+--- rts/Makefile.orig 2020-01-20 16:54:53.742728926 +0000
++++ rts/Makefile
+@@ -31,7 +31,7 @@ $(LIBTARGET) : $(OBJS)
+
+ install :
+ mkdir -p $(TARGET)
+- install $(LIBTARGET) $(HDRS) $(TARGET)
++ install -m644 $(LIBTARGET) $(HDRS) $(TARGET)
+
+ clean :
+ rm -f $(OBJS) $(LIBTARGET) $(DYLIBTARGET)
Index: pkgsrc/lang/idris/patches/patch-rts_idris__net.c
diff -u /dev/null pkgsrc/lang/idris/patches/patch-rts_idris__net.c:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/patches/patch-rts_idris__net.c Mon Jan 20 23:32:38 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-rts_idris__net.c,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+Fix build on NetBSD where byteorder(3) functions don't become
+available just by including <netinet/in.h>.
+
+--- rts/idris_net.c.orig 2020-01-20 15:18:01.972754256 +0000
++++ rts/idris_net.c
+@@ -1,6 +1,7 @@
+ // C-Side of the Idris network library
+ // (C) Simon Fowler, 2014
+ // MIT Licensed. Have fun!
++#define _XOPEN_SOURCE 600
+ #include "idris_net.h"
+ #include <errno.h>
+ #include <stdbool.h>
Index: pkgsrc/lang/idris/patches/patch-src_IRTS_System.hs
diff -u /dev/null pkgsrc/lang/idris/patches/patch-src_IRTS_System.hs:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/patches/patch-src_IRTS_System.hs Mon Jan 20 23:32:38 2020
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_IRTS_System.hs,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+These are pkgsrc-specific paths that need to be substituted.
+
+--- src/IRTS/System.hs.orig 2019-07-22 10:47:26.000000000 +0000
++++ src/IRTS/System.hs
+@@ -63,24 +63,13 @@ overrideIdrisSubDirWith fp envVar = do
+ getCC :: IO String
+ getCC = fromMaybe cc <$> lookupEnv "IDRIS_CC"
+ where
+-#ifdef mingw32_HOST_OS
+- cc = "gcc"
+-#else
+- cc = "cc"
+-#endif
++ cc = "@CC@"
+
+ getEnvFlags :: IO [String]
+ getEnvFlags = maybe [] (splitOn " ") <$> lookupEnv "IDRIS_CFLAGS"
+
+-
+-#if defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS)\
+- || defined(openbsd_HOST_OS) || defined(netbsd_HOST_OS)
+-extraLib = ["-L/usr/local/lib"]
+-extraInclude = ["-I/usr/local/include"]
+-#else
+-extraLib = []
+-extraInclude = []
+-#endif
++extraLib = ["-L@PREFIX@/lib", "@COMPILER_RPATH_FLAG@@PREFIX@/lib"]
++extraInclude = ["-I@PREFIX@/include"]
+
+ #ifdef IDRIS_GMP
+ gmpLib = ["-lgmp", "-DIDRIS_GMP"]
Index: pkgsrc/lang/idris/patches/patch-src_Idris_CmdOptions.hs
diff -u /dev/null pkgsrc/lang/idris/patches/patch-src_Idris_CmdOptions.hs:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/patches/patch-src_Idris_CmdOptions.hs Mon Jan 20 23:32:38 2020
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_Idris_CmdOptions.hs,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+Fix build with GHC 8.8
+
+--- src/Idris/CmdOptions.hs.orig 2020-01-20 13:55:58.687348620 +0000
++++ src/Idris/CmdOptions.hs
+@@ -264,7 +264,7 @@ parseCodegen :: String -> Codegen
+ parseCodegen "bytecode" = Bytecode
+ parseCodegen cg = Via IBCFormat (map toLower cg)
+
+-parseLogCats :: Monad m => String -> m [LogCat]
++parseLogCats :: MonadFail m => String -> m [LogCat]
+ parseLogCats s =
+ case lastMay (readP_to_S doParse s) of
+ Just (xs, _) -> return xs
+@@ -290,7 +290,7 @@ parseLogCats s =
+ s <- look
+ fail $ "Category: " ++ s ++ " is not recognised."
+
+-parseConsoleWidth :: Monad m => String -> m ConsoleWidth
++parseConsoleWidth :: MonadFail m => String -> m ConsoleWidth
+ parseConsoleWidth "auto" = return AutomaticWidth
+ parseConsoleWidth "infinite" = return InfinitelyWide
+ parseConsoleWidth s =
Index: pkgsrc/lang/idris/patches/patch-src_Idris_Core_CaseTree.hs
diff -u /dev/null pkgsrc/lang/idris/patches/patch-src_Idris_Core_CaseTree.hs:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/patches/patch-src_Idris_Core_CaseTree.hs Mon Jan 20 23:32:38 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Idris_Core_CaseTree.hs,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+Fix build with GHC 8.8
+
+--- src/Idris/Core/CaseTree.hs.orig 2020-01-20 12:56:46.585655007 +0000
++++ src/Idris/Core/CaseTree.hs
+@@ -627,7 +627,7 @@ groupCons cs = gc [] cs
+ PConst cval -> return $ addConG cval (ps, res) acc
+ PSuc n -> return $ addg False CSuc [n] (ps, res) acc
+ PReflected fn args -> return $ addg False (CFn fn) args (ps, res) acc
+- pat -> fail $ show pat ++ " is not a constructor or constant (can't happen)"
++ pat -> error $ show pat ++ " is not a constructor or constant (can't happen)"
+
+ addg uniq c conargs res []
+ = [ConGroup uniq c [(conargs, res)]]
Index: pkgsrc/lang/idris/patches/patch-src_Idris_Core_TT.hs
diff -u /dev/null pkgsrc/lang/idris/patches/patch-src_Idris_Core_TT.hs:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/patches/patch-src_Idris_Core_TT.hs Mon Jan 20 23:32:38 2020
@@ -0,0 +1,23 @@
+$NetBSD: patch-src_Idris_Core_TT.hs,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+Fix build with GHC 8.8
+
+--- src/Idris/Core/TT.hs.orig 2020-01-20 12:53:32.332100994 +0000
++++ src/Idris/Core/TT.hs
+@@ -70,6 +70,7 @@ import qualified Prelude as S (Semigroup
+ import Control.Applicative (Alternative, Applicative(..))
+ import qualified Control.Applicative as A (Alternative(..))
+ import Control.DeepSeq (($!!))
++import Control.Monad.Fail
+ import Control.Monad.State.Strict
+ import Data.Binary hiding (get, put)
+ import Data.Char
+@@ -324,6 +325,8 @@ bindTC x k = case x of
+ instance Monad TC where
+ return x = OK x
+ x >>= k = bindTC x k
++
++instance MonadFail TC where
+ fail e = Error (InternalMsg e)
+
+ instance MonadPlus TC where
Index: pkgsrc/lang/idris/patches/patch-src_Idris_Package_Parser.hs
diff -u /dev/null pkgsrc/lang/idris/patches/patch-src_Idris_Package_Parser.hs:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/patches/patch-src_Idris_Package_Parser.hs Mon Jan 20 23:32:38 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Idris_Package_Parser.hs,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+Fix build with GHC 8.8
+
+--- src/Idris/Package/Parser.hs.orig 2020-01-20 13:57:35.633471081 +0000
++++ src/Idris/Package/Parser.hs
+@@ -64,7 +64,7 @@ pPkgName = (either fail pure . pkgName =
+ -- | Parses a filename.
+ -- |
+ -- | Treated for now as an identifier or a double-quoted string.
+-filename :: Parsing m => m String
++filename :: (Parsing m, MonadFail m) => m String
+ filename = (do
+ -- Treat a double-quoted string as a filename to support spaces.
+ -- This also moves away from tying filenames to identifiers, so
Index: pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Data.hs
diff -u /dev/null pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Data.hs:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Data.hs Mon Jan 20 23:32:38 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Idris_Parser_Data.hs,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+Fix build with GHC 8.8
+
+--- src/Idris/Parser/Data.hs.orig 2020-01-20 13:54:48.815991101 +0000
++++ src/Idris/Parser/Data.hs
+@@ -91,7 +91,7 @@ record syn = (appExtent $ do
+ Nothing -> Nothing
+ return $ map (\n -> (n, p, t, doc')) ns
+
+- constructor :: (Parsing m, MonadState IState m) => m Name
++ constructor :: (Parsing m, MonadState IState m, MonadFail m) => m Name
+ constructor = keyword "constructor" *> fnName
+
+ endPlicity :: Maybe Char -> IdrisParser Plicity
Index: pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Helpers.hs
diff -u /dev/null pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Helpers.hs:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Helpers.hs Mon Jan 20 23:32:38 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Idris_Parser_Helpers.hs,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+Fix build with GHC 8.8
+
+--- src/Idris/Parser/Helpers.hs.orig 2020-01-20 13:35:28.654072395 +0000
++++ src/Idris/Parser/Helpers.hs
+@@ -512,7 +512,7 @@ notEndBlock = do ist <- get
+ when (i < lvl || isParen) (fail "end of block")
+ _ -> return ()
+
+-indentGt :: (Parsing m, MonadState IState m) => m ()
++indentGt :: (Parsing m, MonadState IState m, MonadFail m) => m ()
+ indentGt = do
+ li <- lastIndent
+ i <- indent
Index: pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Ops.hs
diff -u /dev/null pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Ops.hs:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Ops.hs Mon Jan 20 23:32:38 2020
@@ -0,0 +1,51 @@
+$NetBSD: patch-src_Idris_Parser_Ops.hs,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+Fix build with GHC 8.8
+
+--- src/Idris/Parser/Ops.hs.orig 2020-01-20 13:37:19.852674734 +0000
++++ src/Idris/Parser/Ops.hs
+@@ -104,7 +104,7 @@ table fixes
+ ;
+ @
+ -}
+-backtickOperator :: (Parsing m, MonadState IState m) => m Name
++backtickOperator :: (Parsing m, MonadState IState m, MonadFail m) => m Name
+ backtickOperator = P.between (indentGt *> lchar '`') (indentGt *> lchar '`') name
+
+ {- | Parses an operator name (either a symbolic name or a backtick-quoted name)
+@@ -116,7 +116,7 @@ backtickOperator = P.between (indentGt *
+ ;
+ @
+ -}
+-operatorName :: (Parsing m, MonadState IState m) => m Name
++operatorName :: (Parsing m, MonadState IState m, MonadFail m) => m Name
+ operatorName = sUN <$> symbolicOperator
+ <|> backtickOperator
+
+@@ -131,7 +131,7 @@ operatorName = sUN <$> symbolicOpera
+ @
+
+ -}
+-operatorFront :: Parsing m => m Name
++operatorFront :: (Parsing m, MonadFail m) => m Name
+ operatorFront = do P.try $ lchar '(' *> (eqTy <$ reservedOp "=") <* lchar ')'
+ <|> maybeWithNS (lchar '(' *> symbolicOperator <* lchar ')') []
+
+@@ -141,7 +141,7 @@ operatorFront = do P.try $ lchar '('
+ FnName ::= Name | OperatorFront;
+ @
+ -}
+-fnName :: (Parsing m, MonadState IState m) => m Name
++fnName :: (Parsing m, MonadState IState m, MonadFail m) => m Name
+ fnName = P.try operatorFront <|> name <?> "function name"
+
+ {- | Parses a fixity declaration
+@@ -235,7 +235,7 @@ invalidOperators :: [String]
+ invalidOperators = [":", "=>", "->", "<-", "=", "?=", "|", "**", "==>", "\\", "%", "~", "?", "!", "@"]
+
+ -- | Parses an operator
+-symbolicOperator :: Parsing m => m String
++symbolicOperator :: (Parsing m, MonadFail m) => m String
+ symbolicOperator = do op <- token . some $ operatorLetter
+ when (op `elem` (invalidOperators ++ commentMarkers)) $
+ fail $ op ++ " is not a valid operator"
Index: pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Stack.hs
diff -u /dev/null pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Stack.hs:1.1
--- /dev/null Mon Jan 20 23:32:39 2020
+++ pkgsrc/lang/idris/patches/patch-src_Idris_Parser_Stack.hs Mon Jan 20 23:32:38 2020
@@ -0,0 +1,30 @@
+$NetBSD: patch-src_Idris_Parser_Stack.hs,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+Fix build with recent megaparsec.
+
+--- src/Idris/Parser/Stack.hs.orig 2020-01-20 13:28:28.122727647 +0000
++++ src/Idris/Parser/Stack.hs
+@@ -76,11 +76,12 @@ parseErrorOffset = P.errorOffset . parse
+ instance Message ParseError where
+ messageExtent err = sourcePositionFC pos
+ where
+- (pos, _) = P.reachOffsetNoLine (parseErrorOffset err) (parseErrorPosState err)
++ pos = P.pstateSourcePos $
++ P.reachOffsetNoLine (parseErrorOffset err) (parseErrorPosState err)
+ messageText = PP.text . init . P.parseErrorTextPretty . parseError
+ messageSource err = Just sline
+ where
+- (_, sline, _) = P.reachOffset (parseErrorOffset err) (parseErrorPosState err)
++ (sline, _) = P.reachOffset (parseErrorOffset err) (parseErrorPosState err)
+
+ -- | A fully formatted parse error, with caret and bar, etc.
+ prettyError :: ParseError -> String
+@@ -88,7 +89,7 @@ prettyError = P.errorBundlePretty . unP
+
+ {- * Mark and restore -}
+
+-type Mark = P.State String
++type Mark = P.State String Void
+
+ -- | Retrieve the parser state so we can restart from this point later.
+ mark :: Parsing m => m Mark
Home |
Main Index |
Thread Index |
Old Index