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

Derive Foldable, Functor, & Traversable instances for Domain.

This commit is contained in:
Rob Rix 2019-11-04 15:52:40 -05:00
parent 3bafe21a23
commit e5bfa87d86
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -1,4 +1,4 @@
{-# LANGUAGE FlexibleContexts, GeneralizedNewtypeDeriving, QuantifiedConstraints, StandaloneDeriving #-}
{-# LANGUAGE DeriveTraversable, FlexibleContexts, GeneralizedNewtypeDeriving, QuantifiedConstraints, StandaloneDeriving #-}
module Analysis.Domain
( unit
, bool
@ -47,6 +47,7 @@ data Domain f a
| String Text
| Record [(Name, f a)]
| Lam (Maybe Name) (Scope () f a)
deriving (Foldable, Functor, Traversable)
deriving instance (Eq a, forall a . Eq a => Eq (f a), Monad f) => Eq (Domain f a)
deriving instance (Ord a, forall a . Eq a => Eq (f a)