ekmett / guanxi

Relational programming in Haskell. Mostly developed on twitch.
http://twitch.tv/ekmett
Other
253 stars 29 forks source link

Equality: What if this is the exact same term? #20

Open np opened 3 years ago

np commented 3 years ago

Should it make sense to first check that the terms are different ?

https://github.com/ekmett/guanxi/blob/e267f4210a9c10d0091371ea9b028b7d6fa8b9f3/src/Equality.hs#L77-L78

is :: MonadRef m => TermM m -> TermM m -> m () 
is m n
  | m == n = pure ()
  | otherwise = do
...