Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type HaskellCode = String
- type HaskellType = String
- data HaskellPragma
- parsePragma :: CompilerPragma -> Either String HaskellPragma
- parseHaskellPragma :: CompilerPragma -> TCM HaskellPragma
- getHaskellPragma :: QName -> TCM (Maybe HaskellPragma)
- sanityCheckPragma :: Definition -> Maybe HaskellPragma -> TCM ()
- getHaskellConstructor :: QName -> TCM (Maybe HaskellCode)
- foreignHaskell :: TCM ([String], [String], [String])
- data KindOfForeignCode
- classifyForeign :: String -> KindOfForeignCode
- classifyPragma :: String -> KindOfForeignCode
- partitionByKindOfForeignCode :: (a -> KindOfForeignCode) -> [a] -> ([a], [a], [a])
Documentation
type HaskellCode = String Source #
type HaskellType = String Source #
data HaskellPragma Source #
GHC backend translation pragmas.
HsDefn Range HaskellCode | |
HsType Range HaskellType | |
HsData Range HaskellType [HaskellCode] | @COMPILE GHC X = data D (c₁ | ... | cₙ) |
HsExport Range HaskellCode | COMPILE GHC x as f |
Instances
Eq HaskellPragma Source # | |
Defined in Agda.Compiler.MAlonzo.Pragmas (==) :: HaskellPragma -> HaskellPragma -> Bool # (/=) :: HaskellPragma -> HaskellPragma -> Bool # | |
Show HaskellPragma Source # | |
Defined in Agda.Compiler.MAlonzo.Pragmas showsPrec :: Int -> HaskellPragma -> ShowS # show :: HaskellPragma -> String # showList :: [HaskellPragma] -> ShowS # | |
Pretty HaskellPragma Source # | |
Defined in Agda.Compiler.MAlonzo.Pragmas pretty :: HaskellPragma -> Doc Source # prettyPrec :: Int -> HaskellPragma -> Doc Source # prettyList :: [HaskellPragma] -> Doc Source # | |
HasRange HaskellPragma Source # | |
Defined in Agda.Compiler.MAlonzo.Pragmas getRange :: HaskellPragma -> Range Source # |
getHaskellPragma :: QName -> TCM (Maybe HaskellPragma) Source #
sanityCheckPragma :: Definition -> Maybe HaskellPragma -> TCM () Source #
getHaskellConstructor :: QName -> TCM (Maybe HaskellCode) Source #
foreignHaskell :: TCM ([String], [String], [String]) Source #
Get content of FOREIGN GHC
pragmas, sorted by KindOfForeignCode
:
file header pragmas, import statements, rest.
data KindOfForeignCode Source #
Classify FOREIGN
Haskell code.
ForeignFileHeaderPragma | A pragma that must appear before the module header. |
ForeignImport | An import statement. Must appear right after the module header. |
ForeignOther | The rest. To appear after the import statements. |
classifyForeign :: String -> KindOfForeignCode Source #
Classify a FOREIGN GHC
declaration.
classifyPragma :: String -> KindOfForeignCode Source #
Classify a Haskell pragma into whether it is a file header pragma or not.
partitionByKindOfForeignCode :: (a -> KindOfForeignCode) -> [a] -> ([a], [a], [a]) Source #
Partition a list by KindOfForeignCode
attribute.