mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Generic1 instance for TermF
This commit is contained in:
parent
3e26d933b3
commit
feef6e3ed6
@ -42,7 +42,7 @@ guardTerm :: forall m f syntax ann . (f :< syntax, Alternative m)
|
|||||||
guardTerm = Sum.projectGuard . termOut
|
guardTerm = Sum.projectGuard . termOut
|
||||||
|
|
||||||
data TermF syntax ann recur = In { termFAnnotation :: ann, termFOut :: syntax recur }
|
data TermF syntax ann recur = In { termFAnnotation :: ann, termFOut :: syntax recur }
|
||||||
deriving (Eq, Ord, Foldable, Functor, Show, Traversable)
|
deriving (Eq, Ord, Foldable, Functor, Show, Traversable, Generic1)
|
||||||
|
|
||||||
-- | A convenience typeclass to get the annotation out of a 'Term' or 'TermF'.
|
-- | A convenience typeclass to get the annotation out of a 'Term' or 'TermF'.
|
||||||
-- Useful in term-rewriting algebras.
|
-- Useful in term-rewriting algebras.
|
||||||
|
Loading…
Reference in New Issue
Block a user