type-interpreter-0.1.4: Interpreter for Template Haskell types

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.TH.TypeInterpreter

Synopsis

Documentation

data TypeAtom Source #

Type atom

Instances

Eq TypeAtom Source # 
Data TypeAtom Source # 

Methods

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

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

toConstr :: TypeAtom -> Constr #

dataTypeOf :: TypeAtom -> DataType #

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

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

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

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

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

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

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

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

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

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

Show TypeAtom Source # 
Lift TypeAtom Source # 

Methods

lift :: TypeAtom -> Q Exp #

data TypeEquation Source #

Type equation

Constructors

TypeEquation [TypeExp] TypeExp 

Instances

Eq TypeEquation Source # 
Data TypeEquation Source # 

Methods

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

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

toConstr :: TypeEquation -> Constr #

dataTypeOf :: TypeEquation -> DataType #

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

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

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

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

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

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

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

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

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

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

Show TypeEquation Source # 
Lift TypeEquation Source # 

Methods

lift :: TypeEquation -> Q Exp #

data TypeExp Source #

Type expression

Instances

Eq TypeExp Source # 

Methods

(==) :: TypeExp -> TypeExp -> Bool #

(/=) :: TypeExp -> TypeExp -> Bool #

Data TypeExp Source # 

Methods

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

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

toConstr :: TypeExp -> Constr #

dataTypeOf :: TypeExp -> DataType #

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

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

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

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

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

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

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

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

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

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

Show TypeExp Source # 
Lift TypeExp Source # 

Methods

lift :: TypeExp -> Q Exp #

pattern Synonym :: Name -> TypeExp -> TypeExp Source #

Synonym

fromType :: Type -> Q TypeExp Source #

Get the type expression for a Type. Attempts to reduce the resulting type expression.

fromName :: Name -> Q TypeExp Source #

Get the type expression for a Name. Attempts to reduce the resulting type expression.

substitute :: Name -> TypeExp -> TypeExp -> TypeExp Source #

substitute name typ exp replaces all occurences of name in exp with typ.

substituteAll :: Map Name TypeExp -> TypeExp -> TypeExp Source #

Just like substitute but for more variables.

reduce :: TypeExp -> TypeExp Source #

Try to reduce the given type expression as much as possible.

match :: TypeExp -> TypeExp -> Maybe (Map Name TypeExp) Source #

match pat input pattern matches input against the given pat.