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:
parent
168d0fa318
commit
37b00e5a47
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user