summaryrefslogtreecommitdiff
path: root/src/Language/Fiddle/Ast/Internal/Instances.hs
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-10-05 17:13:26 -0600
committerJosh Rahm <joshuarahm@gmail.com>2024-10-05 17:13:26 -0600
commit3ceedaf5f5193fadadcb011c40df1688cfed279d (patch)
tree772c8a0c607d68e287addc59bdde71172edd10b1 /src/Language/Fiddle/Ast/Internal/Instances.hs
parent407e41489cc22fbf0518fd370530f8857b8c3ed0 (diff)
downloadfiddle-3ceedaf5f5193fadadcb011c40df1688cfed279d.tar.gz
fiddle-3ceedaf5f5193fadadcb011c40df1688cfed279d.tar.bz2
fiddle-3ceedaf5f5193fadadcb011c40df1688cfed279d.zip
Implement qualification.
Big change. Implements qualification, which separates the qualification concerns from the ConsistencyCheck phase. I'm getting close to implementing a backend.
Diffstat (limited to 'src/Language/Fiddle/Ast/Internal/Instances.hs')
-rw-r--r--src/Language/Fiddle/Ast/Internal/Instances.hs10
1 files changed, 8 insertions, 2 deletions
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
@@ -311,6 +311,12 @@ instance
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
) =>