sdl2-gfx-0.3.0.0: Haskell bindings to SDL2_gfx
Copyright(c) 2015 Siniša Biđin 2021 Daniel Firth
LicenseMIT
Maintainer[email protected], [email protected]
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

SDL.Raw.Helper

Description

Exposes a way to automatically generate a foreign import alongside its lifted, inlined MonadIO variant. Use this to simplify the package's SDL.Raw.* modules.

Synopsis

Documentation

liftF :: String -> String -> Q Type -> Q [Dec] Source #

Given a name fname, a name of a C function cname and the desired Haskell type ftype, this function generates:

  • A foreign import of cname, named as fname'.
  • An always-inline MonadIO version of fname', named fname.