1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 21:16:12 +03:00

Simplify the non-Copy cases.

This commit is contained in:
Rob Rix 2017-09-10 17:43:12 +01:00
parent 472363e3e9
commit dbc79d8ab0

View File

@ -69,8 +69,7 @@ evalDiffRM algebra = go
env <- ask
let extended = foldr (uncurry envExtend) env bindings
local (const extended) $ algebra (Copy bindings ann syntax)
Patch patch -> algebra (Patch patch)
Var var -> algebra (Var var)
_ -> algebra diff
diffSum :: (Foldable syntax, Functor syntax) => (forall a. Patch a -> Int) -> Diff syntax ann -> Int