| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
HSGen.FFI
- pragma :: Text
- typesImport :: [Text] -> Text
- tlist :: [Text]
- ioifyUnit :: Text -> Text
- fixUnit :: Text -> Text
- ioifyTypeList :: [Text] -> [Text]
- fixInit :: [Text] -> Text
- wrapperLast :: [Text] -> Text
- fixTypeList :: [Text] -> Text
- functionImport :: Text -> Text -> Text -> Text
- defUnfix :: Default a => Fix a -> a
- importBits :: Text
- auxBoolToText :: Int -> Text
- mkTup :: Int -> Text
- mkBoolToCUInt :: Int -> Text
- mkBoolToCUIntName :: Int -> Text
- andIsFixed :: Int -> Text
- mkIsFixed :: Int -> Text
- mkIsFixedName :: Int -> Text
Documentation
typesImport :: [Text] -> Text Source
This generates the import line for Foreign.C.Types
ioifyTypeList :: [Text] -> [Text] Source
Example:
>>>ioifyTypeList . map T.pack ["Bool", "String", "Int"]["Bool", "String", "IO (Int)"]
fixInit :: [Text] -> Text Source
Example:
>>>fixInit . map T.pack $ ["a", "b", "c"]"Fix (a) -> Fix (b)"
wrapperLast :: [Text] -> Text Source
Example:
>>>wrapperLast . map T.pack $ ["a", "b", "c"]"Wrapper (FunPtr (a -> b -> c) (c))"
fixTypeList :: [Text] -> Text Source
Example:
>>>fixTypeList (T.pack "a -> b -> c")"Fix (a) -> Fix (b) -> Wrapper (FunPtr (a -> b -> c)) c"
functionImport :: Text -> Text -> Text -> Text Source
Example:
>>>functionImport (T.pack "math.h") (T.pack "sin") (T.pack "CDouble -> CDouble")"foreign import ccall \"math.h sin\" c_sin :: CDouble -> CDouble \n"
importBits :: Text Source
auxBoolToText :: Int -> Text Source
mkBoolToCUInt :: Int -> Text Source
Warning: This (generated) function needs a specific type declaration, don't forget to implement!
mkBoolToCUIntName :: Int -> Text Source
andIsFixed :: Int -> Text Source
mkIsFixedName :: Int -> Text Source