From 3ceedaf5f5193fadadcb011c40df1688cfed279d Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sat, 5 Oct 2024 17:13:26 -0600 Subject: Implement qualification. Big change. Implements qualification, which separates the qualification concerns from the ConsistencyCheck phase. I'm getting close to implementing a backend. --- src/Language/Fiddle/Ast/Internal/Instances.hs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/Language/Fiddle/Ast/Internal/Instances.hs') diff --git a/src/Language/Fiddle/Ast/Internal/Instances.hs b/src/Language/Fiddle/Ast/Internal/Instances.hs index 232d5c0..aaa20b8 100644 --- a/src/Language/Fiddle/Ast/Internal/Instances.hs +++ b/src/Language/Fiddle/Ast/Internal/Instances.hs @@ -120,8 +120,8 @@ class stage ( t (StageAfter stage) -- The next stage in the pipeline - (StageFunctor stage) -- The functor associated with the next stage - (StageAnnotation stage) -- Annotation type for the next stage + (StageFunctor stage) -- The functor associated with this stage + (StageAnnotation stage) -- Annotation type for this stage ) -- | Default implementation of 'advanceStage' using generics. This leverages @@ -310,6 +310,12 @@ instance newK <- mapM (alter ffn fn) (unK1 k1) K1 <$> ffn newK +instance + (Traversable f1) => + GAlter t f1 f2 a1 a2 (Rec0 (f1 x)) (Rec0 (f2 x)) + where + galter _ ffn _ (K1 k) = K1 <$> ffn k + instance ( GAlter t f1 f2 a1 a2 l1 l2, GAlter t f1 f2 a1 a2 r1 r2 -- cgit