Language.PureScript.Roles

purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.Roles

Description

Data types for roles.

Synopsis

- data Role
  - = Nominal
  - | Representational
  - | Phantom
- displayRole :: Role -> Text

# Documentation

data Role #

The role of a type constructor's parameter.

Constructors

Nominal | This parameter's identity affects the representation of the type it is parameterising.
Representational | This parameter's representation affects the representation of the type it is parameterising.
Phantom | This parameter has no effect on the representation of the type it is parameterising.

#### Instances

Instances details

FromJSON Role # |
Instance details Defined in Language.PureScript.Roles Methods parseJSON :: Value -> Parser Role # parseJSONList :: Value -> Parser [Role] # omittedField :: Maybe Role #
ToJSON Role # |
Instance details Defined in Language.PureScript.Roles Methods toJSON :: Role -> Value # toEncoding :: Role -> Encoding # toJSONList :: [Role] -> Value # toEncodingList :: [Role] -> Encoding # omitField :: Role -> Bool #
NFData Role # |
Instance details Defined in Language.PureScript.Roles Methods rnf :: Role -> () #
Generic Role # |
Instance details Defined in Language.PureScript.Roles Associated Types
type Rep Role |
Instance details Defined in Language.PureScript.Roles type Rep Role = D1 ('MetaData "Role" "Language.PureScript.Roles" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "Nominal" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Representational" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Phantom" 'PrefixI 'False) (U1 :: Type -> Type)))
Methods from :: Role -> Rep Role x # to :: Rep Role x -> Role #
Show Role # |
Instance details Defined in Language.PureScript.Roles Methods showsPrec :: Int -> Role -> ShowS # show :: Role -> String # showList :: [Role] -> ShowS #
Eq Role # |
Instance details Defined in Language.PureScript.Roles Methods (==) :: Role -> Role -> Bool # (/=) :: Role -> Role -> Bool #
Ord Role # |
Instance details Defined in Language.PureScript.Roles Methods compare :: Role -> Role -> Ordering # (<) :: Role -> Role -> Bool # (<=) :: Role -> Role -> Bool # (>) :: Role -> Role -> Bool # (>=) :: Role -> Role -> Bool # max :: Role -> Role -> Role # min :: Role -> Role -> Role #
Serialise Role # |
Instance details Defined in Language.PureScript.Roles Methods encode :: Role -> Encoding # decode :: Decoder s Role # encodeList :: [Role] -> Encoding # decodeList :: Decoder s [Role] #
type Rep Role # |
Instance details Defined in Language.PureScript.Roles type Rep Role = D1 ('MetaData "Role" "Language.PureScript.Roles" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "Nominal" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Representational" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Phantom" 'PrefixI 'False) (U1 :: Type -> Type)))

displayRole :: Role -> Text #