Skip to content

Commit

Permalink
Moving IsTerm Id instance (from logic tutor)
Browse files Browse the repository at this point in the history
  • Loading branch information
Heeren committed Jul 22, 2021
1 parent 1b50b07 commit 440dbd9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Ideas/Common/Rewriting/Term.hs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ instance IsTerm Bool where
| s == falseSymbol = return False
fromTerm _ = fail "fromTerm: not a Bool"

instance IsTerm Id where
toTerm = toTerm . show
fromTerm = fmap (newId :: String -> Id) . fromTerm

instance IsTerm a => IsTerm [a] where
toTerm = toTermList
fromTerm = fromTermList
Expand Down

0 comments on commit 440dbd9

Please sign in to comment.