Skip to content

Commit

Permalink
master: added docu
Browse files Browse the repository at this point in the history
  • Loading branch information
studJBccl committed Jun 13, 2024
1 parent d6da471 commit 38c1820
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Language/Hasmtlib/Type/Pipe.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import Control.Monad
import Control.Monad.State
import Control.Lens hiding (List)

-- | Pipe to the solver.
-- | If @B.Solver@ is @B.Queuing@ then all commands but those that expect an answer are sent to the queue.
data Pipe = Pipe
{ _lastPipeVarId :: {-# UNPACK #-} !Int
, _pipe :: !B.Solver
Expand All @@ -38,10 +40,8 @@ withSolver = Pipe 0
instance (MonadState Pipe m, MonadIO m) => MonadSMT Pipe m where
var' _ = do
smt <- get
let la' = smt^.lastPipeVarId + 1
newVar = coerce la'
newVar <- fmap coerce $ lastPipeVarId <+= 1
liftIO $ B.command_ (smt^.pipe) $ renderDeclareVar newVar
modify $ \ s -> s & lastPipeVarId %~ (+1)
return $ Var newVar

assert expr = do
Expand Down

0 comments on commit 38c1820

Please sign in to comment.