prolog-0.2.1.1: A Prolog interpreter written in Haskell.

Safe HaskellNone
LanguageHaskell98

Language.Prolog

Documentation

data Term Source #

Instances
Eq Term Source # 
Instance details

Defined in Syntax

Methods

(==) :: Term -> Term -> Bool #

(/=) :: Term -> Term -> Bool #

Data Term Source # 
Instance details

Defined in Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Term -> c Term #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Term #

toConstr :: Term -> Constr #

dataTypeOf :: Term -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Term) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Term) #

gmapT :: (forall b. Data b => b -> b) -> Term -> Term #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Term -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Term -> r #

gmapQ :: (forall d. Data d => d -> u) -> Term -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Term -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Term -> m Term #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Term -> m Term #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Term -> m Term #

Ord Term Source # 
Instance details

Defined in Syntax

Methods

compare :: Term -> Term -> Ordering #

(<) :: Term -> Term -> Bool #

(<=) :: Term -> Term -> Bool #

(>) :: Term -> Term -> Bool #

(>=) :: Term -> Term -> Bool #

max :: Term -> Term -> Term #

min :: Term -> Term -> Term #

Show Term Source # 
Instance details

Defined in Syntax

Methods

showsPrec :: Int -> Term -> ShowS #

show :: Term -> String #

showList :: [Term] -> ShowS #

IsString Term Source # 
Instance details

Defined in IsString

Methods

fromString :: String -> Term #

Lift Term Source # 
Instance details

Defined in Quote

Methods

lift :: Term -> Q Exp #

Lift ([Term] -> [Goal]) Source # 
Instance details

Defined in Quote

Methods

lift :: ([Term] -> [Goal]) -> Q Exp #

data Clause Source #

Constructors

Clause 

Fields

ClauseFn 

Fields

Instances
Data Clause Source # 
Instance details

Defined in Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Clause -> c Clause #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Clause #

toConstr :: Clause -> Constr #

dataTypeOf :: Clause -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Clause) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Clause) #

gmapT :: (forall b. Data b => b -> b) -> Clause -> Clause #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Clause -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Clause -> r #

gmapQ :: (forall d. Data d => d -> u) -> Clause -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Clause -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Clause -> m Clause #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Clause -> m Clause #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Clause -> m Clause #

Show Clause Source # 
Instance details

Defined in Syntax

IsString Clause Source # 
Instance details

Defined in IsString

Methods

fromString :: String -> Clause #

Lift Clause Source # 
Instance details

Defined in Quote

Methods

lift :: Clause -> Q Exp #

rhs :: Clause -> [Term] -> [Goal] Source #

data VariableName Source #

Constructors

VariableName Int String 
Instances
Eq VariableName Source # 
Instance details

Defined in Syntax

Data VariableName Source # 
Instance details

Defined in Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> VariableName -> c VariableName #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c VariableName #

toConstr :: VariableName -> Constr #

dataTypeOf :: VariableName -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c VariableName) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VariableName) #

gmapT :: (forall b. Data b => b -> b) -> VariableName -> VariableName #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> VariableName -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> VariableName -> r #

gmapQ :: (forall d. Data d => d -> u) -> VariableName -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> VariableName -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> VariableName -> m VariableName #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> VariableName -> m VariableName #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> VariableName -> m VariableName #

Ord VariableName Source # 
Instance details

Defined in Syntax

Show VariableName Source # 
Instance details

Defined in Syntax

IsString VariableName Source # 
Instance details

Defined in IsString

Lift VariableName Source # 
Instance details

Defined in Quote

Methods

lift :: VariableName -> Q Exp #

type Goal = Term Source #

class Monad m => MonadTrace m where Source #

Methods

trace :: String -> m () Source #

Instances
MonadTrace IO Source # 
Instance details

Defined in Interpreter

Methods

trace :: String -> IO () Source #

MonadTrace (Either err) Source # 
Instance details

Defined in Interpreter

Methods

trace :: String -> Either err () Source #

(MonadTrace m, MonadTrans t, Monad (t m)) => MonadTrace (t m) Source # 
Instance details

Defined in Interpreter

Methods

trace :: String -> t m () Source #

withTrace :: Trace m a -> m a Source #

class Monad m => MonadGraphGen m where Source #

Methods

createConnections :: Branch -> [Branch] -> [Branch] -> m () Source #

markSolution :: Unifier -> m () Source #

markCutBranches :: Stack -> m () Source #

Instances
MonadGraphGen m => MonadGraphGen (ReaderT r m) Source # 
Instance details

Defined in Interpreter

Methods

createConnections :: Branch -> [Branch] -> [Branch] -> ReaderT r m () Source #

markSolution :: Unifier -> ReaderT r m () Source #

markCutBranches :: Stack -> ReaderT r m () Source #

runNoGraphT :: NoGraphT m a -> m a Source #