ivory-0.1.0.9: Safe embedded C programming.

Safe HaskellNone
LanguageHaskell2010

Ivory.Language.Module

Synopsis

Documentation

data Visible Source #

Constructors

Public 
Private 
Instances
Show Visible Source # 
Instance details

Defined in Ivory.Language.Module

ReaderM ModuleM Visible Source # 
Instance details

Defined in Ivory.Language.Module

Methods

ask :: ModuleM Visible #

newtype ModuleM a Source #

Constructors

Module 
Instances
Monad ModuleM Source # 
Instance details

Defined in Ivory.Language.Module

Methods

(>>=) :: ModuleM a -> (a -> ModuleM b) -> ModuleM b #

(>>) :: ModuleM a -> ModuleM b -> ModuleM b #

return :: a -> ModuleM a #

fail :: String -> ModuleM a #

Functor ModuleM Source # 
Instance details

Defined in Ivory.Language.Module

Methods

fmap :: (a -> b) -> ModuleM a -> ModuleM b #

(<$) :: a -> ModuleM b -> ModuleM a #

Applicative ModuleM Source # 
Instance details

Defined in Ivory.Language.Module

Methods

pure :: a -> ModuleM a #

(<*>) :: ModuleM (a -> b) -> ModuleM a -> ModuleM b #

liftA2 :: (a -> b -> c) -> ModuleM a -> ModuleM b -> ModuleM c #

(*>) :: ModuleM a -> ModuleM b -> ModuleM b #

(<*) :: ModuleM a -> ModuleM b -> ModuleM a #

ReaderM ModuleM Visible Source # 
Instance details

Defined in Ivory.Language.Module

Methods

ask :: ModuleM Visible #

WriterM ModuleM Module Source # 
Instance details

Defined in Ivory.Language.Module

Methods

put :: Module -> ModuleM () #

Semigroup (ModuleM ()) Source # 
Instance details

Defined in Ivory.Language.Module

Methods

(<>) :: ModuleM () -> ModuleM () -> ModuleM () #

sconcat :: NonEmpty (ModuleM ()) -> ModuleM () #

stimes :: Integral b => b -> ModuleM () -> ModuleM () #

Monoid (ModuleM ()) Source # 
Instance details

Defined in Ivory.Language.Module

Methods

mempty :: ModuleM () #

mappend :: ModuleM () -> ModuleM () -> ModuleM () #

mconcat :: [ModuleM ()] -> ModuleM () #

visAcc :: Visible -> a -> Visible a Source #

Add an element to the public/private list, depending on visibility

incl :: Def a -> ModuleDef Source #

Include a defintion in the module.

inclSym :: IvoryExpr t => t -> ModuleDef Source #

Import an externally-defined symbol.

depend :: Module -> ModuleDef Source #

Add a dependency on another module.

dependByName :: String -> ModuleDef Source #

Add a dependency on another module by name. Use the same name here that you use when you call package to build the target module. This function is particularly useful when building mutually dependent module structures.

defStruct :: forall sym. (IvoryStruct sym, ASymbol sym) => Proxy sym -> ModuleDef Source #

Include the definition of a structure in the module.

defStringType :: forall str. IvoryString str => Proxy str -> ModuleDef Source #

Include the definition of a string type's structure.

defMemArea :: IvoryArea area => MemArea area -> ModuleDef Source #

Include the definition of a memory area.

defConstMemArea :: IvoryArea area => ConstMemArea area -> ModuleDef Source #

Include the definition of a constant memory area.

package :: String -> ModuleDef -> Module Source #

Package the module up. Default visibility is public.

private :: ModuleDef -> ModuleDef Source #

Start a block of definitions that should not be put in the header.

public :: ModuleDef -> ModuleDef Source #

Start a block of definitions should be put in the header. This is the default, and this function is just included to complement private.