Skip to content

Commit

Permalink
Updates to build on GHC 8
Browse files Browse the repository at this point in the history
  • Loading branch information
glguy committed Feb 7, 2017
1 parent 636aa7e commit 34ea998
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ unitTest.tix
hpc_report
stack.yaml
/dist-newstyle
.*.swp
2 changes: 1 addition & 1 deletion crucible-abc/crucible-abc.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Description:

library
build-depends:
base >= 4.7 && < 4.9,
base >= 4.7 && < 4.10,
aig,
abcBridge >= 0.11,
ansi-wl-pprint,
Expand Down
2 changes: 1 addition & 1 deletion crucible-blt/crucible-blt.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Description:

library
build-depends:
base >= 4.7 && < 4.9,
base >= 4.7 && < 4.10,
ansi-wl-pprint,
blt >= 0.12.1,
containers,
Expand Down
2 changes: 1 addition & 1 deletion crucible-saw/crucible-saw.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Description:
library
build-depends:
ansi-wl-pprint,
base >= 4.7 && < 4.9,
base >= 4.7 && < 4.10,
containers,
crucible >= 0.1,
directory,
Expand Down
4 changes: 2 additions & 2 deletions crucible-server/crucible-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ library
executable crucible-server
build-depends:
ansi-wl-pprint,
base >= 4.7 && < 4.9,
base >= 4.7 && < 4.10,
crucible,
crucible-abc,
crucible-saw,
Expand All @@ -77,4 +77,4 @@ executable crucible-server

main-is: Main_crucible.hs
hs-source-dirs:
crucible-server
crucible-server
4 changes: 2 additions & 2 deletions crucible/crucible.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ flag unsafe-operations

library
build-depends:
base >= 4.7 && < 4.9,
base >= 4.7 && < 4.10,
ansi-wl-pprint,
attoparsec,
bimap >= 0.2,
Expand Down Expand Up @@ -149,7 +149,7 @@ library
Lang.Crucible.Utils.SymMultiDimArray
Lang.Crucible.Utils.UnaryBV

ghc-options: -Wall -Werror
ghc-options: -Wall
ghc-prof-options: -O2 -fprof-auto-top

if flag(unsafe-operations)
Expand Down
2 changes: 1 addition & 1 deletion crucible/src/Lang/Crucible/LLVM/MemModel.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
------------------------------------------------------------------------

{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE KindSignatures #-}
Expand Down
2 changes: 1 addition & 1 deletion crucible/src/Lang/Crucible/Syntax.hs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ concatExprs :: forall w a expr
-> (forall w'. (1 <= w') => NatRepr w' -> expr (BVType w') -> a)
-> a

concatExprs _ [] = error "Cannot concatenate 0 elements together"
concatExprs _ [] = \_ -> error "Cannot concatenate 0 elements together"
concatExprs w (a:as) = go a as

where go :: (1 <= w)
Expand Down
11 changes: 5 additions & 6 deletions crucible/src/Lang/Crucible/Utils/Structural.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ structuralPretty tpq pats0 = do
d <- lookupDataType' =<< asTypeCon "structuralPretty" =<< tpq
pp <- newName "pp"
a <- newName "a"

let pats = assocTypePats (dataParamTypes d) pats0
lamE [varP pp, varP a] $
caseE (varE a) (matchPretty pats (varE pp) <$> dataCtors d)
caseE (varE a) (matchPretty pats (varE pp) <$> dataCtors d)

matchPretty :: (Type -> Q (Maybe ExpQ)) -- ^ Pattern match functions
-> ExpQ -> Con -> MatchQ
matchPretty matchPat pp (NormalC nm tps) = do
-> ExpQ -> NormalizedCon -> MatchQ
matchPretty matchPat pp (NC nm tps) = do
let n = length tps
nms <- replicateM n (newName "x")
let pat = conP nm (varP <$> nms)
Expand All @@ -65,7 +66,5 @@ matchPretty matchPat pp (NormalC nm tps) = do
= [| brackets (commas (toListFC $(pp) $(v))) |]
mkPP v _ = [| text (show $(v)) |]
--mkPP _ tp = error $ "Unsupported type " ++ show tp ++ " with " ++ nameBase nm
let rhs = [| ppFn $(litE (stringL nm')) $(listE (zipWith mkPP0 vars (snd <$> tps))) |]
let rhs = [| ppFn $(litE (stringL nm')) $(listE (zipWith mkPP0 vars tps)) |]
match pat (normalB rhs) []
matchPretty patFn pp (ForallC _ _ c) = matchPretty patFn pp c
matchPretty _ _ c = error $ "Unsupported Con: " ++ show c
2 changes: 1 addition & 1 deletion galois-matlab/galois-matlab.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ flag enable-hpc

library
build-depends:
base >= 4.7 && < 4.9,
base >= 4.7 && < 4.10,
ansi-wl-pprint,
deepseq,
hashable,
Expand Down

0 comments on commit 34ea998

Please sign in to comment.