BNFC3-3.0: A compiler front-end generator.
Safe HaskellNone
LanguageHaskell2010

BNFC.Utils.Singleton

Description

Constructing singleton collections.

Synopsis

Documentation

class (Semigroup coll, Monoid coll, Singleton el coll) => Collection el coll | coll -> el where Source #

A create-only possibly empty collection is a monoid with the possibility to inject elements.

Minimal complete definition

Nothing

Methods

fromList :: [el] -> coll Source #

Instances

Instances details
Ord a => Collection a (Set a) Source # 
Instance details

Defined in BNFC.Utils.Singleton

Methods

fromList :: [a] -> Set a Source #

Collection a [a] Source # 
Instance details

Defined in BNFC.Utils.Singleton

Methods

fromList :: [a] -> [a] Source #

Collection a ([a] -> [a]) Source # 
Instance details

Defined in BNFC.Utils.Singleton

Methods

fromList :: [a] -> [a] -> [a] Source #

Ord k => Collection (k, a) (Map k a) Source # 
Instance details

Defined in BNFC.Utils.Singleton

Methods

fromList :: [(k, a)] -> Map k a Source #

class Singleton el coll | coll -> el where Source #

Overloaded singleton constructor for collections.

Methods

singleton :: el -> coll Source #

Instances

Instances details
Singleton a (Set a) Source # 
Instance details

Defined in BNFC.Utils.Singleton

Methods

singleton :: a -> Set a Source #

Singleton a (NonEmpty a) Source # 
Instance details

Defined in BNFC.Utils.Singleton

Methods

singleton :: a -> NonEmpty a Source #

Singleton a [a] Source # 
Instance details

Defined in BNFC.Utils.Singleton

Methods

singleton :: a -> [a] Source #

Singleton a (Maybe a) Source # 
Instance details

Defined in BNFC.Utils.Singleton

Methods

singleton :: a -> Maybe a Source #

Singleton a ([a] -> [a]) Source # 
Instance details

Defined in BNFC.Utils.Singleton

Methods

singleton :: a -> [a] -> [a] Source #

Singleton (k, a) (Map k a) Source # 
Instance details

Defined in BNFC.Utils.Singleton

Methods

singleton :: (k, a) -> Map k a Source #