jukebox-0.4.2: A first-order reasoning toolbox

Safe HaskellNone
LanguageHaskell98

Jukebox.Sat.Easy

Documentation

newtype Sat1 a b Source #

Constructors

Sat1 

Fields

Instances
Monad (Sat1 a) Source # 
Instance details

Defined in Jukebox.Sat.Easy

Methods

(>>=) :: Sat1 a a0 -> (a0 -> Sat1 a b) -> Sat1 a b #

(>>) :: Sat1 a a0 -> Sat1 a b -> Sat1 a b #

return :: a0 -> Sat1 a a0 #

fail :: String -> Sat1 a a0 #

Functor (Sat1 a) Source # 
Instance details

Defined in Jukebox.Sat.Easy

Methods

fmap :: (a0 -> b) -> Sat1 a a0 -> Sat1 a b #

(<$) :: a0 -> Sat1 a b -> Sat1 a a0 #

Applicative (Sat1 a) Source # 
Instance details

Defined in Jukebox.Sat.Easy

Methods

pure :: a0 -> Sat1 a a0 #

(<*>) :: Sat1 a (a0 -> b) -> Sat1 a a0 -> Sat1 a b #

liftA2 :: (a0 -> b -> c) -> Sat1 a a0 -> Sat1 a b -> Sat1 a c #

(*>) :: Sat1 a a0 -> Sat1 a b -> Sat1 a b #

(<*) :: Sat1 a a0 -> Sat1 a b -> Sat1 a a0 #

MonadIO (Sat1 a) Source # 
Instance details

Defined in Jukebox.Sat.Easy

Methods

liftIO :: IO a0 -> Sat1 a a0 #

newtype Sat a b c Source #

Constructors

Sat 

Fields

Instances
Monad (Sat a b) Source # 
Instance details

Defined in Jukebox.Sat.Easy

Methods

(>>=) :: Sat a b a0 -> (a0 -> Sat a b b0) -> Sat a b b0 #

(>>) :: Sat a b a0 -> Sat a b b0 -> Sat a b b0 #

return :: a0 -> Sat a b a0 #

fail :: String -> Sat a b a0 #

Functor (Sat a b) Source # 
Instance details

Defined in Jukebox.Sat.Easy

Methods

fmap :: (a0 -> b0) -> Sat a b a0 -> Sat a b b0 #

(<$) :: a0 -> Sat a b b0 -> Sat a b a0 #

Applicative (Sat a b) Source # 
Instance details

Defined in Jukebox.Sat.Easy

Methods

pure :: a0 -> Sat a b a0 #

(<*>) :: Sat a b (a0 -> b0) -> Sat a b a0 -> Sat a b b0 #

liftA2 :: (a0 -> b0 -> c) -> Sat a b a0 -> Sat a b b0 -> Sat a b c #

(*>) :: Sat a b a0 -> Sat a b b0 -> Sat a b b0 #

(<*) :: Sat a b a0 -> Sat a b b0 -> Sat a b a0 #

MonadIO (Sat a b) Source # 
Instance details

Defined in Jukebox.Sat.Easy

Methods

liftIO :: IO a0 -> Sat a b a0 #

data SatState a Source #

Constructors

SatState Solver (Map a Lit) 

type Watch a = a -> Sat1 a () Source #

data Form a Source #

Constructors

Lit (Signed a) 
And [Form a] 
Or [Form a] 

nt :: Form a -> Form a Source #

unique :: [Form a] -> Form a Source #

runSat :: Ord b => Watch a -> [b] -> Sat a b c -> IO c Source #

runSat1 :: Ord a => Watch a -> Sat1 a b -> IO b Source #

atIndex :: (Ord a, Ord b) => b -> Sat1 a c -> Sat a b c Source #

solve :: Ord a => [Signed a] -> Sat1 a Bool Source #

model :: Ord a => Sat1 a (a -> Bool) Source #

modelValue :: Ord a => a -> Sat1 a Bool Source #

addForm :: Ord a => Form a -> Sat1 a () Source #

flatten :: Ord a => Form a -> Sat1 a [[Lit]] Source #

lit :: Ord a => Signed a -> Sat1 a Lit Source #

var :: Ord a => a -> Sat1 a Lit Source #