diff --git a/Makefile b/Makefile index 57047b9f5..6ce4db613 100644 --- a/Makefile +++ b/Makefile @@ -125,7 +125,7 @@ ifneq (,${PREFIX}) PREFIX_ARG := --prefix=$(call adjust-path,${PREFIX_ABS}) DESTDIR_ARG := --destdir=${PKG} CONFIGURE_ARGS := -f-relocatable -f-self-contained \ - --docdir=$(call adjust-path,${PREFIX_SHARE}/${PREFIX_DOC}) + --docdir=$(call adjust-path,${PREFIX}/${PREFIX_SHARE}/${PREFIX_DOC}) else # This is kind of weird: 1. Prefix argument must be absolute; Cabal # doesn't yet fully support relocatable packages. 2. We have to @@ -183,6 +183,8 @@ ${PKG}: ${CRYPTOL_EXE} \ # cleanup unwanted files # don't want to bundle the cryptol library in the binary distribution rm -rf ${PKG_PREFIX}/lib; rm -rf ${PKG_PREFIX}/*windows-ghc* +# don't ship haddock + rm -rf ${PKG_DOC}/html .PHONY: install install: ${PKG} diff --git a/cryptol.cabal b/cryptol.cabal index 780a001b3..3a69db3b6 100644 --- a/cryptol.cabal +++ b/cryptol.cabal @@ -1,5 +1,5 @@ Name: cryptol -Version: 2.2.0 +Version: 2.2.1 Synopsis: Cryptol: The Language of Cryptography Description: Cryptol is a domain-specific language for specifying cryptographic algorithms. A Cryptol implementation of an algorithm resembles its mathematical specification more closely than an implementation in a general purpose language. For more, see . License: BSD3 @@ -23,7 +23,7 @@ source-repository head source-repository this type: git location: https://github.com/GaloisInc/cryptol.git - tag: v2.2.0 + tag: v2.2.1 flag static default: False @@ -40,7 +40,7 @@ flag self-contained library Default-language: Haskell98 - Build-depends: base >= 4.6, + Build-depends: base >= 4.6 && < 5, array >= 0.4, async >= 2.0, containers >= 0.5, diff --git a/src/Cryptol/Transform/Specialize.hs b/src/Cryptol/Transform/Specialize.hs index 7fd766c8e..ba0b54832 100644 --- a/src/Cryptol/Transform/Specialize.hs +++ b/src/Cryptol/Transform/Specialize.hs @@ -80,7 +80,7 @@ specializeExpr expr = ESel e s -> ESel <$> specializeExpr e <*> pure s EIf e1 e2 e3 -> EIf <$> specializeExpr e1 <*> specializeExpr e2 <*> specializeExpr e3 EComp t e mss -> EComp t <$> specializeExpr e <*> traverse (traverse specializeMatch) mss - -- ^ Bindings within list comprehensions always have monomorphic types. + -- Bindings within list comprehensions always have monomorphic types. EVar {} -> specializeConst expr ETAbs t e -> do cache <- getSpecCache @@ -88,10 +88,10 @@ specializeExpr expr = e' <- specializeExpr e setSpecCache cache return (ETAbs t e') - -- ^ We need to make sure that after processing `e`, no - -- specialized decls mentioning type variable `t` escape outside - -- the `ETAbs`. To avoid this, we reset to an empty SpecCache - -- while we run `specializeExpr e`, and restore it afterward: this + -- We need to make sure that after processing `e`, no specialized + -- decls mentioning type variable `t` escape outside the + -- `ETAbs`. To avoid this, we reset to an empty SpecCache while we + -- run `specializeExpr e`, and restore it afterward: this -- effectively prevents the specializer from registering any type -- instantiations involving `t` for any decls bound outside the -- scope of `t`. @@ -121,7 +121,7 @@ withDeclGroups :: [DeclGroup] -> SpecM a withDeclGroups dgs action = do let decls = concatMap groupDecls dgs let newCache = Map.fromList [ (dName d, (d, emptyTM)) | d <- decls ] - -- | We assume that the names bound in dgs are disjoint from the other names in scope. + -- We assume that the names bound in dgs are disjoint from the other names in scope. modifySpecCache (Map.union newCache) result <- action -- Then reassemble the DeclGroups. @@ -137,10 +137,10 @@ withDeclGroups dgs action = do else return [Recursive ds'] splitDeclGroup (NonRecursive d) = map NonRecursive <$> splitDecl d dgs' <- concat <$> traverse splitDeclGroup dgs - -- | Get updated map of only the local entries we added. + -- Get updated map of only the local entries we added. newCache' <- flip Map.intersection newCache <$> getSpecCache let nameTable = fmap (fmap fst . snd) newCache' - -- | Remove local definitions from the cache. + -- Remove local definitions from the cache. modifySpecCache (flip Map.difference newCache) return (result, dgs', nameTable) @@ -342,4 +342,3 @@ allPublicQNames = traverseSnd :: Functor f => (b -> f c) -> (a, b) -> f (a, c) traverseSnd f (x, y) = (,) x <$> f y -