Add some comments

This commit is contained in:
Joscha 2020-12-13 20:35:49 +00:00
parent 659f1a9d33
commit adebcdd26c

View file

@ -110,6 +110,8 @@ unifyTerms t1 t2 = do
lift $ guard $ length t1 == length t2 lift $ guard $ length t1 == length t2
sequenceA_ $ zipWith unify t1 t2 sequenceA_ $ zipWith unify t1 t2
-- Figuring out how to display the result of the unification
varNames :: [T.Text] varNames :: [T.Text]
varNames = do varNames = do
num <- "" : map (T.pack . show) [(1::Integer)..] num <- "" : map (T.pack . show) [(1::Integer)..]
@ -139,6 +141,7 @@ resolveVars t = do
args2 <- traverse resolveVars args args2 <- traverse resolveVars args
pure $ Stat name args2 pure $ Stat name args2
-- | Helper type so I can resolve variables in multiple terms simultaneously.
newtype Terms a = Terms { unTerms :: [Term a] } newtype Terms a = Terms { unTerms :: [Term a] }
instance Functor Terms where instance Functor Terms where