Language.Prolog.NanoProlog.NanoProlog
- type LowerCase = String
- data Result
- = Done Env
- | ApplyRules [(Tag, Rule, Result)]
- data Rule = Term :<-: [Term]
- class Subst t where
- subst :: Env -> t -> t
- class Taggable a where
- tag :: Tag -> a -> a
- data Term
- emptyEnv :: Maybe (Map UpperCase t)
- enumerateDepthFirst :: Proofs -> Result -> [(Proofs, Env)]
- pFun :: Parser Term
- pRule :: Parser Rule
- pTerm :: Parser Term
- pTerms :: Parser [Term]
- show' :: Env -> String
- solve :: [Rule] -> Maybe Env -> [TaggedTerm] -> Result
- startParse :: (ListLike s b, Show b) => P (Str b s LineColPos) a -> s -> (a, [Error LineColPos])
- unify :: (Term, Term) -> Maybe Env -> Maybe Env
Documentation
enumerateDepthFirst :: Proofs -> Result -> [(Proofs, Env)]Source
printEnv
prints a single solution, showing only the variables
that were introduced in the original goal
startParse :: (ListLike s b, Show b) => P (Str b s LineColPos) a -> s -> (a, [Error LineColPos])Source