Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data TypeInfo lang = TypeInfo {
- _typePackage :: !Text
- _typeModule :: !Text
- _typeName :: !Text
- _typeParameters :: ![TypeInfo lang]
- type PSType = TypeInfo PureScript
- type HaskellType = TypeInfo Haskell
- mkTypeInfo :: Typeable t => Proxy t -> HaskellType
- mkTypeInfo' :: TypeRep -> HaskellType
- data Language
- typePackage :: forall lang. Lens' (TypeInfo lang) Text
- typeModule :: forall lang. Lens' (TypeInfo lang) Text
- typeName :: forall lang. Lens' (TypeInfo lang) Text
- typeParameters :: forall lang lang. Lens (TypeInfo lang) (TypeInfo lang) [TypeInfo lang] [TypeInfo lang]
- class HasHaskType t where
- haskType :: HasHaskType t => Lens' t HaskellType
- flattenTypeInfo :: TypeInfo lang -> [TypeInfo lang]
Documentation
Basic info about a data type:
TypeInfo | |
|
type PSType = TypeInfo PureScript Source #
For convenience:
type HaskellType = TypeInfo Haskell Source #
For convenience:
mkTypeInfo :: Typeable t => Proxy t -> HaskellType Source #
mkTypeInfo' :: TypeRep -> HaskellType Source #
typeParameters :: forall lang lang. Lens (TypeInfo lang) (TypeInfo lang) [TypeInfo lang] [TypeInfo lang] Source #
class HasHaskType t where Source #
Types that have a lens for accessing a 'TypeInfo Haskell'.
haskType :: Lens' t HaskellType Source #
HasHaskType HaskellType Source # | |
HasHaskType BridgeData Source # | By implementing the Example: stringBridge :: BridgePart stringBridge = do -- Note: we are using the HaskellType instance here: haskType ^== mkTypeInfo (Proxy :: Proxy String) return psString |
haskType :: HasHaskType t => Lens' t HaskellType Source #
flattenTypeInfo :: TypeInfo lang -> [TypeInfo lang] Source #
Put the TypeInfo in a list together with all its _typeParameters
(recursively)