Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- generateTypeDef :: forall {k} (x :: k). HasElmStructure k x => Text
- generateEncoder :: forall {k} (x :: k). HasElmStructure k x => Text
- generateDecoder :: forall {k} (x :: k). HasElmStructure k x => Text
- generateAll :: FilePath -> [SomeStructure] -> IO ()
- computeAll :: [SomeStructure] -> Map ModuleName ModuleDefinition
- mkSourceMap :: [SomeStructure] -> Map ModuleName Text
- include :: forall {k} x. HasElmStructure k x => SomeStructure
- outputModule :: FilePath -> (ModuleName, Text) -> IO ()
- data SomeStructure = forall x. SomeStructure (DatatypeStructure x)
- data ModuleDefinition = ModuleDefinition {}
Documentation
generateTypeDef :: forall {k} (x :: k). HasElmStructure k x => Text Source #
Generate a type definition
generateEncoder :: forall {k} (x :: k). HasElmStructure k x => Text Source #
Generate an encoder
generateDecoder :: forall {k} (x :: k). HasElmStructure k x => Text Source #
Generate a decoder
generateAll :: FilePath -> [SomeStructure] -> IO () Source #
mkSourceMap :: [SomeStructure] -> Map ModuleName Text Source #
include :: forall {k} x. HasElmStructure k x => SomeStructure Source #
outputModule :: FilePath -> (ModuleName, Text) -> IO () Source #
data SomeStructure Source #
forall x. SomeStructure (DatatypeStructure x) |
data ModuleDefinition Source #
Instances
Monoid ModuleDefinition Source # | |
Defined in Elmental.Generate | |
Semigroup ModuleDefinition Source # | |
Defined in Elmental.Generate (<>) :: ModuleDefinition -> ModuleDefinition -> ModuleDefinition # sconcat :: NonEmpty ModuleDefinition -> ModuleDefinition # stimes :: Integral b => b -> ModuleDefinition -> ModuleDefinition # | |
Show ModuleDefinition Source # | |
Defined in Elmental.Generate showsPrec :: Int -> ModuleDefinition -> ShowS # show :: ModuleDefinition -> String # showList :: [ModuleDefinition] -> ShowS # | |
Eq ModuleDefinition Source # | |
Defined in Elmental.Generate (==) :: ModuleDefinition -> ModuleDefinition -> Bool # (/=) :: ModuleDefinition -> ModuleDefinition -> Bool # |