base-4.8.2.0: Basic libraries

Copyright(c) The University of Glasgow, CWI 2001--2004
LicenseBSD-style (see the file libraries/base/LICENSE)
Maintainerlibraries@haskell.org
Stabilityexperimental
Portabilitynon-portable (local universal quantification)
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Data

Contents

Description

"Scrap your boilerplate" --- Generic programming in Haskell. See http://www.haskell.org/haskellwiki/Research_papers/Generics#Scrap_your_boilerplate.21. This module provides the Data class with its primitives for generic programming, along with instances for many datatypes. It corresponds to a merge between the previous Data.Generics.Basics and almost all of Data.Generics.Instances. The instances that are not present in this module were moved to the Data.Generics.Instances module in the syb package.

For more information, please visit the new SYB wiki: http://www.cs.uu.nl/wiki/bin/view/GenericProgramming/SYB.

Synopsis

Module Data.Typeable re-exported for convenience

The Data class for processing constructor applications

class Typeable a => Data a where Source

The Data class comprehends a fundamental primitive gfoldl for folding over constructor applications, say terms. This primitive can be instantiated in several ways to map over the immediate subterms of a term; see the gmap combinators later in this class. Indeed, a generic programmer does not necessarily need to use the ingenious gfoldl primitive but rather the intuitive gmap combinators. The gfoldl primitive is completed by means to query top-level constructors, to turn constructor representations into proper terms, and to list all possible datatype constructors. This completion allows us to serve generic programming scenarios like read, show, equality, term generation.

The combinators gmapT, gmapQ, gmapM, etc are all provided with default definitions in terms of gfoldl, leaving open the opportunity to provide datatype-specific definitions. (The inclusion of the gmap combinators as members of class Data allows the programmer or the compiler to derive specialised, and maybe more efficient code per datatype. Note: gfoldl is more higher-order than the gmap combinators. This is subject to ongoing benchmarking experiments. It might turn out that the gmap combinators will be moved out of the class Data.)

Conceptually, the definition of the gmap combinators in terms of the primitive gfoldl requires the identification of the gfoldl function arguments. Technically, we also need to identify the type constructor c for the construction of the result type from the folded term type.

In the definition of gmapQx combinators, we use phantom type constructors for the c in the type of gfoldl because the result type of a query does not involve the (polymorphic) type of the term argument. In the definition of gmapQl we simply use the plain constant type constructor because gfoldl is left-associative anyway and so it is readily suited to fold a left-associative binary operation over the immediate subterms. In the definition of gmapQr, extra effort is needed. We use a higher-order accumulation trick to mediate between left-associative constructor application vs. right-associative binary operation (e.g., (:)). When the query is meant to compute a value of type r, then the result type withing generic folding is r -> r. So the result of folding is a function to which we finally pass the right unit.

With the -XDeriveDataTypeable option, GHC can generate instances of the Data class automatically. For example, given the declaration

data T a b = C1 a b | C2 deriving (Typeable, Data)

GHC will generate an instance that is equivalent to

instance (Data a, Data b) => Data (T a b) where
    gfoldl k z (C1 a b) = z C1 `k` a `k` b
    gfoldl k z C2       = z C2

    gunfold k z c = case constrIndex c of
                        1 -> k (k (z C1))
                        2 -> z C2

    toConstr (C1 _ _) = con_C1
    toConstr C2       = con_C2

    dataTypeOf _ = ty_T

con_C1 = mkConstr ty_T "C1" [] Prefix
con_C2 = mkConstr ty_T "C2" [] Prefix
ty_T   = mkDataType "Module.T" [con_C1, con_C2]

This is suitable for datatypes that are exported transparently.

Minimal complete definition

gunfold, toConstr, dataTypeOf

Methods

gfoldl Source

Arguments

:: (forall d b. Data d => c (d -> b) -> d -> c b)

defines how nonempty constructor applications are folded. It takes the folded tail of the constructor application and its head, i.e., an immediate subterm, and combines them in some way.

-> (forall g. g -> c g)

defines how the empty constructor application is folded, like the neutral / start element for list folding.

-> a

structure to be folded.

-> c a

result, with a type defined in terms of a, but variability is achieved by means of type constructor c for the construction of the actual result type.

Left-associative fold operation for constructor applications.

The type of gfoldl is a headache, but operationally it is a simple generalisation of a list fold.

The default definition for gfoldl is const id, which is suitable for abstract datatypes with no substructures.

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c a Source

Unfolding constructor applications

toConstr :: a -> Constr Source

Obtaining the constructor from a given datum. For proper terms, this is meant to be the top-level constructor. Primitive datatypes are here viewed as potentially infinite sets of values (i.e., constructors).

dataTypeOf :: a -> DataType Source

The outer type constructor of the type

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c a) Source

Mediate types and unary type constructors. In Data instances of the form T a, dataCast1 should be defined as gcast1.

The default definition is const Nothing, which is appropriate for non-unary type constructors.

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a) Source

Mediate types and binary type constructors. In Data instances of the form T a b, dataCast2 should be defined as gcast2.

The default definition is const Nothing, which is appropriate for non-binary type constructors.

gmapT :: (forall b. Data b => b -> b) -> a -> a Source

A generic transformation that maps over the immediate subterms

The default definition instantiates the type constructor c in the type of gfoldl to an identity datatype constructor, using the isomorphism pair as injection and projection.

gmapQl :: forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r Source

A generic query with a left-associative binary operator

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r Source

A generic query with a right-associative binary operator

gmapQ :: (forall d. Data d => d -> u) -> a -> [u] Source

A generic query that processes the immediate subterms and returns a list of results. The list is given in the same order as originally specified in the declaration of the data constructors.

gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> a -> u Source

A generic query that processes one child by index (zero-based)

gmapM :: forall m. Monad m => (forall d. Data d => d -> m d) -> a -> m a Source

A generic monadic transformation that maps over the immediate subterms

The default definition instantiates the type constructor c in the type of gfoldl to the monad datatype constructor, defining injection and projection using return and >>=.

gmapMp :: forall m. MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a Source

Transformation of at least one immediate subterm does not fail

gmapMo :: forall m. MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a Source

Transformation of one immediate subterm with success

Instances

Data Bool Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bool -> c Bool Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Bool Source

toConstr :: Bool -> Constr Source

dataTypeOf :: Bool -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Bool) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bool) Source

gmapT :: (forall b. Data b => b -> b) -> Bool -> Bool Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bool -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bool -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Bool -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Bool -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bool -> m Bool Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bool -> m Bool Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bool -> m Bool Source

Data Char Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Char -> c Char Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Char Source

toConstr :: Char -> Constr Source

dataTypeOf :: Char -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Char) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Char) Source

gmapT :: (forall b. Data b => b -> b) -> Char -> Char Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Char -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Char -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Char -> m Char Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char Source

Data Double Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Double -> c Double Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Double Source

toConstr :: Double -> Constr Source

dataTypeOf :: Double -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Double) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Double) Source

gmapT :: (forall b. Data b => b -> b) -> Double -> Double Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Double -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Double -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Double -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Double -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Double -> m Double Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Double -> m Double Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Double -> m Double Source

Data Float Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Float -> c Float Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Float Source

toConstr :: Float -> Constr Source

dataTypeOf :: Float -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Float) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Float) Source

gmapT :: (forall b. Data b => b -> b) -> Float -> Float Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Float -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Float -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Float -> m Float Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float Source

Data Int Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int -> c Int Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int Source

toConstr :: Int -> Constr Source

dataTypeOf :: Int -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Int) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int) Source

gmapT :: (forall b. Data b => b -> b) -> Int -> Int Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Int -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int -> m Int Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int -> m Int Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int -> m Int Source

Data Int8 Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int8 -> c Int8 Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int8 Source

toConstr :: Int8 -> Constr Source

dataTypeOf :: Int8 -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Int8) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int8) Source

gmapT :: (forall b. Data b => b -> b) -> Int8 -> Int8 Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int8 -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int8 -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Int8 -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int8 -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int8 -> m Int8 Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int8 -> m Int8 Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int8 -> m Int8 Source

Data Int16 Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int16 -> c Int16 Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int16 Source

toConstr :: Int16 -> Constr Source

dataTypeOf :: Int16 -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Int16) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int16) Source

gmapT :: (forall b. Data b => b -> b) -> Int16 -> Int16 Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int16 -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int16 -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Int16 -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int16 -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int16 -> m Int16 Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int16 -> m Int16 Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int16 -> m Int16 Source

Data Int32 Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int32 -> c Int32 Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int32 Source

toConstr :: Int32 -> Constr Source

dataTypeOf :: Int32 -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Int32) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int32) Source

gmapT :: (forall b. Data b => b -> b) -> Int32 -> Int32 Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int32 -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int32 -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Int32 -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int32 -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 Source

Data Int64 Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int64 -> c Int64 Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int64 Source

toConstr :: Int64 -> Constr Source

dataTypeOf :: Int64 -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Int64) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int64) Source

gmapT :: (forall b. Data b => b -> b) -> Int64 -> Int64 Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Int64 -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int64 -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 Source

Data Integer Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Integer -> c Integer Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Integer Source

toConstr :: Integer -> Constr Source

dataTypeOf :: Integer -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Integer) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Integer) Source

gmapT :: (forall b. Data b => b -> b) -> Integer -> Integer Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Integer -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Integer -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Integer -> m Integer Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer Source

Data Ordering Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ordering -> c Ordering Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Ordering Source

toConstr :: Ordering -> Constr Source

dataTypeOf :: Ordering -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Ordering) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Ordering) Source

gmapT :: (forall b. Data b => b -> b) -> Ordering -> Ordering Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Ordering -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ordering -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering Source

Data Word Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word -> c Word Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word Source

toConstr :: Word -> Constr Source

dataTypeOf :: Word -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Word) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word) Source

gmapT :: (forall b. Data b => b -> b) -> Word -> Word Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Word -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word -> m Word Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word Source

Data Word8 Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word8 -> c Word8 Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word8 Source

toConstr :: Word8 -> Constr Source

dataTypeOf :: Word8 -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Word8) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word8) Source

gmapT :: (forall b. Data b => b -> b) -> Word8 -> Word8 Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word8 -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word8 -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Word8 -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word8 -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 Source

Data Word16 Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word16 -> c Word16 Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word16 Source

toConstr :: Word16 -> Constr Source

dataTypeOf :: Word16 -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Word16) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word16) Source

gmapT :: (forall b. Data b => b -> b) -> Word16 -> Word16 Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word16 -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word16 -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Word16 -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word16 -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 Source

Data Word32 Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word32 -> c Word32 Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word32 Source

toConstr :: Word32 -> Constr Source

dataTypeOf :: Word32 -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Word32) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word32) Source

gmapT :: (forall b. Data b => b -> b) -> Word32 -> Word32 Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word32 -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word32 -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Word32 -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word32 -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 Source

Data Word64 Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word64 -> c Word64 Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word64 Source

toConstr :: Word64 -> Constr Source

dataTypeOf :: Word64 -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Word64) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word64) Source

gmapT :: (forall b. Data b => b -> b) -> Word64 -> Word64 Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word64 -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word64 -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Word64 -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word64 -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 Source

Data () Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> () -> c () Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c () Source

toConstr :: () -> Constr Source

dataTypeOf :: () -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ()) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ()) Source

gmapT :: (forall b. Data b => b -> b) -> () -> () Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> () -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> () -> r Source

gmapQ :: (forall d. Data d => d -> u) -> () -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> () -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> () -> m () Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> () -> m () Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> () -> m () Source

Data Version Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Version -> c Version Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Version Source

toConstr :: Version -> Constr Source

dataTypeOf :: Version -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Version) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Version) Source

gmapT :: (forall b. Data b => b -> b) -> Version -> Version Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Version -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Version -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Version -> m Version Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version Source

Data Natural Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Natural -> c Natural Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Natural Source

toConstr :: Natural -> Constr Source

dataTypeOf :: Natural -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Natural) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Natural) Source

gmapT :: (forall b. Data b => b -> b) -> Natural -> Natural Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Natural -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Natural -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Natural -> m Natural Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural Source

Data SpecConstrAnnotation Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SpecConstrAnnotation -> c SpecConstrAnnotation Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SpecConstrAnnotation Source

toConstr :: SpecConstrAnnotation -> Constr Source

dataTypeOf :: SpecConstrAnnotation -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SpecConstrAnnotation) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SpecConstrAnnotation) Source

gmapT :: (forall b. Data b => b -> b) -> SpecConstrAnnotation -> SpecConstrAnnotation Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SpecConstrAnnotation -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SpecConstrAnnotation -> r Source

gmapQ :: (forall d. Data d => d -> u) -> SpecConstrAnnotation -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> SpecConstrAnnotation -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SpecConstrAnnotation -> m SpecConstrAnnotation Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SpecConstrAnnotation -> m SpecConstrAnnotation Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SpecConstrAnnotation -> m SpecConstrAnnotation Source

Data Void Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Void -> c Void Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Void Source

toConstr :: Void -> Constr Source

dataTypeOf :: Void -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Void) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Void) Source

gmapT :: (forall b. Data b => b -> b) -> Void -> Void Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Void -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Void -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Void -> m Void Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Void -> m Void Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Void -> m Void Source

Data a => Data [a] Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> [a] -> c [a] Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c [a] Source

toConstr :: [a] -> Constr Source

dataTypeOf :: [a] -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c [a]) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c [a]) Source

gmapT :: (forall b. Data b => b -> b) -> [a] -> [a] Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> [a] -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> [a] -> r Source

gmapQ :: (forall d. Data d => d -> u) -> [a] -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> [a] -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> [a] -> m [a] Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> [a] -> m [a] Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> [a] -> m [a] Source

(Data a, Integral a) => Data (Ratio a) Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ratio a -> c (Ratio a) Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ratio a) Source

toConstr :: Ratio a -> Constr Source

dataTypeOf :: Ratio a -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Ratio a)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Ratio a)) Source

gmapT :: (forall b. Data b => b -> b) -> Ratio a -> Ratio a Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ratio a -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ratio a -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Ratio a -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ratio a -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ratio a -> m (Ratio a) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ratio a -> m (Ratio a) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ratio a -> m (Ratio a) Source

(Data a, Typeable * a) => Data (Ptr a) Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ptr a -> c (Ptr a) Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ptr a) Source

toConstr :: Ptr a -> Constr Source

dataTypeOf :: Ptr a -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Ptr a)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Ptr a)) Source

gmapT :: (forall b. Data b => b -> b) -> Ptr a -> Ptr a Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ptr a -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ptr a -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Ptr a -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ptr a -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ptr a -> m (Ptr a) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ptr a -> m (Ptr a) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ptr a -> m (Ptr a) Source

Data a => Data (Maybe a) Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Maybe a -> c (Maybe a) Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Maybe a) Source

toConstr :: Maybe a -> Constr Source

dataTypeOf :: Maybe a -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Maybe a)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Maybe a)) Source

gmapT :: (forall b. Data b => b -> b) -> Maybe a -> Maybe a Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Maybe a -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Maybe a -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) Source

(Data a, Typeable * a) => Data (ForeignPtr a) Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignPtr a -> c (ForeignPtr a) Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ForeignPtr a) Source

toConstr :: ForeignPtr a -> Constr Source

dataTypeOf :: ForeignPtr a -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (ForeignPtr a)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ForeignPtr a)) Source

gmapT :: (forall b. Data b => b -> b) -> ForeignPtr a -> ForeignPtr a Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignPtr a -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignPtr a -> r Source

gmapQ :: (forall d. Data d => d -> u) -> ForeignPtr a -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignPtr a -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignPtr a -> m (ForeignPtr a) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignPtr a -> m (ForeignPtr a) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignPtr a -> m (ForeignPtr a) Source

Data a => Data (Complex a) Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Complex a -> c (Complex a) Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Complex a) Source

toConstr :: Complex a -> Constr Source

dataTypeOf :: Complex a -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Complex a)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Complex a)) Source

gmapT :: (forall b. Data b => b -> b) -> Complex a -> Complex a Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Complex a -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Complex a -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Complex a -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Complex a -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Complex a -> m (Complex a) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Complex a -> m (Complex a) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Complex a -> m (Complex a) Source

Typeable * a => Data (Fixed a) Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixed a -> c (Fixed a) Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Fixed a) Source

toConstr :: Fixed a -> Constr Source

dataTypeOf :: Fixed a -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Fixed a)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Fixed a)) Source

gmapT :: (forall b. Data b => b -> b) -> Fixed a -> Fixed a Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixed a -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixed a -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Fixed a -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixed a -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixed a -> m (Fixed a) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixed a -> m (Fixed a) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixed a -> m (Fixed a) Source

Data a => Data (Identity a) Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Identity a -> c (Identity a) Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Identity a) Source

toConstr :: Identity a -> Constr Source

dataTypeOf :: Identity a -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Identity a)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Identity a)) Source

gmapT :: (forall b. Data b => b -> b) -> Identity a -> Identity a Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Identity a -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Identity a -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Identity a -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Identity a -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) Source

(Data a, Data b) => Data (Either a b) Source 

Methods

gfoldl :: (forall d e. Data d => c (d -> e) -> d -> c e) -> (forall g. g -> c g) -> Either a b -> c (Either a b) Source

gunfold :: (forall d r. Data d => c (d -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Either a b) Source

toConstr :: Either a b -> Constr Source

dataTypeOf :: Either a b -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Either a b)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Either a b)) Source

gmapT :: (forall c. Data c => c -> c) -> Either a b -> Either a b Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Either a b -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Either a b -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) Source

(Data a, Data b) => Data (a, b) Source 

Methods

gfoldl :: (forall d e. Data d => c (d -> e) -> d -> c e) -> (forall g. g -> c g) -> (a, b) -> c (a, b) Source

gunfold :: (forall d r. Data d => c (d -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (a, b) Source

toConstr :: (a, b) -> Constr Source

dataTypeOf :: (a, b) -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (a, b)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (a, b)) Source

gmapT :: (forall c. Data c => c -> c) -> (a, b) -> (a, b) Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (a, b) -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (a, b) -> r Source

gmapQ :: (forall d. Data d => d -> u) -> (a, b) -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> (a, b) -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (a, b) -> m (a, b) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (a, b) -> m (a, b) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (a, b) -> m (a, b) Source

Data t => Data (Proxy * t) Source 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Proxy * t -> c (Proxy * t) Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Proxy * t) Source

toConstr :: Proxy * t -> Constr Source

dataTypeOf :: Proxy * t -> DataType Source

dataCast1 :: Typeable (* -> *) a => (forall d. Data d => c (a d)) -> Maybe (c (Proxy * t)) Source

dataCast2 :: Typeable (* -> * -> *) a => (forall d e. (Data d, Data e) => c (a d e)) -> Maybe (c (Proxy * t)) Source

gmapT :: (forall b. Data b => b -> b) -> Proxy * t -> Proxy * t Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Proxy * t -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Proxy * t -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Proxy * t -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Proxy * t -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Proxy * t -> m (Proxy * t) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Proxy * t -> m (Proxy * t) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Proxy * t -> m (Proxy * t) Source

(Data a, Data b, Data c) => Data (a, b, c) Source 

Methods

gfoldl :: (forall e f. Data e => d (e -> f) -> e -> d f) -> (forall g. g -> d g) -> (a, b, c) -> d (a, b, c) Source

gunfold :: (forall e r. Data e => d (e -> r) -> d r) -> (forall r. r -> d r) -> Constr -> d (a, b, c) Source

toConstr :: (a, b, c) -> Constr Source

dataTypeOf :: (a, b, c) -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall e. Data e => d (t e)) -> Maybe (d (a, b, c)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall e f. (Data e, Data f) => d (t e f)) -> Maybe (d (a, b, c)) Source

gmapT :: (forall d. Data d => d -> d) -> (a, b, c) -> (a, b, c) Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (a, b, c) -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (a, b, c) -> r Source

gmapQ :: (forall d. Data d => d -> u) -> (a, b, c) -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> (a, b, c) -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (a, b, c) -> m (a, b, c) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (a, b, c) -> m (a, b, c) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (a, b, c) -> m (a, b, c) Source

((~) * a b, Data a) => Data ((:~:) * a b) Source 

Methods

gfoldl :: (forall d e. Data d => c (d -> e) -> d -> c e) -> (forall g. g -> c g) -> (* :~: a) b -> c ((* :~: a) b) Source

gunfold :: (forall d r. Data d => c (d -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ((* :~: a) b) Source

toConstr :: (* :~: a) b -> Constr Source

dataTypeOf :: (* :~: a) b -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c ((* :~: a) b)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ((* :~: a) b)) Source

gmapT :: (forall c. Data c => c -> c) -> (* :~: a) b -> (* :~: a) b Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (* :~: a) b -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (* :~: a) b -> r Source

gmapQ :: (forall d. Data d => d -> u) -> (* :~: a) b -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> (* :~: a) b -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (* :~: a) b -> m ((* :~: a) b) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (* :~: a) b -> m ((* :~: a) b) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (* :~: a) b -> m ((* :~: a) b) Source

(Coercible * a b, Data a, Data b) => Data (Coercion * a b) Source 

Methods

gfoldl :: (forall d e. Data d => c (d -> e) -> d -> c e) -> (forall g. g -> c g) -> Coercion * a b -> c (Coercion * a b) Source

gunfold :: (forall d r. Data d => c (d -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Coercion * a b) Source

toConstr :: Coercion * a b -> Constr Source

dataTypeOf :: Coercion * a b -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Coercion * a b)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Coercion * a b)) Source

gmapT :: (forall c. Data c => c -> c) -> Coercion * a b -> Coercion * a b Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Coercion * a b -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Coercion * a b -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Coercion * a b -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Coercion * a b -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Coercion * a b -> m (Coercion * a b) Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Coercion * a b -> m (Coercion * a b) Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Coercion * a b -> m (Coercion * a b) Source

(Data a, Data b, Data c, Data d) => Data (a, b, c, d) Source 

Methods

gfoldl :: (forall f g. Data f => e (f -> g) -> f -> e g) -> (forall g. g -> e g) -> (a, b, c, d) -> e (a, b, c, d) Source

gunfold :: (forall f r. Data f => e (f -> r) -> e r) -> (forall r. r -> e r) -> Constr -> e (a, b, c, d) Source

toConstr :: (a, b, c, d) -> Constr Source

dataTypeOf :: (a, b, c, d) -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall f. Data f => e (t f)) -> Maybe (e (a, b, c, d)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall f g. (Data f, Data g) => e (t f g)) -> Maybe (e (a, b, c, d)) Source

gmapT :: (forall e. Data e => e -> e) -> (a, b, c, d) -> (a, b, c, d) Source

gmapQl :: (r -> r' -> r) -> r -> (forall e. Data e => e -> r') -> (a, b, c, d) -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall e. Data e => e -> r') -> (a, b, c, d) -> r Source

gmapQ :: (forall e. Data e => e -> u) -> (a, b, c, d) -> [u] Source

gmapQi :: Int -> (forall e. Data e => e -> u) -> (a, b, c, d) -> u Source

gmapM :: Monad m => (forall e. Data e => e -> m e) -> (a, b, c, d) -> m (a, b, c, d) Source

gmapMp :: MonadPlus m => (forall e. Data e => e -> m e) -> (a, b, c, d) -> m (a, b, c, d) Source

gmapMo :: MonadPlus m => (forall e. Data e => e -> m e) -> (a, b, c, d) -> m (a, b, c, d) Source

(Data a, Data b, Data c, Data d, Data e) => Data (a, b, c, d, e) Source 

Methods

gfoldl :: (forall g h. Data g => f (g -> h) -> g -> f h) -> (forall g. g -> f g) -> (a, b, c, d, e) -> f (a, b, c, d, e) Source

gunfold :: (forall g r. Data g => f (g -> r) -> f r) -> (forall r. r -> f r) -> Constr -> f (a, b, c, d, e) Source

toConstr :: (a, b, c, d, e) -> Constr Source

dataTypeOf :: (a, b, c, d, e) -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall g. Data g => f (t g)) -> Maybe (f (a, b, c, d, e)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall g h. (Data g, Data h) => f (t g h)) -> Maybe (f (a, b, c, d, e)) Source

gmapT :: (forall f. Data f => f -> f) -> (a, b, c, d, e) -> (a, b, c, d, e) Source

gmapQl :: (r -> r' -> r) -> r -> (forall f. Data f => f -> r') -> (a, b, c, d, e) -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall f. Data f => f -> r') -> (a, b, c, d, e) -> r Source

gmapQ :: (forall f. Data f => f -> u) -> (a, b, c, d, e) -> [u] Source

gmapQi :: Int -> (forall f. Data f => f -> u) -> (a, b, c, d, e) -> u Source

gmapM :: Monad m => (forall f. Data f => f -> m f) -> (a, b, c, d, e) -> m (a, b, c, d, e) Source

gmapMp :: MonadPlus m => (forall f. Data f => f -> m f) -> (a, b, c, d, e) -> m (a, b, c, d, e) Source

gmapMo :: MonadPlus m => (forall f. Data f => f -> m f) -> (a, b, c, d, e) -> m (a, b, c, d, e) Source

(Data a, Data b, Data c, Data d, Data e, Data f) => Data (a, b, c, d, e, f) Source 

Methods

gfoldl :: (forall h i. Data h => g (h -> i) -> h -> g i) -> (forall h. h -> g h) -> (a, b, c, d, e, f) -> g (a, b, c, d, e, f) Source

gunfold :: (forall h r. Data h => g (h -> r) -> g r) -> (forall r. r -> g r) -> Constr -> g (a, b, c, d, e, f) Source

toConstr :: (a, b, c, d, e, f) -> Constr Source

dataTypeOf :: (a, b, c, d, e, f) -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall h. Data h => g (t h)) -> Maybe (g (a, b, c, d, e, f)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall h i. (Data h, Data i) => g (t h i)) -> Maybe (g (a, b, c, d, e, f)) Source

gmapT :: (forall g. Data g => g -> g) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source

gmapQl :: (r -> r' -> r) -> r -> (forall g. Data g => g -> r') -> (a, b, c, d, e, f) -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall g. Data g => g -> r') -> (a, b, c, d, e, f) -> r Source

gmapQ :: (forall g. Data g => g -> u) -> (a, b, c, d, e, f) -> [u] Source

gmapQi :: Int -> (forall g. Data g => g -> u) -> (a, b, c, d, e, f) -> u Source

gmapM :: Monad m => (forall g. Data g => g -> m g) -> (a, b, c, d, e, f) -> m (a, b, c, d, e, f) Source

gmapMp :: MonadPlus m => (forall g. Data g => g -> m g) -> (a, b, c, d, e, f) -> m (a, b, c, d, e, f) Source

gmapMo :: MonadPlus m => (forall g. Data g => g -> m g) -> (a, b, c, d, e, f) -> m (a, b, c, d, e, f) Source

(Data a, Data b, Data c, Data d, Data e, Data f, Data g) => Data (a, b, c, d, e, f, g) Source 

Methods

gfoldl :: (forall i j. Data i => h (i -> j) -> i -> h j) -> (forall i. i -> h i) -> (a, b, c, d, e, f, g) -> h (a, b, c, d, e, f, g) Source

gunfold :: (forall i r. Data i => h (i -> r) -> h r) -> (forall r. r -> h r) -> Constr -> h (a, b, c, d, e, f, g) Source

toConstr :: (a, b, c, d, e, f, g) -> Constr Source

dataTypeOf :: (a, b, c, d, e, f, g) -> DataType Source

dataCast1 :: Typeable (* -> *) t => (forall i. Data i => h (t i)) -> Maybe (h (a, b, c, d, e, f, g)) Source

dataCast2 :: Typeable (* -> * -> *) t => (forall i j. (Data i, Data j) => h (t i j)) -> Maybe (h (a, b, c, d, e, f, g)) Source

gmapT :: (forall h. Data h => h -> h) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source

gmapQl :: (r -> r' -> r) -> r -> (forall h. Data h => h -> r') -> (a, b, c, d, e, f, g) -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall h. Data h => h -> r') -> (a, b, c, d, e, f, g) -> r Source

gmapQ :: (forall h. Data h => h -> u) -> (a, b, c, d, e, f, g) -> [u] Source

gmapQi :: Int -> (forall h. Data h => h -> u) -> (a, b, c, d, e, f, g) -> u Source

gmapM :: Monad m => (forall h. Data h => h -> m h) -> (a, b, c, d, e, f, g) -> m (a, b, c, d, e, f, g) Source

gmapMp :: MonadPlus m => (forall h. Data h => h -> m h) -> (a, b, c, d, e, f, g) -> m (a, b, c, d, e, f, g) Source

gmapMo :: MonadPlus m => (forall h. Data h => h -> m h) -> (a, b, c, d, e, f, g) -> m (a, b, c, d, e, f, g) Source

Datatype representations

data DataType Source

Representation of datatypes. A package of constructor representations with names of type and module.

Constructors

mkDataType :: String -> [Constr] -> DataType Source

Constructs an algebraic datatype

mkIntType :: String -> DataType Source

Constructs the Int type

mkFloatType :: String -> DataType Source

Constructs the Float type

mkCharType :: String -> DataType Source

Constructs the Char type

mkNoRepType :: String -> DataType Source

Constructs a non-representation for a non-representable type

Observers

dataTypeName :: DataType -> String Source

Gets the type constructor including the module

data DataRep Source

Public representation of datatypes

dataTypeRep :: DataType -> DataRep Source

Gets the public presentation of a datatype

Convenience functions

repConstr :: DataType -> ConstrRep -> Constr Source

Look up a constructor by its representation

isAlgType :: DataType -> Bool Source

Test for an algebraic type

dataTypeConstrs :: DataType -> [Constr] Source

Gets the constructors of an algebraic datatype

indexConstr :: DataType -> ConIndex -> Constr Source

Gets the constructor for an index (algebraic datatypes only)

maxConstrIndex :: DataType -> ConIndex Source

Gets the maximum constructor index of an algebraic datatype

isNorepType :: DataType -> Bool Source

Test for a non-representable type

Data constructor representations

data Constr Source

Representation of constructors. Note that equality on constructors with different types may not work -- i.e. the constructors for False and Nothing may compare equal.

Instances

Eq Constr Source

Equality of constructors

Methods

(==) :: Constr -> Constr -> Bool

(/=) :: Constr -> Constr -> Bool

Show Constr Source 

type ConIndex = Int Source

Unique index for datatype constructors, counting from 1 in the order they are given in the program text.

data Fixity Source

Fixity of constructors

Constructors

Prefix 
Infix 

Constructors

mkConstr :: DataType -> String -> [String] -> Fixity -> Constr Source

Constructs a constructor

mkCharConstr :: DataType -> Char -> Constr Source

Makes a constructor for Char.

Observers

constrType :: Constr -> DataType Source

Gets the datatype of a constructor

constrRep :: Constr -> ConstrRep Source

Gets the public presentation of constructors

constrFields :: Constr -> [String] Source

Gets the field labels of a constructor. The list of labels is returned in the same order as they were given in the original constructor declaration.

constrFixity :: Constr -> Fixity Source

Gets the fixity of a constructor

Convenience function: algebraic data types

constrIndex :: Constr -> ConIndex Source

Gets the index of a constructor (algebraic datatypes only)

From strings to constructors and vice versa: all data types

showConstr :: Constr -> String Source

Gets the string for a constructor

readConstr :: DataType -> String -> Maybe Constr Source

Lookup a constructor via a string

Convenience functions: take type constructors apart

tyconUQname :: String -> String Source

Gets the unqualified type constructor: drop *.*.*... before name

tyconModule :: String -> String Source

Gets the module of a type constructor: take *.*.*... before name

Generic operations defined in terms of gunfold

fromConstr :: Data a => Constr -> a Source

Build a term skeleton

fromConstrB :: Data a => (forall d. Data d => d) -> Constr -> a Source

Build a term and use a generic function for subterms

fromConstrM :: forall m a. (Monad m, Data a) => (forall d. Data d => m d) -> Constr -> m a Source

Monadic variation on fromConstrB