Safe Haskell | None |
---|---|
Language | Haskell2010 |
Servant.PureScript.Internal
Synopsis
- data PureScript bridgeSelector
- class HasBridge a where
- languageBridge :: Proxy a -> FullBridge
- data DefaultBridge
- defaultBridgeProxy :: Proxy DefaultBridge
- type ParamName = Text
- data Param f = Param {}
- type PSParam = Param PSType
- pType :: forall f f. Lens (Param f) (Param f) f f
- pName :: forall f. Lens' (Param f) ParamName
- data Settings = Settings {}
- standardImports :: Lens' Settings ImportLines
- readerParams :: Lens' Settings (Set ParamName)
- generateSubscriberAPI :: Lens' Settings Bool
- apiModuleName :: Lens' Settings Text
- defaultSettings :: Settings
- addReaderParam :: ParamName -> Settings -> Settings
- baseURLId :: ParamName
- baseURLParam :: PSParam
- subscriberToUserId :: ParamName
- makeTypedToUserParam :: PSType -> PSParam
- apiToList :: forall bridgeSelector api. (HasForeign (PureScript bridgeSelector) PSType api, GenerateList PSType (Foreign PSType api), HasBridge bridgeSelector) => Proxy api -> Proxy bridgeSelector -> [Req PSType]
- toPSVarName :: Text -> Text
- psTypedToUser :: PSType -> PSType
- psSubscriptions :: PSType
- psTypeParameterA :: PSType
- jsCamelCaseL :: Getter FunctionName Text
Documentation
data PureScript bridgeSelector Source #
Our language type is Paramized, so you can choose a custom TypeBridge
for your translation, by
providing your own data type and implementing HasBridge
for it.
data MyBridge myBridge :: TypeBridge myBridge = defaultBridge <|> customBridge1 <|> customBridge2 instance HasBridge MyBridge where languageBridge _ = myBridge
Instances
(Typeable a, HasBridge bridgeSelector) => HasForeignType (PureScript bridgeSelector :: Type) PSType (a :: Type) Source # | |
Defined in Servant.PureScript.Internal |
class HasBridge a where Source #
Methods
languageBridge :: Proxy a -> FullBridge Source #
Instances
HasBridge DefaultBridge Source # |
|
Defined in Servant.PureScript.Internal Methods languageBridge :: Proxy DefaultBridge -> FullBridge Source # |
data DefaultBridge Source #
Use PureScript
DefaultBridge
if defaultBridge
suffices for your needs.
Instances
HasBridge DefaultBridge Source # |
|
Defined in Servant.PureScript.Internal Methods languageBridge :: Proxy DefaultBridge -> FullBridge Source # |
defaultBridgeProxy :: Proxy DefaultBridge Source #
A proxy for DefaultBridge
Constructors
Settings | |
Fields
|
addReaderParam :: ParamName -> Settings -> Settings Source #
Add a parameter name to be us put in the Reader monad instead of being passed to the generated functions.
makeTypedToUserParam :: PSType -> PSParam Source #
apiToList :: forall bridgeSelector api. (HasForeign (PureScript bridgeSelector) PSType api, GenerateList PSType (Foreign PSType api), HasBridge bridgeSelector) => Proxy api -> Proxy bridgeSelector -> [Req PSType] Source #
toPSVarName :: Text -> Text Source #
Transform a given identifer to be a valid PureScript variable name (hopefully).
psTypedToUser :: PSType -> PSType Source #