ideas-1.2: Feedback services for intelligent tutoring systems

Portabilityportable (depends on ghc)
Safe HaskellNone



Substitutions on terms. Substitutions are idempotent, and non-cyclic.



data Substitution Source

Abstract data type for substitutions

emptySubst :: SubstitutionSource

Returns the empty substitution

singletonSubst :: Int -> Term -> SubstitutionSource

Returns a singleton substitution

dom :: Substitution -> IntSetSource

Returns the domain of a substitution (as a set)

lookupVar :: Int -> Substitution -> Maybe TermSource

Lookups a variable in a substitution. Nothing indicates that the variable is not in the domain of the substitution

(@@) :: Substitution -> Substitution -> SubstitutionSource

Combines two substitutions. The left-hand side substitution is first applied to the co-domain of the right-hand side substitution

(|->) :: Substitution -> Term -> TermSource

Apply the substitution

listToSubst :: [(Int, Term)] -> SubstitutionSource

Turns a list into a substitution