mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Compute/ConcreteNew.hs: adding a Prawitz rewrite
(table { p_i => t_i } ! x).l ==> table { p_i => t_i.l } ! x
This was used in the old partial evaluator and can significantly reduce term
sizes in some cases.
This commit is contained in:
@@ -180,6 +180,7 @@ proj l v =
|
||||
VFV vs -> liftM vfv (mapM (proj l) vs)
|
||||
VRec rs -> lookup l rs
|
||||
VExtR v1 v2 -> proj l v2 `mplus` proj l v1 -- hmm
|
||||
VS (VV pty pvs rs) v2 -> flip VS v2 . VV pty pvs # mapM (proj l) rs
|
||||
_ -> return (ok1 VP v l)
|
||||
|
||||
ok1 f v1@(VError {}) _ = v1
|
||||
|
||||
Reference in New Issue
Block a user