1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 04:51:57 +03:00

📝 the Eval instance for TermF.

This commit is contained in:
Rob Rix 2017-12-21 13:11:49 -05:00
parent c6e086d208
commit 14d5c275f2

View File

@ -33,6 +33,7 @@ class Monad m => Eval term v m constr where
instance (Monad m, Apply (Eval t v m) fs) => Eval t v m (Union fs) where
eval ev yield = apply (Proxy :: Proxy (Eval t v m)) (eval ev yield)
-- | Evaluating a 'TermF' ignores its annotation, evaluating the underlying syntax.
instance (Monad m, Eval t v m s) => Eval t v m (TermF s a) where
eval ev yield In{..} = eval ev yield termFOut