Filter out results of type "A = A"

This commit is contained in:
Joscha 2020-12-13 20:23:28 +00:00
parent 60c2c2fe6d
commit 10ab319620
2 changed files with 6 additions and 2 deletions

View file

@ -36,4 +36,8 @@ displayDefs :: [Def T.Text] -> T.Text
displayDefs = T.intercalate "\n" . map displayDef
displayResult :: Map.Map T.Text (Term T.Text) -> T.Text
displayResult = T.intercalate "\n" . map (\(k, v) -> k <> " = " <> displayTerm v) . Map.assocs
displayResult
= T.intercalate "\n"
. map (\(k, v) -> k <> " = " <> displayTerm v)
. filter (\(k, v) -> v /= Var k)
. Map.assocs