[Git][haskell-team/DHG_packages][master] cryptol: Upgrading from 2.6.0 to 2.8.0
Clint Adams
gitlab at salsa.debian.org
Sat Jul 11 01:04:50 BST 2020
Clint Adams pushed to branch master at Debian Haskell Group / DHG_packages
Commits:
9a52350f by Clint Adams at 2020-07-10T20:03:55-04:00
cryptol: Upgrading from 2.6.0 to 2.8.0
- - - - -
6 changed files:
- p/haskell-cryptol/debian/changelog
- p/haskell-cryptol/debian/control
- − p/haskell-cryptol/debian/patches/634c5a03e757663bf86d1ffad1ce2c6086d4483f.patch
- − p/haskell-cryptol/debian/patches/a8eab11b319f6434f9b01b26d419b8305ff30bc2.patch
- p/haskell-cryptol/debian/patches/newer-deps
- p/haskell-cryptol/debian/patches/series
Changes:
=====================================
p/haskell-cryptol/debian/changelog
=====================================
@@ -1,10 +1,9 @@
-haskell-cryptol (2.6.0-4) unstable; urgency=medium
+haskell-cryptol (2.8.0-1) unstable; urgency=medium
- * debian/patches/a8eab11b319f6434f9b01b26d419b8305ff30bc2.patch:
- * debian/patches/634c5a03e757663bf86d1ffad1ce2c6086d4483f.patch:
- - cherry-pick two upstream patches to fix the build
+ * New upstream version.
+ * Patch for newer base-compat. closes: #964835.
- -- Gianfranco Costamagna <locutusofborg at debian.org> Fri, 30 Aug 2019 18:05:32 +0200
+ -- Clint Adams <clint at debian.org> Fri, 10 Jul 2020 18:14:32 -0400
haskell-cryptol (2.6.0-3) unstable; urgency=medium
=====================================
p/haskell-cryptol/debian/control
=====================================
@@ -14,8 +14,11 @@ Build-Depends:
libghc-graphscc-dev (>= 1.0.4),
libghc-graphscc-prof,
libghc-base-compat-dev (>= 0.6),
- libghc-base-compat-dev (<< 0.11),
+ libghc-base-compat-dev (<< 0.12),
libghc-base-compat-prof,
+ libghc-cryptohash-sha1-dev (>= 0.11),
+ libghc-cryptohash-sha1-dev (<< 0.12),
+ libghc-cryptohash-sha1-prof,
libghc-gitrev-dev (>= 1.0),
libghc-gitrev-prof,
libghc-graphscc-dev (>= 1.0.4),
@@ -32,7 +35,7 @@ Build-Depends:
libghc-panic-prof,
libghc-random-dev (>= 1.0.1),
libghc-random-prof,
- libghc-sbv-dev (>= 7.7),
+ libghc-sbv-dev (>= 8.1),
libghc-sbv-prof,
libghc-simple-smt-dev (>= 0.7.1),
libghc-simple-smt-prof,
@@ -53,6 +56,7 @@ Build-Depends:
Build-Depends-Indep: ghc-doc,
libghc-graphscc-doc,
libghc-base-compat-doc,
+ libghc-cryptohash-sha1-doc,
libghc-gitrev-doc,
libghc-graphscc-doc,
libghc-heredoc-doc,
=====================================
p/haskell-cryptol/debian/patches/634c5a03e757663bf86d1ffad1ce2c6086d4483f.patch deleted
=====================================
@@ -1,31 +0,0 @@
-## Description: add some description
-## Origin/Author: add some origin or author
-## Bug: bug URL
-From 634c5a03e757663bf86d1ffad1ce2c6086d4483f Mon Sep 17 00:00:00 2001
-From: Brian Huffman <huffman at galois.com>
-Date: Mon, 17 Sep 2018 09:46:00 -0700
-Subject: [PATCH] Suppress REPL instantiation messages when warnDefaulting =
- off.
-
-Fixes #543.
----
- src/Cryptol/REPL/Command.hs | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-Index: haskell-cryptol-2.6.0/src/Cryptol/REPL/Command.hs
-===================================================================
---- haskell-cryptol-2.6.0.orig/src/Cryptol/REPL/Command.hs
-+++ haskell-cryptol-2.6.0/src/Cryptol/REPL/Command.hs
-@@ -1207,8 +1207,10 @@
- case ts of
- [] -> return ()
- _ ->
-- do rPutStrLn "Showing a specific instance of polymorphic result:"
-- mapM_ warnDefault ts
-+ do EnvBool warnDefaulting <- getUser "warnDefaulting"
-+ when warnDefaulting $
-+ do rPutStrLn "Showing a specific instance of polymorphic result:"
-+ mapM_ warnDefault ts
-
- warnDefault (x,t) =
- rPrint (" *" <+> nest 2 ("Using" <+> quotes (pp t) <+> "for" <+>
=====================================
p/haskell-cryptol/debian/patches/a8eab11b319f6434f9b01b26d419b8305ff30bc2.patch deleted
=====================================
@@ -1,281 +0,0 @@
-## Description: add some description
-## Origin/Author: add some origin or author
-## Bug: bug URL
-From a8eab11b319f6434f9b01b26d419b8305ff30bc2 Mon Sep 17 00:00:00 2001
-From: Iavor Diatchki <iavor.diatchki at gmail.com>
-Date: Mon, 8 Oct 2018 13:50:25 -0700
-Subject: [PATCH] Changes to avoid irrefutable patterns.
-
-This is to make things build with GHC 8.6, which requires a MonadFail
-instance.
-
-Pretty much all of these should end up being `panic`, so perhaps we should
-rewrite more of them to call `panic` (instead of using lazy patterns)
----
- src/Cryptol/ModuleSystem/Renamer.hs | 15 +++++--
- src/Cryptol/Prims/Eval.hs | 2 +-
- src/Cryptol/REPL/Command.hs | 26 ++++++------
- src/Cryptol/REPL/Monad.hs | 42 +++++++++++++++++---
- src/Cryptol/Transform/Specialize.hs | 2 +-
- src/Cryptol/TypeCheck/CheckModuleInstance.hs | 2 +-
- src/Cryptol/TypeCheck/Infer.hs | 2 +-
- 7 files changed, 65 insertions(+), 26 deletions(-)
-
-Index: haskell-cryptol-2.6.0/src/Cryptol/ModuleSystem/Renamer.hs
-===================================================================
---- haskell-cryptol-2.6.0.orig/src/Cryptol/ModuleSystem/Renamer.hs
-+++ haskell-cryptol-2.6.0/src/Cryptol/ModuleSystem/Renamer.hs
-@@ -442,7 +442,7 @@
- DBind b -> DBind <$> rename b
-
- -- XXX we probably shouldn't see these at this point...
-- DPatBind pat e -> do (pe,[pat']) <- renamePats [pat]
-+ DPatBind pat e -> do (pe,pat') <- renamePat pat
- shadowNames pe (DPatBind pat' <$> rename e)
-
- DType syn -> DType <$> rename syn
-@@ -902,8 +902,8 @@
- renameMatch :: Match PName -> RenameM (NamingEnv,Match Name)
-
- renameMatch (Match p e) =
-- do (pe,[p']) <- renamePats [p]
-- e' <- rename e
-+ do (pe,p') <- renamePat p
-+ e' <- rename e
- return (pe,Match p' e')
-
- renameMatch (MatchLet b) =
-@@ -913,6 +913,15 @@
- return (be,MatchLet b')
-
- -- | Rename patterns, and collect the new environment that they introduce.
-+renamePat :: Pattern PName -> RenameM (NamingEnv, Pattern Name)
-+renamePat p =
-+ do pe <- patternEnv p
-+ p' <- shadowNames pe (rename p)
-+ return (pe, p')
-+
-+
-+
-+-- | Rename patterns, and collect the new environment that they introduce.
- renamePats :: [Pattern PName] -> RenameM (NamingEnv,[Pattern Name])
- renamePats = loop
- where
-Index: haskell-cryptol-2.6.0/src/Cryptol/Prims/Eval.hs
-===================================================================
---- haskell-cryptol-2.6.0.orig/src/Cryptol/Prims/Eval.hs
-+++ haskell-cryptol-2.6.0/src/Cryptol/Prims/Eval.hs
-@@ -926,7 +926,7 @@
- lam $ \ val ->
- case (parts, each) of
- (Nat p, Nat e) | isTBit a -> do
-- VWord _ val' <- val
-+ ~(VWord _ val') <- val
- return $ VSeq p $ IndexSeqMap $ \i -> do
- return $ VWord e (extractWordVal e ((p-i-1)*e) <$> val')
- (Inf, Nat e) | isTBit a -> do
-Index: haskell-cryptol-2.6.0/src/Cryptol/REPL/Command.hs
-===================================================================
---- haskell-cryptol-2.6.0.orig/src/Cryptol/REPL/Command.hs
-+++ haskell-cryptol-2.6.0/src/Cryptol/REPL/Command.hs
-@@ -249,9 +249,9 @@
- -- Get the setting we should use for displaying values.
- getPPValOpts :: REPL E.PPOpts
- getPPValOpts =
-- do EnvNum base <- getUser "base"
-- EnvBool ascii <- getUser "ascii"
-- EnvNum infLength <- getUser "infLength"
-+ do base <- getKnownUser "base"
-+ ascii <- getKnownUser "ascii"
-+ infLength <- getKnownUser "infLength"
- return E.PPOpts { E.useBase = base
- , E.useAscii = ascii
- , E.useInfLength = infLength
-@@ -315,7 +315,7 @@
- qcCmd qcMode str =
- do expr <- replParseExpr str
- (val,ty) <- replEvalExpr expr
-- EnvNum testNum <- getUser "tests"
-+ testNum <- getKnownUser "tests"
- case testableType ty of
- Just (Just sz,tys,vss) | qcMode == QCExhaust || sz <= toInteger testNum -> do
- rPutStrLn "Using exhaustive testing."
-@@ -511,10 +511,10 @@
- cmdProveSat isSat str = do
- let cexStr | isSat = "satisfying assignment"
- | otherwise = "counterexample"
-- EnvString proverName <- getUser "prover"
-- EnvString fileName <- getUser "smtfile"
-+ proverName <- getKnownUser "prover"
-+ fileName <- getKnownUser "smtfile"
- let mfile = if fileName == "-" then Nothing else Just fileName
-- case proverName of
-+ case proverName :: String of
- "offline" -> do
- result <- offlineProveSat isSat str mfile
- case result of
-@@ -571,8 +571,8 @@
- -> String -> Maybe FilePath
- -> REPL (Maybe SBV.Solver,Symbolic.ProverResult,ProverStats)
- onlineProveSat isSat str mfile = do
-- EnvString proverName <- getUser "prover"
-- EnvBool verbose <- getUser "debug"
-+ proverName <- getKnownUser "prover"
-+ verbose <- getKnownUser "debug"
- satNum <- getUserSatNum
- parseExpr <- replParseExpr str
- (_, expr, schema) <- replCheckExpr parseExpr
-@@ -594,7 +594,7 @@
-
- offlineProveSat :: Bool -> String -> Maybe FilePath -> REPL (Either String String)
- offlineProveSat isSat str mfile = do
-- EnvBool verbose <- getUser "debug"
-+ verbose <- getKnownUser "debug"
- parseExpr <- replParseExpr str
- (_, expr, schema) <- replCheckExpr parseExpr
- decls <- fmap M.deDecls getDynEnv
-@@ -1121,8 +1121,8 @@
-
- moduleCmdResult :: M.ModuleRes a -> REPL a
- moduleCmdResult (res,ws0) = do
-- EnvBool warnDefaulting <- getUser "warnDefaulting"
-- EnvBool warnShadowing <- getUser "warnShadowing"
-+ warnDefaulting <- getKnownUser "warnDefaulting"
-+ warnShadowing <- getKnownUser "warnShadowing"
- -- XXX: let's generalize this pattern
- let isDefaultWarn (T.DefaultingTo _ _) = True
- isDefaultWarn _ = False
-@@ -1207,7 +1207,7 @@
- case ts of
- [] -> return ()
- _ ->
-- do EnvBool warnDefaulting <- getUser "warnDefaulting"
-+ do warnDefaulting <- getKnownUser "warnDefaulting"
- when warnDefaulting $
- do rPutStrLn "Showing a specific instance of polymorphic result:"
- mapM_ warnDefault ts
-Index: haskell-cryptol-2.6.0/src/Cryptol/REPL/Monad.hs
-===================================================================
---- haskell-cryptol-2.6.0.orig/src/Cryptol/REPL/Monad.hs
-+++ haskell-cryptol-2.6.0/src/Cryptol/REPL/Monad.hs
-@@ -13,6 +13,7 @@
- {-# LANGUAGE RecordWildCards #-}
- {-# LANGUAGE TypeFamilies #-}
- {-# LANGUAGE ViewPatterns #-}
-+{-# LANGUAGE FlexibleInstances #-}
-
- module Cryptol.REPL.Monad (
- -- * REPL Monad
-@@ -56,7 +57,7 @@
- -- ** Config Options
- , EnvVal(..)
- , OptionDescr(..)
-- , setUser, getUser, tryGetUser
-+ , setUser, getUser, getKnownUser, tryGetUser
- , userOptions
- , getUserSatNum
- , getUserShowProverStats
-@@ -650,10 +651,38 @@
- Just ev -> return ev
- Nothing -> panic "[REPL] getUser" ["option `" ++ name ++ "` does not exist"]
-
-+getKnownUser :: IsEnvVal a => String -> REPL a
-+getKnownUser x = fromEnvVal <$> getUser x
-+
-+class IsEnvVal a where
-+ fromEnvVal :: EnvVal -> a
-+
-+instance IsEnvVal Bool where
-+ fromEnvVal x = case x of
-+ EnvBool b -> b
-+ _ -> badIsEnv "Bool"
-+
-+instance IsEnvVal Int where
-+ fromEnvVal x = case x of
-+ EnvNum b -> b
-+ _ -> badIsEnv "Num"
-+
-+instance IsEnvVal (String,[String]) where
-+ fromEnvVal x = case x of
-+ EnvProg b bs -> (b,bs)
-+ _ -> badIsEnv "Prog"
-+
-+instance IsEnvVal String where
-+ fromEnvVal x = case x of
-+ EnvString b -> b
-+ _ -> badIsEnv "String"
-+
-+badIsEnv :: String -> a
-+badIsEnv x = panic "fromEnvVal" [ "[REPL] Expected a `" ++ x ++ "` value." ]
-+
-+
- getUserShowProverStats :: REPL Bool
--getUserShowProverStats =
-- do EnvBool yes <- getUser "prover-stats"
-- return yes
-+getUserShowProverStats = getKnownUser "prover-stats"
-
- -- Environment Options ---------------------------------------------------------
-
-@@ -789,7 +818,7 @@
-
- getUserSatNum :: REPL SatNum
- getUserSatNum = do
-- EnvString s <- getUser "satNum"
-+ s <- getKnownUser "satNum"
- case s of
- "all" -> return AllSat
- _ | Just n <- readMaybe s -> return (SomeSat n)
-@@ -800,7 +829,7 @@
-
- whenDebug :: REPL () -> REPL ()
- whenDebug m = do
-- EnvBool b <- getUser "debug"
-+ b <- getKnownUser "debug"
- when b m
-
- -- Smoke Testing ---------------------------------------------------------------
-@@ -830,3 +859,4 @@
- case mPath of
- Nothing -> return (Just Z3NotFound)
- Just _ -> return Nothing
-+
-Index: haskell-cryptol-2.6.0/src/Cryptol/Transform/Specialize.hs
-===================================================================
---- haskell-cryptol-2.6.0.orig/src/Cryptol/Transform/Specialize.hs
-+++ haskell-cryptol-2.6.0/src/Cryptol/Transform/Specialize.hs
-@@ -126,7 +126,7 @@
- -- Then reassemble the DeclGroups.
- let splitDecl :: Decl -> SpecM [Decl]
- splitDecl d = do
-- Just (_, tm) <- Map.lookup (dName d) <$> getSpecCache
-+ ~(Just (_, tm)) <- Map.lookup (dName d) <$> getSpecCache
- return (catMaybes $ map (snd . snd) $ toListTM tm)
- let splitDeclGroup :: DeclGroup -> SpecM [DeclGroup]
- splitDeclGroup (Recursive ds) = do
-Index: haskell-cryptol-2.6.0/src/Cryptol/TypeCheck/CheckModuleInstance.hs
-===================================================================
---- haskell-cryptol-2.6.0.orig/src/Cryptol/TypeCheck/CheckModuleInstance.hs
-+++ haskell-cryptol-2.6.0/src/Cryptol/TypeCheck/CheckModuleInstance.hs
-@@ -162,7 +162,7 @@
- InferM Expr {- ^ Expression to use for param definition -}
-
- makeValParamDef x sDef pDef =
-- withVar x sDef $ do DExpr e <- dDefinition <$> checkSigB bnd (pDef,[])
-+ withVar x sDef $ do ~(DExpr e) <- dDefinition <$> checkSigB bnd (pDef,[])
- return e
- where
- bnd = P.Bind { P.bName = loc x
-Index: haskell-cryptol-2.6.0/src/Cryptol/TypeCheck/Infer.hs
-===================================================================
---- haskell-cryptol-2.6.0.orig/src/Cryptol/TypeCheck/Infer.hs
-+++ haskell-cryptol-2.6.0/src/Cryptol/TypeCheck/Infer.hs
-@@ -921,7 +921,7 @@
- bs1
-
- checkBinds decls (AcyclicSCC c : more) =
-- do [b] <- inferBinds isTopLevel False [c]
-+ do ~[b] <- inferBinds isTopLevel False [c]
- withVar (dName b) (dSignature b) $
- checkBinds (NonRecursive b : decls) more
-
=====================================
p/haskell-cryptol/debian/patches/newer-deps
=====================================
@@ -1,11 +1,154 @@
--- a/cryptol.cabal
+++ b/cryptol.cabal
-@@ -43,7 +43,7 @@ library
+@@ -44,7 +44,7 @@
Default-language:
Haskell2010
Build-depends: base >= 4.8 && < 5,
-- base-compat >= 0.6 && < 0.10,
-+ base-compat >= 0.6 && < 0.11,
+- base-compat >= 0.6 && < 0.11,
++ base-compat >= 0.6 && < 0.12,
bytestring >= 0.10,
array >= 0.4,
containers >= 0.5,
+--- a/src/Cryptol/Parser/NoPat.hs
++++ b/src/Cryptol/Parser/NoPat.hs
+@@ -542,10 +542,8 @@
+ instance Applicative NoPatM where pure = return; (<*>) = ap
+ instance Monad NoPatM where
+ return x = M (return x)
+- fail x = M (fail x)
+ M x >>= k = M (x >>= unM . k)
+
+-
+ -- | Pick a new name, to be used when desugaring patterns.
+ newName :: NoPatM PName
+ newName = M $ sets $ \s -> let x = names s
+--- a/src/Cryptol/Parser/ParserUtils.hs
++++ b/src/Cryptol/Parser/ParserUtils.hs
+@@ -139,11 +139,13 @@
+
+ instance Monad ParseM where
+ return a = P (\_ _ s -> Right (a,s))
+- fail s = panic "[Parser] fail" [s]
+ m >>= k = P (\cfg p s1 -> case unP m cfg p s1 of
+ Left e -> Left e
+ Right (a,s2) -> unP (k a) cfg p s2)
+
++instance MonadFail ParseM where
++ fail s = panic "[Parser] fail" [s]
++
+ happyError :: ParseM a
+ happyError = P $ \cfg _ s ->
+ case sPrevTok s of
+--- a/src/Cryptol/Eval/Monad.hs
++++ b/src/Cryptol/Eval/Monad.hs
+@@ -166,11 +166,13 @@
+
+ instance Monad Eval where
+ return = Ready
+- fail x = Thunk (\_ -> fail x)
+ (>>=) = evalBind
+ {-# INLINE return #-}
+ {-# INLINE (>>=) #-}
+
++instance MonadFail Eval where
++ fail x = Thunk (\_ -> fail x)
++
+ instance MonadIO Eval where
+ liftIO = io
+
+--- a/src/Cryptol/IR/FreeVars.hs
++++ b/src/Cryptol/IR/FreeVars.hs
+@@ -9,7 +9,6 @@
+ import qualified Data.Set as Set
+ import Data.Map ( Map )
+ import qualified Data.Map as Map
+-import Data.Semigroup (Semigroup(..))
+
+ import Cryptol.TypeCheck.AST
+
+--- a/src/Cryptol/ModuleSystem/Exports.hs
++++ b/src/Cryptol/ModuleSystem/Exports.hs
+@@ -4,7 +4,6 @@
+ import Data.Set(Set)
+ import qualified Data.Set as Set
+ import Data.Foldable(fold)
+-import Data.Semigroup (Semigroup(..))
+ import Control.DeepSeq(NFData)
+ import GHC.Generics (Generic)
+
+--- a/src/Cryptol/Utils/Patterns.hs
++++ b/src/Cryptol/Utils/Patterns.hs
+@@ -17,10 +17,11 @@
+ (<*>) = ap
+
+ instance Monad Match where
+- fail _ = empty
+ Match m >>= f = Match $ \no yes -> m no $ \a ->
+ let Match n = f a in
+ n no yes
++instance MonadFail Match where
++ fail _ = empty
+
+ instance Alternative Match where
+ empty = Match $ \no _ -> no
+--- a/src/Cryptol/TypeCheck/Monad.hs
++++ b/src/Cryptol/TypeCheck/Monad.hs
+@@ -278,9 +278,11 @@
+
+ instance Monad InferM where
+ return x = IM (return x)
+- fail x = IM (fail x)
+ IM m >>= f = IM (m >>= unIM . f)
+
++instance MonadFail InferM where
++ fail x = IM (fail x)
++
+ instance MonadFix InferM where
+ mfix f = IM (mfix (unIM . f))
+
+@@ -835,11 +837,10 @@
+
+ instance Monad KindM where
+ return x = KM (return x)
+- fail x = KM (fail x)
+ KM m >>= k = KM (m >>= unKM . k)
+
+-
+-
++instance MonadFail KindM where
++ fail x = KM (fail x)
+
+ {- | The arguments to this function are as follows:
+
+--- a/src/Cryptol/TypeCheck/Sanity.hs
++++ b/src/Cryptol/TypeCheck/Sanity.hs
+@@ -467,7 +467,6 @@
+
+ instance Monad TcM where
+ return a = TcM (return a)
+- fail x = TcM (fail x)
+ TcM m >>= f = TcM (do a <- m
+ let TcM m1 = f a
+ m1)
+--- a/src/Cryptol/Parser/NoInclude.hs
++++ b/src/Cryptol/Parser/NoInclude.hs
+@@ -104,6 +104,8 @@
+ instance Monad NoIncM where
+ return x = M (return x)
+ m >>= f = M (unM m >>= unM . f)
++
++instance MonadFail NoIncM where
+ fail x = M (fail x)
+
+ -- | Raise an 'IncludeFailed' error.
+--- a/src/Cryptol/ModuleSystem/Monad.hs
++++ b/src/Cryptol/ModuleSystem/Monad.hs
+@@ -325,6 +325,8 @@
+
+ {-# INLINE (>>=) #-}
+ m >>= f = ModuleT (unModuleT m >>= unModuleT . f)
++
++instance MonadFail m => MonadFail (ModuleT m) where
+ {-# INLINE fail #-}
+ fail = ModuleT . raise . OtherFailure
+
=====================================
p/haskell-cryptol/debian/patches/series
=====================================
@@ -1,3 +1 @@
newer-deps
-634c5a03e757663bf86d1ffad1ce2c6086d4483f.patch
-a8eab11b319f6434f9b01b26d419b8305ff30bc2.patch
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/9a52350f8787f3432aa70257608b81f282bc7262
--
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/9a52350f8787f3432aa70257608b81f282bc7262
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20200711/b09b02fd/attachment-0001.html>
More information about the Pkg-haskell-commits
mailing list