th-bang-compat-0.0.1.0: Compatibility for bang-type template

Copyright | 2019 Kei Hibino
License | BSD3
Maintainer | ex8k.hibino@gmail.com
Stability | experimental
Portability | unknown
Safe Haskell | Safe
Language | Haskell2010

Language.Haskell.TH.Compat.Bang

Contents

- Compat type constructors
- Compat functions

Description

This module provides compatibility definitions of bang-type template for before temaplate-haskell-2.10

Synopsis

- data Bang
- type BangQ = Q Bang
- type BangType = (Bang, Type)
- type BangTypeQ = Q BangType
- type VarBangType = (Name, Bang, Type)
- type VarBangTypeQ = Q VarBangType
- data SourceUnpackedness
  - = NoSourceUnpackedness
  - | SourceNoUnpack
  - | SourceUnpack
- type SourceUnpackednessQ = Q SourceUnpackedness
- data SourceStrictness
  - = NoSourceStrictness
  - | SourceLazy
  - | SourceStrict
- type SourceStrictnessQ = Q SourceStrictness
- bang :: SourceUnpackednessQ -> SourceStrictnessQ -> BangQ
- bangType :: BangQ -> TypeQ -> BangTypeQ
- varBangType :: Name -> BangTypeQ -> VarBangTypeQ
- noSourceUnpackedness :: SourceUnpackednessQ
- sourceNoUnpack :: SourceUnpackednessQ
- sourceUnpack :: SourceUnpackednessQ
- noSourceStrictness :: SourceStrictnessQ
- sourceLazy :: SourceStrictnessQ
- sourceStrict :: SourceStrictnessQ

# Compat type constructors

data Bang #

#### Instances

Instances details

Eq Bang |
Instance details Defined in Language.Haskell.TH.Syntax Methods (==) :: Bang -> Bang -> Bool (/=) :: Bang -> Bang -> Bool
Data Bang |

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

toConstr :: Bang -> Constr

dataTypeOf :: Bang -> DataType

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

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

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

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

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

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

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

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

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

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

Ord Bang |
Instance details Defined in Language.Haskell.TH.Syntax Methods compare :: Bang -> Bang -> Ordering (<) :: Bang -> Bang -> Bool (<=) :: Bang -> Bang -> Bool (>) :: Bang -> Bang -> Bool (>=) :: Bang -> Bang -> Bool max :: Bang -> Bang -> Bang min :: Bang -> Bang -> Bang
Show Bang |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> Bang -> ShowS show :: Bang -> String showList :: [Bang] -> ShowS
Generic Bang |
Instance details Defined in Language.Haskell.TH.Syntax Associated Types type Rep Bang :: Type -> Type Methods from :: Bang -> Rep Bang x to :: Rep Bang x -> Bang
type Rep Bang |

Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Bang = D1 ('MetaData "Bang" "Language.Haskell.TH.Syntax" "template-haskell" 'False) (C1 ('MetaCons "Bang" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceUnpackedness) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceStrictness)))

type BangQ = Q Bang #

type BangType = (Bang, Type) #

type BangTypeQ = Q BangType #

type VarBangType = (Name, Bang, Type) #

type VarBangTypeQ = Q VarBangType #

data SourceUnpackedness #

Constructors

NoSourceUnpackedness |
SourceNoUnpack |
SourceUnpack |

#### Instances

Instances details

Eq SourceUnpackedness |
Instance details Defined in Language.Haskell.TH.Syntax Methods (==) :: SourceUnpackedness -> SourceUnpackedness -> Bool (/=) :: SourceUnpackedness -> SourceUnpackedness -> Bool
Data SourceUnpackedness |

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

toConstr :: SourceUnpackedness -> Constr

dataTypeOf :: SourceUnpackedness -> DataType

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

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

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

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

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

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

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

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

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

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

Ord SourceUnpackedness |

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: SourceUnpackedness -> SourceUnpackedness -> Ordering

(<) :: SourceUnpackedness -> SourceUnpackedness -> Bool

(<=) :: SourceUnpackedness -> SourceUnpackedness -> Bool

(>) :: SourceUnpackedness -> SourceUnpackedness -> Bool

(>=) :: SourceUnpackedness -> SourceUnpackedness -> Bool

max :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness

min :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness

Show SourceUnpackedness |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> SourceUnpackedness -> ShowS show :: SourceUnpackedness -> String showList :: [SourceUnpackedness] -> ShowS
Generic SourceUnpackedness |
Instance details Defined in Language.Haskell.TH.Syntax Associated Types type Rep SourceUnpackedness :: Type -> Type Methods from :: SourceUnpackedness -> Rep SourceUnpackedness x to :: Rep SourceUnpackedness x -> SourceUnpackedness
type Rep SourceUnpackedness |
Instance details Defined in Language.Haskell.TH.Syntax type Rep SourceUnpackedness = D1 ('MetaData "SourceUnpackedness" "Language.Haskell.TH.Syntax" "template-haskell" 'False) (C1 ('MetaCons "NoSourceUnpackedness" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SourceNoUnpack" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SourceUnpack" 'PrefixI 'False) (U1 :: Type -> Type)))

type SourceUnpackednessQ = Q SourceUnpackedness #

data SourceStrictness #

Constructors

NoSourceStrictness |
SourceLazy |
SourceStrict |

#### Instances

Instances details

Eq SourceStrictness |
Instance details Defined in Language.Haskell.TH.Syntax Methods (==) :: SourceStrictness -> SourceStrictness -> Bool (/=) :: SourceStrictness -> SourceStrictness -> Bool
Data SourceStrictness |

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

toConstr :: SourceStrictness -> Constr

dataTypeOf :: SourceStrictness -> DataType

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

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

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

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

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

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

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

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

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

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

Ord SourceStrictness |

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: SourceStrictness -> SourceStrictness -> Ordering

(<) :: SourceStrictness -> SourceStrictness -> Bool

(<=) :: SourceStrictness -> SourceStrictness -> Bool

(>) :: SourceStrictness -> SourceStrictness -> Bool

(>=) :: SourceStrictness -> SourceStrictness -> Bool

max :: SourceStrictness -> SourceStrictness -> SourceStrictness

min :: SourceStrictness -> SourceStrictness -> SourceStrictness

Show SourceStrictness |
Instance details Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> SourceStrictness -> ShowS show :: SourceStrictness -> String showList :: [SourceStrictness] -> ShowS
Generic SourceStrictness |
Instance details Defined in Language.Haskell.TH.Syntax Associated Types type Rep SourceStrictness :: Type -> Type Methods from :: SourceStrictness -> Rep SourceStrictness x to :: Rep SourceStrictness x -> SourceStrictness
type Rep SourceStrictness |
Instance details Defined in Language.Haskell.TH.Syntax type Rep SourceStrictness = D1 ('MetaData "SourceStrictness" "Language.Haskell.TH.Syntax" "template-haskell" 'False) (C1 ('MetaCons "NoSourceStrictness" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SourceLazy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SourceStrict" 'PrefixI 'False) (U1 :: Type -> Type)))

type SourceStrictnessQ = Q SourceStrictness #

# Compat functions

bang :: SourceUnpackednessQ -> SourceStrictnessQ -> BangQ #

bangType :: BangQ -> TypeQ -> BangTypeQ #

varBangType :: Name -> BangTypeQ -> VarBangTypeQ #

noSourceUnpackedness :: SourceUnpackednessQ #

sourceNoUnpack :: SourceUnpackednessQ #

sourceUnpack :: SourceUnpackednessQ #

noSourceStrictness :: SourceStrictnessQ #

sourceLazy :: SourceStrictnessQ #

sourceStrict :: SourceStrictnessQ #