type synonyms for dynamic imports and wrappers
18 Aug
2016
18 Aug
'16
11:17 p.m.
The Haskell FFI report says that imports and exports of dynamic functions always have those types: foreign import ccall "dynamic" mkFun :: FunPtr fun -> fun foreign import ccall "wrapper" mkCallback :: fun -> IO (FunPtr fun) where 'fun' is an IO function. Since 'fn' can be a considerably large type expression I usually define type Importer fun = FunPtr fun -> fun type Exporter fun = fun -> IO (FunPtr fun) How about adding these type synonyms to Foreign?
3719
Age (days ago)
3719
Last active (days ago)
0 comments
1 participants
participants (1)
-
Henning Thielemann