1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

Generic1 instance for TermF

This commit is contained in:
Timothy Clem 2018-10-31 08:28:37 -07:00
parent 3e26d933b3
commit feef6e3ed6

View File

@ -42,7 +42,7 @@ guardTerm :: forall m f syntax ann . (f :< syntax, Alternative m)
guardTerm = Sum.projectGuard . termOut
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'.
-- Useful in term-rewriting algebras.