is-0.4.3: Generic pattern predicates

Safe HaskellSafe
LanguageHaskell2010

Data.Generics.Is.Data

Synopsis
  • is :: forall a b. (Constructs a b, Data b) => a -> b -> Bool
  • isNot :: forall a b. (Constructs a b, Data b) => a -> b -> Bool

Documentation

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

$(is 'K)   ≡ is K

is :: forall a b. (Constructs a b, Data b) => a -> b -> Bool Source #

not . is K ≡ isNot K

isNot :: forall a b. (Constructs a b, Data b) => a -> b -> Bool Source #