Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module generates code for "externs" files, i.e. files containing only foreign import declarations.
Synopsis
- data ExternsFile = ExternsFile {}
- data ExternsImport = ExternsImport {}
- data ExternsFixity = ExternsFixity {}
- data ExternsTypeFixity = ExternsTypeFixity {}
- data ExternsDeclaration
- = EDType { }
- | EDTypeSynonym { }
- | EDDataConstructor { }
- | EDValue { }
- | EDClass { }
- | EDInstance { }
- | EDKind { }
- moduleToExternsFile :: Module -> Environment -> ExternsFile
- applyExternsFileToEnvironment :: ExternsFile -> Environment -> Environment
- decodeExterns :: ByteString -> Maybe ExternsFile
Documentation
data ExternsFile Source #
The data which will be serialized to an externs file
ExternsFile | |
|
Instances
Show ExternsFile Source # | |
Defined in Language.PureScript.Externs showsPrec :: Int -> ExternsFile -> ShowS # show :: ExternsFile -> String # showList :: [ExternsFile] -> ShowS # | |
ToJSON ExternsFile Source # | |
Defined in Language.PureScript.Externs toJSON :: ExternsFile -> Value # toEncoding :: ExternsFile -> Encoding # toJSONList :: [ExternsFile] -> Value # toEncodingList :: [ExternsFile] -> Encoding # | |
FromJSON ExternsFile Source # | |
Defined in Language.PureScript.Externs parseJSON :: Value -> Parser ExternsFile # parseJSONList :: Value -> Parser [ExternsFile] # |
data ExternsImport Source #
A module import in an externs file
ExternsImport | |
|
Instances
Show ExternsImport Source # | |
Defined in Language.PureScript.Externs showsPrec :: Int -> ExternsImport -> ShowS # show :: ExternsImport -> String # showList :: [ExternsImport] -> ShowS # | |
ToJSON ExternsImport Source # | |
Defined in Language.PureScript.Externs toJSON :: ExternsImport -> Value # toEncoding :: ExternsImport -> Encoding # toJSONList :: [ExternsImport] -> Value # toEncodingList :: [ExternsImport] -> Encoding # | |
FromJSON ExternsImport Source # | |
Defined in Language.PureScript.Externs parseJSON :: Value -> Parser ExternsImport # parseJSONList :: Value -> Parser [ExternsImport] # |
data ExternsFixity Source #
A fixity declaration in an externs file
ExternsFixity | |
|
Instances
Show ExternsFixity Source # | |
Defined in Language.PureScript.Externs showsPrec :: Int -> ExternsFixity -> ShowS # show :: ExternsFixity -> String # showList :: [ExternsFixity] -> ShowS # | |
ToJSON ExternsFixity Source # | |
Defined in Language.PureScript.Externs toJSON :: ExternsFixity -> Value # toEncoding :: ExternsFixity -> Encoding # toJSONList :: [ExternsFixity] -> Value # toEncodingList :: [ExternsFixity] -> Encoding # | |
FromJSON ExternsFixity Source # | |
Defined in Language.PureScript.Externs parseJSON :: Value -> Parser ExternsFixity # parseJSONList :: Value -> Parser [ExternsFixity] # |
data ExternsTypeFixity Source #
A type fixity declaration in an externs file
ExternsTypeFixity | |
|
Instances
Show ExternsTypeFixity Source # | |
Defined in Language.PureScript.Externs showsPrec :: Int -> ExternsTypeFixity -> ShowS # show :: ExternsTypeFixity -> String # showList :: [ExternsTypeFixity] -> ShowS # | |
ToJSON ExternsTypeFixity Source # | |
Defined in Language.PureScript.Externs toJSON :: ExternsTypeFixity -> Value # toEncoding :: ExternsTypeFixity -> Encoding # toJSONList :: [ExternsTypeFixity] -> Value # toEncodingList :: [ExternsTypeFixity] -> Encoding # | |
FromJSON ExternsTypeFixity Source # | |
Defined in Language.PureScript.Externs parseJSON :: Value -> Parser ExternsTypeFixity # parseJSONList :: Value -> Parser [ExternsTypeFixity] # |
data ExternsDeclaration Source #
A type or value declaration appearing in an externs file
EDType | A type declaration |
EDTypeSynonym | A type synonym |
EDDataConstructor | A data construtor |
EDValue | A value declaration |
EDClass | A type class declaration |
EDInstance | An instance declaration |
EDKind | A kind declaration |
Instances
Show ExternsDeclaration Source # | |
Defined in Language.PureScript.Externs showsPrec :: Int -> ExternsDeclaration -> ShowS # show :: ExternsDeclaration -> String # showList :: [ExternsDeclaration] -> ShowS # | |
ToJSON ExternsDeclaration Source # | |
Defined in Language.PureScript.Externs toJSON :: ExternsDeclaration -> Value # toEncoding :: ExternsDeclaration -> Encoding # toJSONList :: [ExternsDeclaration] -> Value # toEncodingList :: [ExternsDeclaration] -> Encoding # | |
FromJSON ExternsDeclaration Source # | |
Defined in Language.PureScript.Externs parseJSON :: Value -> Parser ExternsDeclaration # parseJSONList :: Value -> Parser [ExternsDeclaration] # |
moduleToExternsFile :: Module -> Environment -> ExternsFile Source #
Generate an externs file for all declarations in a module
applyExternsFileToEnvironment :: ExternsFile -> Environment -> Environment Source #
Convert an externs file back into a module