jmacro-0.6.18: QuasiQuotation library for programmatic generation of Javascript code.

Safe Haskell | None
Language | Haskell2010

Language.Javascript.JMacro.Types

# Documentation

data JType Source #

Constructors

JTNum |
JTString |
JTBool |
JTStat |
JTFunc [JType] JType |
JTList JType |
JTMap JType |
JTRecord JType (Map String JType) |
JTRigid VarRef (Set Constraint) |
JTImpossible |
JTFree VarRef |
JTForall [VarRef] JType |

#### Instances

Instances details

Data JType Source # |

Instance details

Defined in Language.Javascript.JMacro.Types

Methods

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

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

toConstr :: JType -> Constr Source #

dataTypeOf :: JType -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Read JType Source # |
Instance details Defined in Language.Javascript.JMacro.Types Methods readsPrec :: Int -> ReadS JType Source # readList :: ReadS [JType] Source # readPrec :: ReadPrec JType Source # readListPrec :: ReadPrec [JType] Source #
Show JType Source # |
Instance details Defined in Language.Javascript.JMacro.Types Methods showsPrec :: Int -> JType -> ShowS Source # show :: JType -> String Source # showList :: [JType] -> ShowS Source #
Eq JType Source # |
Instance details Defined in Language.Javascript.JMacro.Types Methods (==) :: JType -> JType -> Bool Source # (/=) :: JType -> JType -> Bool Source #
Ord JType Source # |
Instance details Defined in Language.Javascript.JMacro.Types Methods compare :: JType -> JType -> Ordering Source # (<) :: JType -> JType -> Bool Source # (<=) :: JType -> JType -> Bool Source # (>) :: JType -> JType -> Bool Source # (>=) :: JType -> JType -> Bool Source # max :: JType -> JType -> JType Source # min :: JType -> JType -> JType Source #
JsToDoc JLocalType Source # |
Instance details Defined in Language.Javascript.JMacro.Base Methods jsToDoc :: JLocalType -> Doc Source #
JsToDoc JType Source # |
Instance details Defined in Language.Javascript.JMacro.Base Methods jsToDoc :: JType -> Doc Source #
Compos1 JType Source # |
Instance details Defined in Language.Javascript.JMacro.TypeCheck Methods compos1 :: (forall a. a -> m a) -> (forall a b. m (a -> b) -> m a -> m b) -> (JType -> m JType) -> JType -> m JType Source #

data Constraint Source #

Constructors

Sub JType |
Super JType |

#### Instances

Instances details

Data Constraint Source # |

Instance details

Defined in Language.Javascript.JMacro.Types

Methods

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

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

toConstr :: Constraint -> Constr Source #

dataTypeOf :: Constraint -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Read Constraint Source # |
Instance details Defined in Language.Javascript.JMacro.Types Methods readsPrec :: Int -> ReadS Constraint Source # readList :: ReadS [Constraint] Source # readPrec :: ReadPrec Constraint Source # readListPrec :: ReadPrec [Constraint] Source #
Show Constraint Source # |
Instance details Defined in Language.Javascript.JMacro.Types Methods showsPrec :: Int -> Constraint -> ShowS Source # show :: Constraint -> String Source # showList :: [Constraint] -> ShowS Source #
Eq Constraint Source # |
Instance details Defined in Language.Javascript.JMacro.Types Methods (==) :: Constraint -> Constraint -> Bool Source # (/=) :: Constraint -> Constraint -> Bool Source #
Ord Constraint Source # |

Instance details

Defined in Language.Javascript.JMacro.Types

Methods

compare :: Constraint -> Constraint -> Ordering Source #

(<) :: Constraint -> Constraint -> Bool Source #

(<=) :: Constraint -> Constraint -> Bool Source #

(>) :: Constraint -> Constraint -> Bool Source #

(>=) :: Constraint -> Constraint -> Bool Source #

max :: Constraint -> Constraint -> Constraint Source #

min :: Constraint -> Constraint -> Constraint Source #

JsToDoc JLocalType Source # |
Instance details Defined in Language.Javascript.JMacro.Base Methods jsToDoc :: JLocalType -> Doc Source #

type JLocalType = ([(VarRef, Constraint)], JType) Source #

type VarRef = (Maybe String, Int) Source #

anyType :: TypeParser JType Source #

parseType :: String -> Either ParseError JType Source #

runTypeParser :: CharParser a JLocalType Source #