Module

Data.Data

Package
purescript-ajnsit-typeable
Repository
yaitskov/purescript-typeable

#mkT Source

mkT :: forall a b. Typeable a => Typeable b => (b -> b) -> a -> a

#mkQ Source

mkQ :: forall a b r. Typeable a => Typeable b => r -> (b -> r) -> a -> r

#mkM Source

mkM :: forall a b m. Typeable a => Typeable b => Typeable (m a) => Typeable (m b) => Applicative m => (b -> m b) -> a -> m a

#DataDict Source

newtype DataDict a

Constructors

  • DataDict (forall c. (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> a -> c a)

#gfoldl Source

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

#Data Source

class (Typeable a) <= Data a  where

Members

Instances

#gmapT Source

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

A generic transformation that maps over the immediate subterms

#gmapQl Source

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

A generic query with a left-associative binary operator

#gmapQr Source

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

A generic query with a right-associative binary operator

#gmapQ Source

gmapQ :: forall a u. Data a => (forall d. Data d => d -> u) -> a -> Array u

A generic query that processes the immediate subterms and returns a list

#gmapQi Source

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

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

#gmapM Source

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

A generic monadic transformation that maps over the immediate subterms

#gmapMp Source

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

Transformation of at least one immediate subterm does not fail

#gmapMo Source

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

Transformation of one immediate subterm with success

#Qi Source

data Qi :: forall k. Type -> k -> Typedata Qi q a

Type constructor for adding counters to queries

Constructors

#Qr Source

newtype Qr :: forall k. Type -> k -> Typenewtype Qr r a

The type constructor used in definition of gmapQr

Constructors

  • Qr (r -> r)

#unQr Source

unQr :: forall r a. Qr r a -> r -> r

#Mp Source

newtype Mp :: (Type -> Type) -> Type -> Typenewtype Mp m x

The type constructor used in definition of gmapMp

Constructors

#unMp Source

unMp :: forall m x. Mp m x -> m (Tuple x Boolean)

#everywhere Source

everywhere :: forall a. Data a => (forall b. Data b => b -> b) -> a -> a

Apply a transformation everywhere, bottom-up

#everywhere' Source

everywhere' :: forall a. Data a => (forall b. Data b => b -> b) -> a -> a

Apply a transformation everywhere, top-down

#everything Source

everything :: forall a r. Data a => (r -> r -> r) -> (forall b. Data b => b -> r) -> a -> r

Summarise all nodes in top-down, left-to-right

#everywhereM Source

everywhereM :: forall m a. Monad m => Data a => (forall b. Data b => b -> m b) -> a -> m a

Apply a monadic transformation everywhere, bottom-up