is-0.4.3: Generic pattern predicates

Safe HaskellSafe
LanguageHaskell2010

Data.Generics.Is.Generic

Contents

Synopsis

Predicates

Given a constructor K for a type T which implements Generic, and a value a of type T, 'isC K a' evaluates a to WHNF, and returns True if K is the head constructor of the result.

not . isC K ≡ isNotC K
$(is 'K) ≡ isC K

is :: forall c a. (Constructs c a, Generic a, EqHead (Rep a)) => c -> a -> Bool Source #

isNot :: forall c a. (Constructs c a, Generic a, EqHead (Rep a)) => c -> a -> Bool Source #