From 6086402d4e2927c76c4c8914559fdbc5beb987f8 Mon Sep 17 00:00:00 2001 From: crumbtoo Date: Mon, 26 Feb 2024 17:03:20 -0700 Subject: [PATCH] HasBinders Binding --- src/Core/Syntax.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Core/Syntax.hs b/src/Core/Syntax.hs index d444579..03a2292 100644 --- a/src/Core/Syntax.hs +++ b/src/Core/Syntax.hs @@ -535,8 +535,9 @@ instance HasBinders a a b b' binders k (AlterF con bs e) = AlterF con <$> traverse k bs <*> traverseOf binders k e -instance HasBinders (BindingF b a) (BindingF b' a) b b' where - binders = undefined +instance HasBinders a a b b' + => HasBinders (BindingF b a) (BindingF b' a) b b' where + binders k (BindingF b v) = BindingF <$> k b <*> binders k v instance (HasBinders (f b (Fix (f b))) (f b' (Fix (f b'))) b b') => HasBinders (Fix (f b)) (Fix (f b')) b b' where