Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cycleq.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ library
text,
process,
ghc,
graphviz
graphviz,
directory

ghc-options: -Wall
-Wcompat
Expand Down
2 changes: 2 additions & 0 deletions src/Cycleq.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module Cycleq
)
where

import System.Directory (createDirectoryIfMissing)
import Control.Monad.Reader
import Cycleq.Environment
import Cycleq.Equation
Expand Down Expand Up @@ -46,6 +47,7 @@ plugin =
Nothing -> putMsgS "Failure!"
Just proof -> do
putMsgS "Success!"
liftIO $ createDirectoryIfMissing False "proofs"
drawProof proof ("proofs/" ++ goalName ++ ".svg")
pure mguts
)
Expand Down
2 changes: 1 addition & 1 deletion src/Cycleq/Reduction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ reduce expr0 = go expr0 []
Nothing -> empty
go (Tick _ expr) args = go expr args
go (Type ty) args = pure (mkApps (Type ty) args)
go expr args = pprPanic "Unsupported expression!" (ppr (mkApps exp args))
go expr args = pprPanic "Unsupported expression!" (ppr (mkApps expr args))

-- | Match a core expression against a first-order normal form.
viewNormalForm :: CoreExpr -> Maybe (Either (DataCon, [CoreArg]) Literal)
Expand Down