regular-0.2.1: Generic programming library for regular datatypes.Source codeContentsIndex
Generics.Regular.Constructor
Portabilitynon-portable
Stabilityexperimental
Maintainergenerics@haskell.org
Description
Summary: Representation for constructors.
Synopsis
class Constructor c where
conName :: t c (f :: * -> *) r -> String
conFixity :: t c (f :: * -> *) r -> Fixity
conIsRecord :: t c (f :: * -> *) r -> Bool
data Fixity
= Prefix
| Infix Associativity Int
data Associativity
= LeftAssociative
| RightAssociative
| NotAssociative
Documentation
class Constructor c whereSource
Class for datatypes that represent data constructors. For non-symbolic constructors, only conName has to be defined. The weird argument is supposed to be instantiated with C from base, hence the complex kind.
Methods
conName :: t c (f :: * -> *) r -> StringSource
conFixity :: t c (f :: * -> *) r -> FixitySource
conIsRecord :: t c (f :: * -> *) r -> BoolSource
data Fixity Source
Datatype to represent the fixity of a constructor. An infix declaration directly corresponds to an application of Infix.
Constructors
Prefix
Infix Associativity Int
show/hide Instances
data Associativity Source
Constructors
LeftAssociative
RightAssociative
NotAssociative
show/hide Instances
Produced by Haddock version 2.4.2