giml-language-0.1.0.0: A purely functional programming language with emphasis on structural typing
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Giml.Common

Description

Common data types

Synopsis

Documentation

type TypeVar = Text Source #

A type variable name

type TypeCon = Text Source #

A type constructor name

type Constr = Text Source #

A data constructor

type Label = Text Source #

A record label

type Record a = Map Label a Source #

A general record data type

data Variant a Source #

A general variant data type

Constructors

Variant Constr a 

Instances

Instances details
Functor Variant Source # 
Instance details

Defined in Language.Giml.Common

Methods

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

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

Foldable Variant Source # 
Instance details

Defined in Language.Giml.Common

Methods

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

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

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

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

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

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

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

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

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

toList :: Variant a -> [a] #

null :: Variant a -> Bool #

length :: Variant a -> Int #

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

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

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

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

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

Traversable Variant Source # 
Instance details

Defined in Language.Giml.Common

Methods

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

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

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

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

Eq a => Eq (Variant a) Source # 
Instance details

Defined in Language.Giml.Common

Methods

(==) :: Variant a -> Variant a -> Bool #

(/=) :: Variant a -> Variant a -> Bool #

Data a => Data (Variant a) Source # 
Instance details

Defined in Language.Giml.Common

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Variant a -> c (Variant a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Variant a) #

toConstr :: Variant a -> Constr #

dataTypeOf :: Variant a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Variant a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Variant a)) #

gmapT :: (forall b. Data b => b -> b) -> Variant a -> Variant a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Variant a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Variant a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Variant a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Variant a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Variant a -> m (Variant a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Variant a -> m (Variant a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Variant a -> m (Variant a) #

Ord a => Ord (Variant a) Source # 
Instance details

Defined in Language.Giml.Common

Methods

compare :: Variant a -> Variant a -> Ordering #

(<) :: Variant a -> Variant a -> Bool #

(<=) :: Variant a -> Variant a -> Bool #

(>) :: Variant a -> Variant a -> Bool #

(>=) :: Variant a -> Variant a -> Bool #

max :: Variant a -> Variant a -> Variant a #

min :: Variant a -> Variant a -> Variant a #

Show a => Show (Variant a) Source # 
Instance details

Defined in Language.Giml.Common

Methods

showsPrec :: Int -> Variant a -> ShowS #

show :: Variant a -> String #

showList :: [Variant a] -> ShowS #