Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- include :: ToHType a => Proxy a -> GenOption -> Builder
- generateFor :: ElmVersion -> Options -> Maybe FilePath -> Builder -> Q Exp
- data ElmVersion = Elm19
- data HType
- = HUDef UDefData
- | HMaybe HType
- | HList HType
- | HPrimitive MData
- | HRecursive MData
- | HExternal ExInfo [HType]
- class ToHType f where
- data ExItem = ExItem {
- extModuleName :: Text
- extSymbol :: Text
- data ExInfo = ExInfo {}
- type Builder = State GenConfig ()
- data GenOption
- data PolyConfig
Documentation
include :: ToHType a => Proxy a -> GenOption -> Builder Source #
Include the elm source for the Haskell type specified by the proxy argument. The second argument decides which components will be included and if the generated type will be polymorphic.
generateFor :: ElmVersion -> Options -> Maybe FilePath -> Builder -> Q Exp Source #
HUDef UDefData | |
HMaybe HType | |
HList HType | |
HPrimitive MData | |
HRecursive MData | |
HExternal ExInfo [HType] |
class ToHType f where Source #
Nothing
toHType :: Proxy f -> HState HType Source #
toHType :: (ToHTArgs (ExtractTArgs f), Generic f, ToHType_ (Rep f)) => Proxy f -> HState HType Source #
Instances
ToHType Bool Source # | |
ToHType Char Source # | |
ToHType Float Source # | |
ToHType Int Source # | |
ToHType () Source # | |
ToHType a => ToHType [a] Source # | |
ToHType a => ToHType (Maybe a) Source # | |
(ToHType a, ToHType b) => ToHType (Either a b) Source # | |
(ToHType a1, ToHType a2) => ToHType (a1, a2) Source # | |
(ToHType a1, ToHType a2, ToHType a3) => ToHType (a1, a2, a3) Source # | |
(ToHType a1, ToHType a2, ToHType a3, ToHType a4) => ToHType (a1, a2, a3, a4) Source # | |
(ToHType a1, ToHType a2, ToHType a3, ToHType a4, ToHType a5) => ToHType (a1, a2, a3, a4, a5) Source # | |
(ToHType a1, ToHType a2, ToHType a3, ToHType a4, ToHType a5, ToHType a6) => ToHType (a1, a2, a3, a4, a5, a6) Source # | |
(ToHType a1, ToHType a2, ToHType a3, ToHType a4, ToHType a5, ToHType a6, ToHType a7) => ToHType (a1, a2, a3, a4, a5, a6, a7) Source # | |
ExItem | |
|
Decides which among type definiton, encoder and decoder will be included for a type. The poly config value decides wether the included type definition will be poly morphic.
data PolyConfig Source #
Decides wether the type definition will be polymorphic.
Instances
Show PolyConfig Source # | |
Defined in Elminator.Lib showsPrec :: Int -> PolyConfig -> ShowS # show :: PolyConfig -> String # showList :: [PolyConfig] -> ShowS # |