apigen-0.0.2: FFI API generator for several languages
Safe HaskellNone
LanguageHaskell2010

Apigen.Types

Documentation

data BitSize Source #

Constructors

B8 
B16 
B32 
B64 

Instances

Instances details
Eq BitSize Source # 
Instance details

Defined in Apigen.Types

Methods

(==) :: BitSize -> BitSize -> Bool #

(/=) :: BitSize -> BitSize -> Bool #

Show BitSize Source # 
Instance details

Defined in Apigen.Types

ToJSON BitSize Source # 
Instance details

Defined in Apigen.Types

FromJSON BitSize Source # 
Instance details

Defined in Apigen.Types

data Constness Source #

Constructors

ConstThis 
MutableThis 

Instances

Instances details
Eq Constness Source # 
Instance details

Defined in Apigen.Types

Show Constness Source # 
Instance details

Defined in Apigen.Types

ToJSON Constness Source # 
Instance details

Defined in Apigen.Types

FromJSON Constness Source # 
Instance details

Defined in Apigen.Types

data Decl lexeme Source #

Constructors

Typename lexeme 
TypeDecl lexeme 
BuiltinType BuiltinType 
ConstType (Decl lexeme) 
PointerType lexeme 
ConstPointerType lexeme 
CallbackType lexeme 
ArrayType BuiltinType 
ConstArrayType BuiltinType 
UserArrayType lexeme 
SizedArrayType (Decl lexeme) (Decl lexeme) 
ClassDecl lexeme [Decl lexeme] 
Namespace [Text] [Decl lexeme] 
CallbackTypeDecl lexeme [Decl lexeme] 
IdTypeDecl lexeme 
Constructor lexeme [Decl lexeme] 
Destructor lexeme [Decl lexeme] 
Method Constness (Decl lexeme) lexeme [Decl lexeme] 
Property lexeme (Decl lexeme) 
ValueProp (Decl lexeme) (Maybe (Decl lexeme)) (Maybe (Decl lexeme)) 
ArrayProp (Decl lexeme) (Maybe (Decl lexeme)) (Maybe (Decl lexeme)) (Maybe (Decl lexeme)) 
Function (Decl lexeme) lexeme [Decl lexeme] 
Define lexeme 
Var (Decl lexeme) lexeme 
Ref lexeme 
IntVal lexeme 
Paren (Decl lexeme) 
Abs (Decl lexeme) 
Max (Decl lexeme) (Decl lexeme) 
Add (Decl lexeme) (Decl lexeme) 
Sub (Decl lexeme) (Decl lexeme) 
Mul (Decl lexeme) (Decl lexeme) 
Div (Decl lexeme) (Decl lexeme) 
EnumMember lexeme 
Enumeration [Generated] lexeme [Decl lexeme] 

Instances

Instances details
Functor Decl Source # 
Instance details

Defined in Apigen.Types

Methods

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

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

Foldable Decl Source # 
Instance details

Defined in Apigen.Types

Methods

fold :: Monoid m => Decl m -> m #

foldMap :: Monoid m => (a -> m) -> Decl a -> m #

foldMap' :: Monoid m => (a -> m) -> Decl a -> m #

foldr :: (a -> b -> b) -> b -> Decl a -> b #

foldr' :: (a -> b -> b) -> b -> Decl a -> b #

foldl :: (b -> a -> b) -> b -> Decl a -> b #

foldl' :: (b -> a -> b) -> b -> Decl a -> b #

foldr1 :: (a -> a -> a) -> Decl a -> a #

foldl1 :: (a -> a -> a) -> Decl a -> a #

toList :: Decl a -> [a] #

null :: Decl a -> Bool #

length :: Decl a -> Int #

elem :: Eq a => a -> Decl a -> Bool #

maximum :: Ord a => Decl a -> a #

minimum :: Ord a => Decl a -> a #

sum :: Num a => Decl a -> a #

product :: Num a => Decl a -> a #

Traversable Decl Source # 
Instance details

Defined in Apigen.Types

Methods

traverse :: Applicative f => (a -> f b) -> Decl a -> f (Decl b) #

sequenceA :: Applicative f => Decl (f a) -> f (Decl a) #

mapM :: Monad m => (a -> m b) -> Decl a -> m (Decl b) #

sequence :: Monad m => Decl (m a) -> m (Decl a) #

Eq lexeme => Eq (Decl lexeme) Source # 
Instance details

Defined in Apigen.Types

Methods

(==) :: Decl lexeme -> Decl lexeme -> Bool #

(/=) :: Decl lexeme -> Decl lexeme -> Bool #

Show lexeme => Show (Decl lexeme) Source # 
Instance details

Defined in Apigen.Types

Methods

showsPrec :: Int -> Decl lexeme -> ShowS #

show :: Decl lexeme -> String #

showList :: [Decl lexeme] -> ShowS #

ToJSON lexeme => ToJSON (Decl lexeme) Source # 
Instance details

Defined in Apigen.Types

Methods

toJSON :: Decl lexeme -> Value #

toEncoding :: Decl lexeme -> Encoding #

toJSONList :: [Decl lexeme] -> Value #

toEncodingList :: [Decl lexeme] -> Encoding #

omitField :: Decl lexeme -> Bool #

FromJSON lexeme => FromJSON (Decl lexeme) Source # 
Instance details

Defined in Apigen.Types

Methods

parseJSON :: Value -> Parser (Decl lexeme) #

parseJSONList :: Value -> Parser [Decl lexeme] #

omittedField :: Maybe (Decl lexeme) #

data Module lexeme Source #

Constructors

Module FilePath [Decl lexeme] 

Instances

Instances details
Functor Module Source # 
Instance details

Defined in Apigen.Types

Methods

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

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

Foldable Module Source # 
Instance details

Defined in Apigen.Types

Methods

fold :: Monoid m => Module m -> m #

foldMap :: Monoid m => (a -> m) -> Module a -> m #

foldMap' :: Monoid m => (a -> m) -> Module a -> m #

foldr :: (a -> b -> b) -> b -> Module a -> b #

foldr' :: (a -> b -> b) -> b -> Module a -> b #

foldl :: (b -> a -> b) -> b -> Module a -> b #

foldl' :: (b -> a -> b) -> b -> Module a -> b #

foldr1 :: (a -> a -> a) -> Module a -> a #

foldl1 :: (a -> a -> a) -> Module a -> a #

toList :: Module a -> [a] #

null :: Module a -> Bool #

length :: Module a -> Int #

elem :: Eq a => a -> Module a -> Bool #

maximum :: Ord a => Module a -> a #

minimum :: Ord a => Module a -> a #

sum :: Num a => Module a -> a #

product :: Num a => Module a -> a #

Traversable Module Source # 
Instance details

Defined in Apigen.Types

Methods

traverse :: Applicative f => (a -> f b) -> Module a -> f (Module b) #

sequenceA :: Applicative f => Module (f a) -> f (Module a) #

mapM :: Monad m => (a -> m b) -> Module a -> m (Module b) #

sequence :: Monad m => Module (m a) -> m (Module a) #

Show lexeme => Show (Module lexeme) Source # 
Instance details

Defined in Apigen.Types

Methods

showsPrec :: Int -> Module lexeme -> ShowS #

show :: Module lexeme -> String #

showList :: [Module lexeme] -> ShowS #

ToJSON lexeme => ToJSON (Module lexeme) Source # 
Instance details

Defined in Apigen.Types

Methods

toJSON :: Module lexeme -> Value #

toEncoding :: Module lexeme -> Encoding #

toJSONList :: [Module lexeme] -> Value #

toEncodingList :: [Module lexeme] -> Encoding #

omitField :: Module lexeme -> Bool #

FromJSON lexeme => FromJSON (Module lexeme) Source # 
Instance details

Defined in Apigen.Types

Methods

parseJSON :: Value -> Parser (Module lexeme) #

parseJSONList :: Value -> Parser [Module lexeme] #

omittedField :: Maybe (Module lexeme) #

newtype Model lexeme Source #

Constructors

Model [Module lexeme] 

Instances

Instances details
Functor Model Source # 
Instance details

Defined in Apigen.Types

Methods

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

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

Foldable Model Source # 
Instance details

Defined in Apigen.Types

Methods

fold :: Monoid m => Model m -> m #

foldMap :: Monoid m => (a -> m) -> Model a -> m #

foldMap' :: Monoid m => (a -> m) -> Model a -> m #

foldr :: (a -> b -> b) -> b -> Model a -> b #

foldr' :: (a -> b -> b) -> b -> Model a -> b #

foldl :: (b -> a -> b) -> b -> Model a -> b #

foldl' :: (b -> a -> b) -> b -> Model a -> b #

foldr1 :: (a -> a -> a) -> Model a -> a #

foldl1 :: (a -> a -> a) -> Model a -> a #

toList :: Model a -> [a] #

null :: Model a -> Bool #

length :: Model a -> Int #

elem :: Eq a => a -> Model a -> Bool #

maximum :: Ord a => Model a -> a #

minimum :: Ord a => Model a -> a #

sum :: Num a => Model a -> a #

product :: Num a => Model a -> a #

Traversable Model Source # 
Instance details

Defined in Apigen.Types

Methods

traverse :: Applicative f => (a -> f b) -> Model a -> f (Model b) #

sequenceA :: Applicative f => Model (f a) -> f (Model a) #

mapM :: Monad m => (a -> m b) -> Model a -> m (Model b) #

sequence :: Monad m => Model (m a) -> m (Model a) #

Show lexeme => Show (Model lexeme) Source # 
Instance details

Defined in Apigen.Types

Methods

showsPrec :: Int -> Model lexeme -> ShowS #

show :: Model lexeme -> String #

showList :: [Model lexeme] -> ShowS #

ToJSON lexeme => ToJSON (Model lexeme) Source # 
Instance details

Defined in Apigen.Types

Methods

toJSON :: Model lexeme -> Value #

toEncoding :: Model lexeme -> Encoding #

toJSONList :: [Model lexeme] -> Value #

toEncodingList :: [Model lexeme] -> Encoding #

omitField :: Model lexeme -> Bool #

FromJSON lexeme => FromJSON (Model lexeme) Source # 
Instance details

Defined in Apigen.Types

Methods

parseJSON :: Value -> Parser (Model lexeme) #

parseJSONList :: Value -> Parser [Model lexeme] #

omittedField :: Maybe (Model lexeme) #