1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 01:42:43 +03:00

Derive Foldable, Functor, & Traversable instances for Term.

This commit is contained in:
Rob Rix 2019-07-17 11:09:04 -04:00
parent 168d0fa318
commit 37b00e5a47
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -1,4 +1,4 @@
{-# LANGUAGE QuantifiedConstraints, StandaloneDeriving, UndecidableInstances #-}
{-# LANGUAGE DeriveTraversable, QuantifiedConstraints, StandaloneDeriving, UndecidableInstances #-}
module Data.Term
( Term(..)
) where
@ -8,3 +8,9 @@ data Term sig a
| Term (sig (Term sig) a)
deriving instance (Show a, forall g x . (Show x, forall y . Show y => Show (g y)) => Show (sig g x)) => Show (Term sig a)
deriving instance ( forall g . Foldable g => Foldable (sig g)) => Foldable (Term sig)
deriving instance ( forall g . Functor g => Functor (sig g)) => Functor (Term sig)
deriving instance ( forall g . Foldable g => Foldable (sig g)
, forall g . Functor g => Functor (sig g)
, forall g . Traversable g => Traversable (sig g)) => Traversable (Term sig)