-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Dynamic linking for embedded DSLs with staged compilation -- -- Dynamic compilation, linking and loading of functions in staged -- languages. @package plugins-multistage @version 0.6.3 -- | Generic components module System.Plugins.MultiStage -- | Generic function compiler and loader loadFunWithConfig :: Config -> [Name] -> Q [Dec] -- | Extract the type of the supplied function name loadFunType :: Name -> Q Type -- | Configuration parameters for the function loader data Config Config :: (Config -> Name -> Name -> [Name] -> Type -> [DecQ]) -> (Config -> Name -> Q Body) -> (Name -> [Name] -> Q Body) -> (Name -> Q Type) -> (Type -> Q Type) -> (Type -> Q Type) -> String -> String -> String -> [String] -> Safety -> Config [declWorker] :: Config -> Config -> Name -> Name -> [Name] -> Type -> [DecQ] [builder] :: Config -> Config -> Name -> Q Body [worker] :: Config -> Name -> [Name] -> Q Body [typeFromName] :: Config -> Name -> Q Type [mkHSig] :: Config -> Type -> Q Type [mkCSig] :: Config -> Type -> Q Type [prefix] :: Config -> String [suffix] :: Config -> String [wdir] :: Config -> String [opts] :: Config -> [String] [safety] :: Config -> Safety defaultConfig :: Config -- | Build, load and link a C file defaultBuilder :: Config -> Name -> Q Body -- | The Calling Convention specifies how a type should be converted data CallConv CallConv :: (Type -> Q Type) -> (Type -> Q Type) -> CallConv -- | Convert an argument [arg] :: CallConv -> Type -> Q Type -- | Convert the result [res] :: CallConv -> Type -> Q Type -- | Convert a type using the supplied calling convention buildType :: CallConv -> Type -> Q Type -- | Apply a type family applyTF :: Name -> Type -> Q Type -- | Expand type families expandTF :: Type -> Q Type -- | Pack a value into its runtime representation -- --
--   pack a = to a >>= ref
--   
pack :: (Reference (Rep a), Marshal a) => a -> IO (Ref (Rep a)) -- | Unpack a value from its runtime representation -- --
--   unpack a = deref a >>= from
--   
unpack :: (Reference (Rep a), Marshal a) => Ref (Rep a) -> IO a -- | Optionally make a refrence of a value class Reference a where { -- | The type of a referenced value type family Ref a :: *; } -- | Convert to a referenced value ref :: Reference a => a -> IO (Ref a) -- | Convert to a referenced value ref :: (Reference a, a ~ Ref a) => a -> IO (Ref a) -- | Convert from a referenced value In the IO monad to allow -- peeking through the reference. deref :: Reference a => Ref a -> IO a -- | Convert from a referenced value In the IO monad to allow -- peeking through the reference. deref :: (Reference a, a ~ Ref a) => Ref a -> IO a -- | Convert between Haskell and representation types class Marshal a where { type family Rep a :: *; } to :: Marshal a => a -> IO (Rep a) to :: (Marshal a, a ~ Rep a) => a -> IO (Rep a) from :: Marshal a => Rep a -> IO a from :: (Marshal a, a ~ Rep a) => Rep a -> IO a instance System.Plugins.MultiStage.Marshal GHC.Types.Bool instance System.Plugins.MultiStage.Marshal GHC.Int.Int8 instance System.Plugins.MultiStage.Marshal GHC.Int.Int16 instance System.Plugins.MultiStage.Marshal GHC.Int.Int32 instance System.Plugins.MultiStage.Marshal GHC.Int.Int64 instance System.Plugins.MultiStage.Marshal GHC.Word.Word8 instance System.Plugins.MultiStage.Marshal GHC.Word.Word16 instance System.Plugins.MultiStage.Marshal GHC.Word.Word32 instance System.Plugins.MultiStage.Marshal GHC.Word.Word64 instance System.Plugins.MultiStage.Marshal GHC.Types.Float instance System.Plugins.MultiStage.Marshal GHC.Types.Double instance System.Plugins.MultiStage.Reference GHC.Types.Bool instance System.Plugins.MultiStage.Reference GHC.Int.Int8 instance System.Plugins.MultiStage.Reference GHC.Int.Int16 instance System.Plugins.MultiStage.Reference GHC.Int.Int32 instance System.Plugins.MultiStage.Reference GHC.Int.Int64 instance System.Plugins.MultiStage.Reference GHC.Word.Word8 instance System.Plugins.MultiStage.Reference GHC.Word.Word16 instance System.Plugins.MultiStage.Reference GHC.Word.Word32 instance System.Plugins.MultiStage.Reference GHC.Word.Word64 instance System.Plugins.MultiStage.Reference GHC.Types.Float instance System.Plugins.MultiStage.Reference GHC.Types.Double