Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- data FormFields id = FormFields id
- data InputType
- data FieldName (a :: k)
- data Invalid (a :: k)
- data Input id (valid :: Type -> Type) a = Input {}
- field :: forall id v a. FormField v a -> (v a -> Mod (FormFields id)) -> View (Input id v a) () -> View (FormFields id) ()
- label :: forall id (v :: Type -> Type) a. Text -> View (Input id v a) ()
- input :: forall id (v :: Type -> Type) a. InputType -> Mod (Input id v a) -> View (Input id v a) ()
- form :: forall (form :: (Type -> Type) -> Type) (v :: Type -> Type) id. (Form form v, ViewAction (Action id)) => Action id -> Mod id -> View (FormFields id) () -> View id ()
- textarea :: forall id (v :: Type -> Type) a. Mod (Input id v a) -> Maybe Text -> View (Input id v a) ()
- placeholder :: Text -> Mod id
- submit :: Mod (FormFields id) -> View (FormFields id) () -> View (FormFields id) ()
- formData :: forall form (val :: Type -> Type) (es :: [Effect]). (Form form val, Hyperbole :> es) => Eff es (form Identity)
- class Form (form :: (Type -> Type) -> Type) (val :: Type -> Type) | form -> val where
- formParse :: Form -> Either Text (form Identity)
- collectValids :: form val -> [val ()]
- genForm :: form val
- genFieldsWith :: form val -> form (FormField val)
- formFields :: forall form (val :: Type -> Type). Form form val => form (FormField val)
- formFieldsWith :: forall form (val :: Type -> Type). Form form val => form val -> form (FormField val)
- type family Field (context :: Type -> Type) a
- defaultFormOptions :: FormOptions
- data FormOptions = FormOptions {
- fieldLabelModifier :: String -> String
- data Validated (a :: k)
- = Invalid Text
- | NotInvalid
- | Valid
- data FormField (v :: k -> Type) (a :: k) = FormField {}
- fieldValid :: View (Input id v a) (v a)
- anyInvalid :: forall form (val :: Type -> Type). (Form form val, ValidationState val) => form val -> Bool
- invalidText :: forall a id. View (Input id (Validated :: Type -> Type) a) ()
- validate :: forall {k} (a :: k). Bool -> Text -> Validated a
- data Identity a
- class FromQueryData a
- class Generic a
- class GenFields (f :: k -> Type) where
- gGenFields :: forall (p :: k). f p
- class GenField (f :: Type -> Type) a where
Documentation
Choose one for input
s to give the browser autocomplete hints
field :: forall id v a. FormField v a -> (v a -> Mod (FormFields id)) -> View (Input id v a) () -> View (FormFields id) () Source #
input :: forall id (v :: Type -> Type) a. InputType -> Mod (Input id v a) -> View (Input id v a) () Source #
input for a field
form :: forall (form :: (Type -> Type) -> Type) (v :: Type -> Type) id. (Form form v, ViewAction (Action id)) => Action id -> Mod id -> View (FormFields id) () -> View id () Source #
Type-safe <form>. Calls (Action id) on submit
userForm ::Validation
->View
FormView () userForm v = do form Signup v id $ do el Style.h1 "Sign Up"field
@User id Style.invalid $ dolabel
"Username"input
Username (placeholder
"username") el_invalidText
field
@Age id Style.invalid $ dolabel
"Age"input
Number (placeholder
"age") el_invalidText
submit
(border 1) "Submit"
textarea :: forall id (v :: Type -> Type) a. Mod (Input id v a) -> Maybe Text -> View (Input id v a) () Source #
textarea for a field
placeholder :: Text -> Mod id Source #
submit :: Mod (FormFields id) -> View (FormFields id) () -> View (FormFields id) () Source #
formData :: forall form (val :: Type -> Type) (es :: [Effect]). (Form form val, Hyperbole :> es) => Eff es (form Identity) Source #
class Form (form :: (Type -> Type) -> Type) (val :: Type -> Type) | form -> val where Source #
Parse a FormField
from the request
formAction :: (Hyperbole
:> es,UserDB
:> es) => FormView -> FormAction ->Eff
es (View
FormView ()) formAction _ SignUp = do a <- formField @Age u <- formField @User saveUserToDB u a pure $ el_ "Saved!"
Nothing
formParse :: Form -> Either Text (form Identity) Source #
default formParse :: (Generic (form Identity), GFormParse (Rep (form Identity))) => Form -> Either Text (form Identity) Source #
collectValids :: form val -> [val ()] Source #
default collectValids :: (Generic (form val), GCollect (Rep (form val)) val) => form val -> [val ()] Source #
genFieldsWith :: form val -> form (FormField val) Source #
formFields :: forall form (val :: Type -> Type). Form form val => form (FormField val) Source #
Generate FormFields for the given instance of Form
, with no validation information
let f = formFields @UserForm form @UserForm Submit id $ do field f.user id $ do label "Username" input Username (placeholder "Username")
formFieldsWith :: forall form (val :: Type -> Type). Form form val => form val -> form (FormField val) Source #
Generate FormFields for the givne instance of Form
from validation data
let valids = UserForm { user = Valid, age = Invalid "must be 20 years old" } let f = formFieldsWith @UserForm valids form @UserForm Submit id $ do field f.user id $ do label "Username" input Username (placeholder "Username")
type family Field (context :: Type -> Type) a Source #
Instances
type Field Identity a Source # | |
Defined in Web.Hyperbole.View.Forms | |
type Field Maybe a Source # | |
Defined in Web.Hyperbole.View.Forms | |
type Field (Either String) a Source # | |
type Field (FieldName :: Type -> Type) a Source # | |
type Field (Validated :: Type -> Type) a Source # | |
type Field (FormField v) a Source # | |
Defined in Web.Hyperbole.View.Forms |
defaultFormOptions :: FormOptions #
Default encoding FormOptions
.
FormOptions
{fieldLabelModifier
= id }
data FormOptions #
Generic
-based deriving options for ToForm
and FromForm
.
A common use case for non-default FormOptions
is to strip a prefix off of field labels:
data Project = Project { projectName :: String , projectSize :: Int } deriving (Generic
,Show
) myOptions ::FormOptions
myOptions =FormOptions
{fieldLabelModifier
=map
toLower
.drop
(length
"project") } instanceToForm
Project wheretoForm
=genericToForm
myOptions instanceFromForm
Project wherefromForm
=genericFromForm
myOptions
>>>
urlEncodeAsFormStable Project { projectName = "http-api-data", projectSize = 172 }
"name=http-api-data&size=172">>>
urlDecodeAsForm "name=http-api-data&size=172" :: Either Text Project
Right (Project {projectName = "http-api-data", projectSize = 172})
FormOptions | |
|
data Validated (a :: k) Source #
Validation results for a form
data UserForm f = UserForm { username :: Field f , age :: Field f Int } deriving (Generic) validateUsername :: Username -> Validated Username validateUsername (Username u) = mconcat [ validate (T.elem ' ' u) "Username must not contain spaces" , validate (T.length u < 4) "Username must be at least 4 chars" , if u == "admin" || u == "guest" then Invalid "Username is already in use" else Valid ] formAction :: (Hyperbole
:> es,UserDB
:> es) => FormView -> FormAction ->Eff
es (View
FormView ()) formAction _ SignUp = do u <-formField
@Age case validateUser u a ofValidation
[] -> successView errs -> userForm v
fieldValid :: View (Input id v a) (v a) Source #
anyInvalid :: forall form (val :: Type -> Type). (Form form val, ValidationState val) => form val -> Bool Source #
validate :: forall {k} (a :: k). Bool -> Text -> Validated a Source #
specify a check for a Validation
Identity functor and monad. (a non-strict monad)
Since: base-4.8.0.0
Instances
Re-exports
class FromQueryData a Source #
Reimplement FromHttpApiData
based on Read
Instances
FromQueryData Word16 Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
FromQueryData Word32 Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
FromQueryData Word64 Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
FromQueryData Word8 Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
FromQueryData Text Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
FromQueryData UTCTime Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
FromQueryData Integer Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
FromQueryData Bool Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
FromQueryData Char Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
FromQueryData Double Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
FromQueryData Float Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
FromQueryData Int Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
FromQueryData Word Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
Read a => FromQueryData (Maybe a) Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
Read a => FromQueryData [a] Source # | |
Defined in Web.Hyperbole.Effect.QueryData | |
(FromQueryData a, FromQueryData b) => FromQueryData (Either a b) Source # | |
Defined in Web.Hyperbole.Effect.QueryData |
Representable types of kind *
.
This class is derivable in GHC with the DeriveGeneric
flag on.
A Generic
instance must satisfy the following laws:
from
.to
≡id
to
.from
≡id
Instances
Generic All | |||||
Defined in Data.Semigroup.Internal
| |||||
Generic Any | |||||
Defined in Data.Semigroup.Internal
| |||||
Generic Version | |||||
Defined in Data.Version
| |||||
Generic Void | |||||
Generic ByteOrder | |||||
Defined in GHC.ByteOrder | |||||
Generic Fingerprint | |||||
Defined in GHC.Generics
from :: Fingerprint -> Rep Fingerprint x # to :: Rep Fingerprint x -> Fingerprint # | |||||
Generic Associativity | |||||
Defined in GHC.Generics
from :: Associativity -> Rep Associativity x # to :: Rep Associativity x -> Associativity # | |||||
Generic DecidedStrictness | |||||
Defined in GHC.Generics
from :: DecidedStrictness -> Rep DecidedStrictness x # to :: Rep DecidedStrictness x -> DecidedStrictness # | |||||
Generic Fixity | |||||
Defined in GHC.Generics
| |||||
Generic SourceStrictness | |||||
Defined in GHC.Generics
from :: SourceStrictness -> Rep SourceStrictness x # to :: Rep SourceStrictness x -> SourceStrictness # | |||||
Generic SourceUnpackedness | |||||
Defined in GHC.Generics
from :: SourceUnpackedness -> Rep SourceUnpackedness x # to :: Rep SourceUnpackedness x -> SourceUnpackedness # | |||||
Generic ExitCode | |||||
Defined in GHC.IO.Exception
| |||||
Generic CCFlags | |||||
Defined in GHC.RTS.Flags
| |||||
Generic ConcFlags | |||||
Defined in GHC.RTS.Flags
| |||||
Generic DebugFlags | |||||
Defined in GHC.RTS.Flags
from :: DebugFlags -> Rep DebugFlags x # to :: Rep DebugFlags x -> DebugFlags # | |||||
Generic DoCostCentres | |||||
Defined in GHC.RTS.Flags
from :: DoCostCentres -> Rep DoCostCentres x # to :: Rep DoCostCentres x -> DoCostCentres # | |||||
Generic DoHeapProfile | |||||
Defined in GHC.RTS.Flags
from :: DoHeapProfile -> Rep DoHeapProfile x # to :: Rep DoHeapProfile x -> DoHeapProfile # | |||||
Generic DoTrace | |||||
Defined in GHC.RTS.Flags
| |||||
Generic GCFlags | |||||
Defined in GHC.RTS.Flags
| |||||
Generic GiveGCStats | |||||
Defined in GHC.RTS.Flags
from :: GiveGCStats -> Rep GiveGCStats x # to :: Rep GiveGCStats x -> GiveGCStats # | |||||
Generic MiscFlags | |||||
Defined in GHC.RTS.Flags
| |||||
Generic ParFlags | |||||
Defined in GHC.RTS.Flags
| |||||
Generic ProfFlags | |||||
Defined in GHC.RTS.Flags
| |||||
Generic RTSFlags | |||||
Defined in GHC.RTS.Flags
| |||||
Generic TickyFlags | |||||
Defined in GHC.RTS.Flags
from :: TickyFlags -> Rep TickyFlags x # to :: Rep TickyFlags x -> TickyFlags # | |||||
Generic TraceFlags | |||||
Defined in GHC.RTS.Flags
from :: TraceFlags -> Rep TraceFlags x # to :: Rep TraceFlags x -> TraceFlags # | |||||
Generic SrcLoc | |||||
Defined in GHC.Generics
| |||||
Generic GCDetails | |||||
Defined in GHC.Stats
| |||||
Generic RTSStats | |||||
Defined in GHC.Stats
| |||||
Generic GeneralCategory | |||||
Defined in GHC.Generics
from :: GeneralCategory -> Rep GeneralCategory x # to :: Rep GeneralCategory x -> GeneralCategory # | |||||
Generic ShortByteString | |||||
Defined in Data.ByteString.Short.Internal
from :: ShortByteString -> Rep ShortByteString x # to :: Rep ShortByteString x -> ShortByteString # | |||||
Generic Limit | |||||
Defined in Effectful.Internal.Unlift
| |||||
Generic Persistence | |||||
Defined in Effectful.Internal.Unlift
from :: Persistence -> Rep Persistence x # to :: Rep Persistence x -> Persistence # | |||||
Generic UnliftStrategy | |||||
Defined in Effectful.Internal.Unlift
from :: UnliftStrategy -> Rep UnliftStrategy x # to :: Rep UnliftStrategy x -> UnliftStrategy # | |||||
Generic OnEmptyPolicy | |||||
Defined in Effectful.NonDet
from :: OnEmptyPolicy -> Rep OnEmptyPolicy x # to :: Rep OnEmptyPolicy x -> OnEmptyPolicy # | |||||
Generic OsChar | |||||
Defined in System.OsString.Internal.Types.Hidden
| |||||
Generic OsString | |||||
Defined in System.OsString.Internal.Types.Hidden
| |||||
Generic PosixChar | |||||
Defined in System.OsString.Internal.Types.Hidden
| |||||
Generic PosixString | |||||
Defined in System.OsString.Internal.Types.Hidden
from :: PosixString -> Rep PosixString x # to :: Rep PosixString x -> PosixString # | |||||
Generic WindowsChar | |||||
Defined in System.OsString.Internal.Types.Hidden
from :: WindowsChar -> Rep WindowsChar x # to :: Rep WindowsChar x -> WindowsChar # | |||||
Generic WindowsString | |||||
Defined in System.OsString.Internal.Types.Hidden
from :: WindowsString -> Rep WindowsString x # to :: Rep WindowsString x -> WindowsString # | |||||
Generic ForeignSrcLang | |||||
Defined in GHC.ForeignSrcLang.Type
from :: ForeignSrcLang -> Rep ForeignSrcLang x # to :: Rep ForeignSrcLang x -> ForeignSrcLang # | |||||
Generic Extension | |||||
Defined in GHC.LanguageExtensions.Type
| |||||
Generic Ordering | |||||
Defined in GHC.Generics | |||||
Generic SrcLoc | |||||
Defined in Language.Haskell.Exts.SrcLoc
| |||||
Generic SrcSpan | |||||
Defined in Language.Haskell.Exts.SrcLoc
| |||||
Generic SrcSpanInfo | |||||
Defined in Language.Haskell.Exts.SrcLoc
from :: SrcSpanInfo -> Rep SrcSpanInfo x # to :: Rep SrcSpanInfo x -> SrcSpanInfo # | |||||
Generic Boxed | |||||
Defined in Language.Haskell.Exts.Syntax | |||||
Generic Tool | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic Form | |||||
Defined in Web.Internal.FormUrlEncoded
| |||||
Generic ByteRange | |||||
Defined in Network.HTTP.Types.Header
| |||||
Generic StdMethod | |||||
Defined in Network.HTTP.Types.Method
| |||||
Generic Status | |||||
Defined in Network.HTTP.Types.Status
| |||||
Generic HttpVersion | |||||
Defined in Network.HTTP.Types.Version
from :: HttpVersion -> Rep HttpVersion x # to :: Rep HttpVersion x -> HttpVersion # | |||||
Generic ConcException | |||||
Defined in UnliftIO.Internals.Async
from :: ConcException -> Rep ConcException x # to :: Rep ConcException x -> ConcException # | |||||
Generic UnixTime | |||||
Defined in Data.UnixTime.Types
| |||||
Generic Mode | |||||
Defined in Text.PrettyPrint.Annotated.HughesPJ
| |||||
Generic Style | |||||
Defined in Text.PrettyPrint.Annotated.HughesPJ
| |||||
Generic TextDetails | |||||
Defined in Text.PrettyPrint.Annotated.HughesPJ
from :: TextDetails -> Rep TextDetails x # to :: Rep TextDetails x -> TextDetails # | |||||
Generic Doc | |||||
Defined in Text.PrettyPrint.HughesPJ
| |||||
Generic IP | |||||
Defined in Data.IP.Addr
| |||||
Generic IPv4 | |||||
Defined in Data.IP.Addr
| |||||
Generic IPv6 | |||||
Defined in Data.IP.Addr
| |||||
Generic IPRange | |||||
Defined in Data.IP.Range
| |||||
Generic OsChar | |||||
Defined in System.OsString.Internal.Types
| |||||
Generic OsString | |||||
Defined in System.OsString.Internal.Types
| |||||
Generic PosixChar | |||||
Defined in System.OsString.Internal.Types
| |||||
Generic PosixString | |||||
Defined in System.OsString.Internal.Types
from :: PosixString -> Rep PosixString x # to :: Rep PosixString x -> PosixString # | |||||
Generic WindowsChar | |||||
Defined in System.OsString.Internal.Types
from :: WindowsChar -> Rep WindowsChar x # to :: Rep WindowsChar x -> WindowsChar # | |||||
Generic WindowsString | |||||
Defined in System.OsString.Internal.Types
from :: WindowsString -> Rep WindowsString x # to :: Rep WindowsString x -> WindowsString # | |||||
Generic AnnLookup | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic AnnTarget | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Bang | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic BndrVis | |||||
Defined in Language.Haskell.TH.Syntax | |||||
Generic Body | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Bytes | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Callconv | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Clause | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Con | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Dec | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic DecidedStrictness | |||||
Defined in Language.Haskell.TH.Syntax
from :: DecidedStrictness -> Rep DecidedStrictness x # to :: Rep DecidedStrictness x -> DecidedStrictness # | |||||
Generic DerivClause | |||||
Defined in Language.Haskell.TH.Syntax
from :: DerivClause -> Rep DerivClause x # to :: Rep DerivClause x -> DerivClause # | |||||
Generic DerivStrategy | |||||
Defined in Language.Haskell.TH.Syntax
from :: DerivStrategy -> Rep DerivStrategy x # to :: Rep DerivStrategy x -> DerivStrategy # | |||||
Generic DocLoc | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Exp | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic FamilyResultSig | |||||
Defined in Language.Haskell.TH.Syntax
from :: FamilyResultSig -> Rep FamilyResultSig x # to :: Rep FamilyResultSig x -> FamilyResultSig # | |||||
Generic Fixity | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic FixityDirection | |||||
Defined in Language.Haskell.TH.Syntax
from :: FixityDirection -> Rep FixityDirection x # to :: Rep FixityDirection x -> FixityDirection # | |||||
Generic Foreign | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic FunDep | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Guard | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Info | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic InjectivityAnn | |||||
Defined in Language.Haskell.TH.Syntax
from :: InjectivityAnn -> Rep InjectivityAnn x # to :: Rep InjectivityAnn x -> InjectivityAnn # | |||||
Generic Inline | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Lit | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Loc | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Match | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic ModName | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Module | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic ModuleInfo | |||||
Defined in Language.Haskell.TH.Syntax
from :: ModuleInfo -> Rep ModuleInfo x # to :: Rep ModuleInfo x -> ModuleInfo # | |||||
Generic Name | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic NameFlavour | |||||
Defined in Language.Haskell.TH.Syntax
from :: NameFlavour -> Rep NameFlavour x # to :: Rep NameFlavour x -> NameFlavour # | |||||
Generic NameSpace | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic OccName | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Overlap | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Pat | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic PatSynArgs | |||||
Defined in Language.Haskell.TH.Syntax
from :: PatSynArgs -> Rep PatSynArgs x # to :: Rep PatSynArgs x -> PatSynArgs # | |||||
Generic PatSynDir | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Phases | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic PkgName | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Pragma | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Range | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Role | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic RuleBndr | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic RuleMatch | |||||
Defined in Language.Haskell.TH.Syntax | |||||
Generic Safety | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic SourceStrictness | |||||
Defined in Language.Haskell.TH.Syntax
from :: SourceStrictness -> Rep SourceStrictness x # to :: Rep SourceStrictness x -> SourceStrictness # | |||||
Generic SourceUnpackedness | |||||
Defined in Language.Haskell.TH.Syntax
from :: SourceUnpackedness -> Rep SourceUnpackedness x # to :: Rep SourceUnpackedness x -> SourceUnpackedness # | |||||
Generic Specificity | |||||
Defined in Language.Haskell.TH.Syntax
from :: Specificity -> Rep Specificity x # to :: Rep Specificity x -> Specificity # | |||||
Generic Stmt | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic TyLit | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic TySynEqn | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic Type | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic TypeFamilyHead | |||||
Defined in Language.Haskell.TH.Syntax
from :: TypeFamilyHead -> Rep TypeFamilyHead x # to :: Rep TypeFamilyHead x -> TypeFamilyHead # | |||||
Generic ConstructorInfo | |||||
Defined in Language.Haskell.TH.Datatype
from :: ConstructorInfo -> Rep ConstructorInfo x # to :: Rep ConstructorInfo x -> ConstructorInfo # | |||||
Generic ConstructorVariant | |||||
Defined in Language.Haskell.TH.Datatype
from :: ConstructorVariant -> Rep ConstructorVariant x # to :: Rep ConstructorVariant x -> ConstructorVariant # | |||||
Generic DatatypeInfo | |||||
Defined in Language.Haskell.TH.Datatype
from :: DatatypeInfo -> Rep DatatypeInfo x # to :: Rep DatatypeInfo x -> DatatypeInfo # | |||||
Generic DatatypeVariant | |||||
Defined in Language.Haskell.TH.Datatype
from :: DatatypeVariant -> Rep DatatypeVariant x # to :: Rep DatatypeVariant x -> DatatypeVariant # | |||||
Generic FieldStrictness | |||||
Defined in Language.Haskell.TH.Datatype
from :: FieldStrictness -> Rep FieldStrictness x # to :: Rep FieldStrictness x -> FieldStrictness # | |||||
Generic Strictness | |||||
Defined in Language.Haskell.TH.Datatype
from :: Strictness -> Rep Strictness x # to :: Rep Strictness x -> Strictness # | |||||
Generic Unpackedness | |||||
Defined in Language.Haskell.TH.Datatype
from :: Unpackedness -> Rep Unpackedness x # to :: Rep Unpackedness x -> Unpackedness # | |||||
Generic FlatAttributes | |||||
Defined in Web.View.Types
from :: FlatAttributes -> Rep FlatAttributes x # to :: Rep FlatAttributes x -> FlatAttributes # | |||||
Generic CompressParams | |||||
Defined in Codec.Compression.Zlib.Internal
from :: CompressParams -> Rep CompressParams x # to :: Rep CompressParams x -> CompressParams # | |||||
Generic DecompressError | |||||
Defined in Codec.Compression.Zlib.Internal
from :: DecompressError -> Rep DecompressError x # to :: Rep DecompressError x -> DecompressError # | |||||
Generic DecompressParams | |||||
Defined in Codec.Compression.Zlib.Internal
from :: DecompressParams -> Rep DecompressParams x # to :: Rep DecompressParams x -> DecompressParams # | |||||
Generic CompressionLevel | |||||
Defined in Codec.Compression.Zlib.Stream
from :: CompressionLevel -> Rep CompressionLevel x # to :: Rep CompressionLevel x -> CompressionLevel # | |||||
Generic CompressionStrategy | |||||
Defined in Codec.Compression.Zlib.Stream
from :: CompressionStrategy -> Rep CompressionStrategy x # to :: Rep CompressionStrategy x -> CompressionStrategy # | |||||
Generic Format | |||||
Defined in Codec.Compression.Zlib.Stream
| |||||
Generic MemoryLevel | |||||
Defined in Codec.Compression.Zlib.Stream
from :: MemoryLevel -> Rep MemoryLevel x # to :: Rep MemoryLevel x -> MemoryLevel # | |||||
Generic Method | |||||
Defined in Codec.Compression.Zlib.Stream | |||||
Generic WindowBits | |||||
Defined in Codec.Compression.Zlib.Stream
from :: WindowBits -> Rep WindowBits x # to :: Rep WindowBits x -> WindowBits # | |||||
Generic () | |||||
Generic Bool | |||||
Defined in GHC.Generics | |||||
Generic (ZipList a) | |||||
Defined in Control.Applicative
| |||||
Generic (Complex a) | |||||
Defined in Data.Complex
| |||||
Generic (Identity a) | |||||
Defined in Data.Functor.Identity
| |||||
Generic (First a) | |||||
Defined in Data.Monoid
| |||||
Generic (Last a) | |||||
Defined in Data.Monoid
| |||||
Generic (Down a) | |||||
Defined in GHC.Generics
| |||||
Generic (First a) | |||||
Defined in Data.Semigroup
| |||||
Generic (Last a) | |||||
Defined in Data.Semigroup
| |||||
Generic (Max a) | |||||
Defined in Data.Semigroup
| |||||
Generic (Min a) | |||||
Defined in Data.Semigroup
| |||||
Generic (WrappedMonoid m) | |||||
Defined in Data.Semigroup
from :: WrappedMonoid m -> Rep (WrappedMonoid m) x # to :: Rep (WrappedMonoid m) x -> WrappedMonoid m # | |||||
Generic (Dual a) | |||||
Defined in Data.Semigroup.Internal
| |||||
Generic (Endo a) | |||||
Defined in Data.Semigroup.Internal
| |||||
Generic (Product a) | |||||
Defined in Data.Semigroup.Internal
| |||||
Generic (Sum a) | |||||
Defined in Data.Semigroup.Internal
| |||||
Generic (NonEmpty a) | |||||
Defined in GHC.Generics
| |||||
Generic (Par1 p) | |||||
Defined in GHC.Generics
| |||||
Generic (SCC vertex) | |||||
Defined in Data.Graph
| |||||
Generic (Digit a) | |||||
Defined in Data.Sequence.Internal
| |||||
Generic (Elem a) | |||||
Defined in Data.Sequence.Internal
| |||||
Generic (FingerTree a) | |||||
Defined in Data.Sequence.Internal
from :: FingerTree a -> Rep (FingerTree a) x # to :: Rep (FingerTree a) x -> FingerTree a # | |||||
Generic (Node a) | |||||
Defined in Data.Sequence.Internal
| |||||
Generic (ViewL a) | |||||
Defined in Data.Sequence.Internal
| |||||
Generic (ViewR a) | |||||
Defined in Data.Sequence.Internal
| |||||
Generic (Tree a) | |||||
Defined in Data.Tree
| |||||
Generic (Loc a) | |||||
Defined in Language.Haskell.Exts.SrcLoc
| |||||
Generic (Activation l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: Activation l -> Rep (Activation l) x # to :: Rep (Activation l) x -> Activation l # | |||||
Generic (Alt l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Annotation l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: Annotation l -> Rep (Annotation l) x # to :: Rep (Annotation l) x -> Annotation l # | |||||
Generic (Assoc l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Asst l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (BangType l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Binds l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (BooleanFormula l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: BooleanFormula l -> Rep (BooleanFormula l) x # to :: Rep (BooleanFormula l) x -> BooleanFormula l # | |||||
Generic (Bracket l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (CName l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (CallConv l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (ClassDecl l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (ConDecl l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Context l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (DataOrNew l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Decl l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (DeclHead l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (DerivStrategy l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: DerivStrategy l -> Rep (DerivStrategy l) x # to :: Rep (DerivStrategy l) x -> DerivStrategy l # | |||||
Generic (Deriving l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (EWildcard l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Exp l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (ExportSpec l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: ExportSpec l -> Rep (ExportSpec l) x # to :: Rep (ExportSpec l) x -> ExportSpec l # | |||||
Generic (ExportSpecList l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: ExportSpecList l -> Rep (ExportSpecList l) x # to :: Rep (ExportSpecList l) x -> ExportSpecList l # | |||||
Generic (FieldDecl l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (FieldUpdate l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: FieldUpdate l -> Rep (FieldUpdate l) x # to :: Rep (FieldUpdate l) x -> FieldUpdate l # | |||||
Generic (FunDep l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (GadtDecl l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (GuardedRhs l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: GuardedRhs l -> Rep (GuardedRhs l) x # to :: Rep (GuardedRhs l) x -> GuardedRhs l # | |||||
Generic (IPBind l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (IPName l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (ImportDecl l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: ImportDecl l -> Rep (ImportDecl l) x # to :: Rep (ImportDecl l) x -> ImportDecl l # | |||||
Generic (ImportSpec l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: ImportSpec l -> Rep (ImportSpec l) x # to :: Rep (ImportSpec l) x -> ImportSpec l # | |||||
Generic (ImportSpecList l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: ImportSpecList l -> Rep (ImportSpecList l) x # to :: Rep (ImportSpecList l) x -> ImportSpecList l # | |||||
Generic (InjectivityInfo l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: InjectivityInfo l -> Rep (InjectivityInfo l) x # to :: Rep (InjectivityInfo l) x -> InjectivityInfo l # | |||||
Generic (InstDecl l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (InstHead l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (InstRule l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Literal l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Match l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (MaybePromotedName l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: MaybePromotedName l -> Rep (MaybePromotedName l) x # to :: Rep (MaybePromotedName l) x -> MaybePromotedName l # | |||||
Generic (Module l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (ModuleHead l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: ModuleHead l -> Rep (ModuleHead l) x # to :: Rep (ModuleHead l) x -> ModuleHead l # | |||||
Generic (ModuleName l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: ModuleName l -> Rep (ModuleName l) x # to :: Rep (ModuleName l) x -> ModuleName l # | |||||
Generic (ModulePragma l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: ModulePragma l -> Rep (ModulePragma l) x # to :: Rep (ModulePragma l) x -> ModulePragma l # | |||||
Generic (Name l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Namespace l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Op l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Overlap l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (PXAttr l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Pat l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (PatField l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (PatternSynDirection l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: PatternSynDirection l -> Rep (PatternSynDirection l) x # to :: Rep (PatternSynDirection l) x -> PatternSynDirection l # | |||||
Generic (Promoted l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (QName l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (QOp l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (QualConDecl l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: QualConDecl l -> Rep (QualConDecl l) x # to :: Rep (QualConDecl l) x -> QualConDecl l # | |||||
Generic (QualStmt l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (RPat l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (RPatOp l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (ResultSig l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Rhs l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Role l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Rule l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (RuleVar l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Safety l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Sign l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (SpecialCon l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: SpecialCon l -> Rep (SpecialCon l) x # to :: Rep (SpecialCon l) x -> SpecialCon l # | |||||
Generic (Splice l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Stmt l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (TyVarBind l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Type l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (TypeEqn l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Unpackedness l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: Unpackedness l -> Rep (Unpackedness l) x # to :: Rep (Unpackedness l) x -> Unpackedness l # | |||||
Generic (WarningText l) | |||||
Defined in Language.Haskell.Exts.Syntax
from :: WarningText l -> Rep (WarningText l) x # to :: Rep (WarningText l) x -> WarningText l # | |||||
Generic (XAttr l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (XName l) | |||||
Defined in Language.Haskell.Exts.Syntax
| |||||
Generic (Doc a) | |||||
Defined in Text.PrettyPrint.Annotated.HughesPJ
| |||||
Generic (AddrRange a) | |||||
Defined in Data.IP.Range
| |||||
Generic (TyVarBndr flag) | |||||
Defined in Language.Haskell.TH.Syntax
| |||||
Generic (Maybe a) | |||||
Defined in GHC.Generics
| |||||
Generic (Solo a) | |||||
Defined in GHC.Generics
| |||||
Generic [a] | |||||
Defined in GHC.Generics
| |||||
Generic (WrappedMonad m a) | |||||
Defined in Control.Applicative
from :: WrappedMonad m a -> Rep (WrappedMonad m a) x # to :: Rep (WrappedMonad m a) x -> WrappedMonad m a # | |||||
Generic (Either a b) | |||||
Defined in GHC.Generics
| |||||
Generic (Proxy t) | |||||
Generic (Arg a b) | |||||
Defined in Data.Semigroup
| |||||
Generic (U1 p) | |||||
Generic (V1 p) | |||||
Generic (MaybeT m a) | |||||
Defined in Control.Monad.Trans.Maybe
| |||||
Generic (a, b) | |||||
Defined in GHC.Generics
| |||||
Generic (WrappedArrow a b c) | |||||
Defined in Control.Applicative
from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x # to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c # | |||||
Generic (Kleisli m a b) | |||||
Defined in Control.Arrow
| |||||
Generic (Const a b) | |||||
Defined in Data.Functor.Const
| |||||
Generic (Ap f a) | |||||
Defined in Data.Monoid
| |||||
Generic (Alt f a) | |||||
Defined in Data.Semigroup.Internal
| |||||
Generic (Rec1 f p) | |||||
Defined in GHC.Generics
| |||||
Generic (URec (Ptr ()) p) | |||||
Defined in GHC.Generics
| |||||
Generic (URec Char p) | |||||
Defined in GHC.Generics
| |||||
Generic (URec Double p) | |||||
Defined in GHC.Generics
| |||||
Generic (URec Float p) | |||||
Defined in GHC.Generics
| |||||
Generic (URec Int p) | |||||
Defined in GHC.Generics
| |||||
Generic (URec Word p) | |||||
Defined in GHC.Generics
| |||||
Generic (Tagged s b) | |||||
Defined in Data.Tagged
| |||||
Generic (AccumT w m a) | |||||
Defined in Control.Monad.Trans.Accum
| |||||
Generic (ExceptT e m a) | |||||
Defined in Control.Monad.Trans.Except
| |||||
Generic (IdentityT f a) | |||||
Defined in Control.Monad.Trans.Identity
| |||||
Generic (ReaderT r m a) | |||||
Defined in Control.Monad.Trans.Reader
| |||||
Generic (SelectT r m a) | |||||
Defined in Control.Monad.Trans.Select
| |||||
Generic (StateT s m a) | |||||
Defined in Control.Monad.Trans.State.Lazy
| |||||
Generic (StateT s m a) | |||||
Defined in Control.Monad.Trans.State.Strict
| |||||
Generic (WriterT w m a) | |||||
Defined in Control.Monad.Trans.Writer.CPS
| |||||
Generic (WriterT w m a) | |||||
Defined in Control.Monad.Trans.Writer.Lazy
| |||||
Generic (WriterT w m a) | |||||
Defined in Control.Monad.Trans.Writer.Strict
| |||||
Generic (Constant a b) | |||||
Defined in Data.Functor.Constant
| |||||
Generic (a, b, c) | |||||
Defined in GHC.Generics
| |||||
Generic (Product f g a) | |||||
Defined in Data.Functor.Product
| |||||
Generic (Sum f g a) | |||||
Defined in Data.Functor.Sum
| |||||
Generic ((f :*: g) p) | |||||
Defined in GHC.Generics
| |||||
Generic ((f :+: g) p) | |||||
Defined in GHC.Generics
| |||||
Generic (K1 i c p) | |||||
Defined in GHC.Generics
| |||||
Generic (ContT r m a) | |||||
Defined in Control.Monad.Trans.Cont
| |||||
Generic (a, b, c, d) | |||||
Defined in GHC.Generics
| |||||
Generic (Compose f g a) | |||||
Defined in Data.Functor.Compose
| |||||
Generic ((f :.: g) p) | |||||
Defined in GHC.Generics
| |||||
Generic (M1 i c f p) | |||||
Defined in GHC.Generics
| |||||
Generic (RWST r w s m a) | |||||
Defined in Control.Monad.Trans.RWS.CPS
| |||||
Generic (RWST r w s m a) | |||||
Defined in Control.Monad.Trans.RWS.Lazy
| |||||
Generic (RWST r w s m a) | |||||
Defined in Control.Monad.Trans.RWS.Strict
| |||||
Generic (a, b, c, d, e) | |||||
Defined in GHC.Generics
| |||||
Generic (a, b, c, d, e, f) | |||||
Defined in GHC.Generics
| |||||
Generic (a, b, c, d, e, f, g) | |||||
Defined in GHC.Generics
| |||||
Generic (a, b, c, d, e, f, g, h) | |||||
Defined in GHC.Generics
| |||||
Generic (a, b, c, d, e, f, g, h, i) | |||||
Defined in GHC.Generics
| |||||
Generic (a, b, c, d, e, f, g, h, i, j) | |||||
Defined in GHC.Generics
| |||||
Generic (a, b, c, d, e, f, g, h, i, j, k) | |||||
Defined in GHC.Generics
| |||||
Generic (a, b, c, d, e, f, g, h, i, j, k, l) | |||||
Defined in GHC.Generics
| |||||
Generic (a, b, c, d, e, f, g, h, i, j, k, l, m) | |||||
Defined in GHC.Generics
| |||||
Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | |||||
Defined in GHC.Generics
| |||||
Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | |||||
Defined in GHC.Generics
|
class GenFields (f :: k -> Type) where Source #
gGenFields :: forall (p :: k). f p Source #
Instances
GenFields (U1 :: k -> Type) Source # | |
Defined in Web.Hyperbole.View.Forms gGenFields :: forall (p :: k). U1 p Source # | |
(GenFields f, GenFields g) => GenFields (f :*: g :: k -> Type) Source # | |
Defined in Web.Hyperbole.View.Forms gGenFields :: forall (p :: k). (f :*: g) p Source # | |
GenFields f => GenFields (M1 C c f :: k -> Type) Source # | |
Defined in Web.Hyperbole.View.Forms gGenFields :: forall (p :: k). M1 C c f p Source # | |
GenFields f => GenFields (M1 D d f :: k -> Type) Source # | |
Defined in Web.Hyperbole.View.Forms gGenFields :: forall (p :: k). M1 D d f p Source # | |
(Selector s, GenField f a, Field f a ~ f a) => GenFields (M1 S s (K1 R (f a) :: k -> Type) :: k -> Type) Source # | |
Defined in Web.Hyperbole.View.Forms |