Safe Haskell | None |
---|---|
Language | Haskell2010 |
Clingo.Internal.Types
- newtype IOSym s a = IOSym {}
- newtype Clingo s a = Clingo {}
- runClingo :: Control -> Clingo s a -> IO a
- askC :: Clingo s Control
- class Signed a where
- data Symbol s = Symbol {}
- data Signature s = Signature {}
- data SymbolicLiteral s
- = SLPositive (Symbol s)
- | SLNegative (Symbol s)
- rawSymLit :: SymbolicLiteral s -> SymbolicLiteral
- newtype Literal s = Literal {}
- data WeightedLiteral s = WeightedLiteral (Literal s) Integer
- rawWeightedLiteral :: WeightedLiteral s -> WeightedLiteral
- fromRawWeightedLiteral :: WeightedLiteral -> WeightedLiteral s
- data ExternalType
- = ExtFree
- | ExtTrue
- | ExtFalse
- | ExtRelease
- rawExtT :: ExternalType -> ExternalType
- fromRawExtT :: ExternalType -> ExternalType
- data HeuristicType
- rawHeuT :: HeuristicType -> HeuristicType
- fromRawHeuT :: HeuristicType -> HeuristicType
- negateLiteral :: Literal s -> Literal s
- newtype AspifLiteral s = AspifLiteral {}
- newtype Atom s = Atom {}
- newtype Model s = Model Model
- data Location = Location {}
- rawLocation :: Location -> IO Location
- freeRawLocation :: Location -> IO ()
- fromRawLocation :: Location -> IO Location
- data SolveResult
- rawSolveResult :: SolveResult -> SolveResult
- fromRawSolveResult :: SolveResult -> SolveResult
- newtype SolveMode = SolveMode {}
- fromRawSolveMode :: SolveMode -> SolveMode
- pattern SolveModeAsync :: SolveMode
- pattern SolveModeYield :: SolveMode
- newtype Solver s = Solver SolveHandle
- exhausted :: SolveResult -> Bool
- wrapCBLogger :: MonadIO m => (ClingoWarning -> Text -> IO ()) -> m (FunPtr (Logger ()))
- newtype Statistics s = Statistics Statistics
- newtype ProgramBuilder s = ProgramBuilder ProgramBuilder
- newtype Configuration s = Configuration Configuration
- newtype Backend s = Backend Backend
- newtype SymbolicAtoms s = SymbolicAtoms SymbolicAtoms
- newtype TheoryAtoms s = TheoryAtoms TheoryAtoms
- newtype TruthValue = TruthValue {}
- pattern TruthFree :: TruthValue
- pattern TruthFalse :: TruthValue
- pattern TruthTrue :: TruthValue
- negateTruth :: TruthValue -> TruthValue
- data IOPropagator s = IOPropagator {
- propagatorInit :: Maybe (PropagateInit s -> IO ())
- propagatorPropagate :: Maybe (PropagateCtrl s -> [Literal s] -> IO ())
- propagatorUndo :: Maybe (PropagateCtrl s -> [Literal s] -> IO ())
- propagatorCheck :: Maybe (PropagateCtrl s -> IO ())
- rawPropagator :: MonadIO m => IOPropagator s -> m (Propagator ())
- newtype PropagateCtrl s = PropagateCtrl PropagateControl
- newtype PropagateInit s = PropagateInit PropagateInit
- class AMVTree t where
Documentation
A monad that serves as witness that data registered with a running solver still exists and can be used.
Instances
MonadSymbol IOSym Source # | |
MonadModel IOSym Source # | |
MonadSolve IOSym Source # | |
Monad (IOSym s) Source # | |
Functor (IOSym s) Source # | |
MonadFix (IOSym s) Source # | |
Applicative (IOSym s) Source # | |
MonadIO (IOSym s) Source # | |
Alternative (IOSym s) Source # | |
MonadPlus (IOSym s) Source # | |
MonadThrow (IOSym s) Source # | |
MonadCatch (IOSym s) Source # | |
MonadMask (IOSym s) Source # | |
The Clingo
monad provides a base monad for computations utilizing the
clingo answer set solver. It uses an additional type parameter to ensure that
values that are managed by the solver can not leave scope.
Instances
MonadSymbol Clingo Source # | |
MonadModel Clingo Source # | |
MonadSolve Clingo Source # | |
Monad (Clingo s) Source # | |
Functor (Clingo s) Source # | |
MonadFix (Clingo s) Source # | |
Applicative (Clingo s) Source # | |
MonadIO (Clingo s) Source # | |
Alternative (Clingo s) Source # | |
MonadPlus (Clingo s) Source # | |
MonadThrow (Clingo s) Source # | |
MonadCatch (Clingo s) Source # | |
MonadMask (Clingo s) Source # | |
runClingo :: Control -> Clingo s a -> IO a Source #
Run a clingo computation from an explicit handle. The handle must be cleaned up manually afterwards, or on failure!
askC :: Clingo s Control Source #
Get the control handle from the Clingo
monad. Arbitrarily unsafe things
can be done with this!
Constructors
Symbol | |
Constructors
Signature | |
data SymbolicLiteral s Source #
Constructors
SLPositive (Symbol s) | |
SLNegative (Symbol s) |
Instances
Eq (SymbolicLiteral s) Source # | |
Ord (SymbolicLiteral s) Source # | |
Generic (SymbolicLiteral s) Source # | |
Hashable (SymbolicLiteral s) Source # | |
Signed (SymbolicLiteral s) Source # | |
type Rep (SymbolicLiteral s) Source # | |
rawSymLit :: SymbolicLiteral s -> SymbolicLiteral Source #
Constructors
Literal | |
Fields |
data WeightedLiteral s Source #
Constructors
WeightedLiteral (Literal s) Integer |
Instances
Eq (WeightedLiteral s) Source # | |
Ord (WeightedLiteral s) Source # | |
Show (WeightedLiteral s) Source # | |
Generic (WeightedLiteral s) Source # | |
NFData (WeightedLiteral s) Source # | |
Hashable (WeightedLiteral s) Source # | |
type Rep (WeightedLiteral s) Source # | |
data ExternalType Source #
Constructors
ExtFree | |
ExtTrue | |
ExtFalse | |
ExtRelease |
rawExtT :: ExternalType -> ExternalType Source #
data HeuristicType Source #
rawHeuT :: HeuristicType -> HeuristicType Source #
negateLiteral :: Literal s -> Literal s Source #
newtype AspifLiteral s Source #
Constructors
AspifLiteral | |
Fields |
Instances
Eq (AspifLiteral s) Source # | |
Ord (AspifLiteral s) Source # | |
Show (AspifLiteral s) Source # | |
Generic (AspifLiteral s) Source # | |
NFData (AspifLiteral s) Source # | |
Hashable (AspifLiteral s) Source # | |
Signed (AspifLiteral s) Source # | |
type Rep (AspifLiteral s) Source # | |
Constructors
Location | |
Fields
|
freeRawLocation :: Location -> IO () Source #
Constructors
SolveMode | |
Fields |
pattern SolveModeAsync :: SolveMode Source #
pattern SolveModeYield :: SolveMode Source #
Constructors
Solver SolveHandle |
exhausted :: SolveResult -> Bool Source #
wrapCBLogger :: MonadIO m => (ClingoWarning -> Text -> IO ()) -> m (FunPtr (Logger ())) Source #
newtype Statistics s Source #
Constructors
Statistics Statistics |
newtype ProgramBuilder s Source #
Constructors
ProgramBuilder ProgramBuilder |
newtype Configuration s Source #
Constructors
Configuration Configuration |
newtype SymbolicAtoms s Source #
Constructors
SymbolicAtoms SymbolicAtoms |
newtype TheoryAtoms s Source #
Constructors
TheoryAtoms TheoryAtoms |
pattern TruthFree :: TruthValue Source #
pattern TruthFalse :: TruthValue Source #
pattern TruthTrue :: TruthValue Source #
negateTruth :: TruthValue -> TruthValue Source #
data IOPropagator s Source #
Constructors
IOPropagator | |
Fields
|
rawPropagator :: MonadIO m => IOPropagator s -> m (Propagator ()) Source #
newtype PropagateCtrl s Source #
Constructors
PropagateCtrl PropagateControl |
Instances
MonadReader (PropagateCtrl s) (Propagation Solving s) # | |
newtype PropagateInit s Source #
Constructors
PropagateInit PropagateInit |
Instances
MonadReader (PropagateInit s) (Propagation Init s) # | |