| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Servant.Record
Synopsis
- data RecordParam (a :: *)
- type family UnRecordParam (x :: *) :: * where ...
Documentation
data RecordParam (a :: *) Source #
Instances
| (Generic a, GHasLink (Rep a) sub) => HasLink (RecordParam a :> sub :: Type) Source # | |
Defined in Servant.Record Associated Types type MkLink (RecordParam a :> sub) a :: Type # Methods toLink :: (Link -> a0) -> Proxy (RecordParam a :> sub) -> Link -> MkLink (RecordParam a :> sub) a0 # | |
| type MkLink (RecordParam a :> sub :: Type) b Source # | |
Defined in Servant.Record | |
type family UnRecordParam (x :: *) :: * where ... Source #
Type family to rewrite a RecordParam Api to a regular servant API. Useful to define instances for classes that extract information from the API type, such as Servant.Swagger, or servant-foreign.
Typical use:
instance SomeClass (UnRecordParam (RecordParam a :> api))) =>
SomeClass (RecordParam a :> api) where
someMethod _ =
someMethod (Proxy :: Proxy (UnRecordParam (RecordParam a :> api))Equations
| UnRecordParam (a :> b) = ServantAppend (UnRecordParam a) b | |
| UnRecordParam (RecordParam a) = UnRecordParam (Rep a ()) | |
| UnRecordParam (D1 m c d) = UnRecordParam (c d) | |
| UnRecordParam ((a :*: b) d) = ServantAppend (UnRecordParam (a d)) (UnRecordParam (b d)) | |
| UnRecordParam (C1 m a d) = UnRecordParam (a d) | |
| UnRecordParam (S1 (MetaSel (Just sym) d1 d2 d3) (Rec0 Bool) d) = QueryFlag sym | |
| UnRecordParam (S1 (MetaSel (Just sym) d1 d2 d3) (Rec0 [a]) d) = QueryParams sym a | |
| UnRecordParam (S1 (MetaSel (Just sym) d1 d2 d3) (Rec0 (Maybe a)) d) = QueryParam' [Optional, Strict] sym a | |
| UnRecordParam (S1 (MetaSel (Just sym) d1 d2 d3) (Rec0 a) d) = QueryParam' [Required, Strict] sym a |