grapefruit-records-0.0.0.0: A record systemSource codeContentsIndex
FRP.Grapefruit.Record.Optionality
Description

This module provides support for optionality records.

Optionality records are used to specify interfaces with optional input data. Compared to an ordinary record type, an optionality record type states for every field whether it is required or optional. This is done by a slight abuse of field names. A field name name is replaced by either Req name or Opt name. Optionality record types are never used directly in types of actual values. Instead, they are converted into ordinary record types with the type functions All and Required.

Synopsis
data Req name
data Opt name
class (Record (All optRecord), Record (Required optRecord)) => OptRecord optRecord where
type All optRecord :: * -> *
type Required optRecord :: * -> *
Documentation
data Req name Source
A marker for required fields.
data Opt name Source
A marker for optional fields.
class (Record (All optRecord), Record (Required optRecord)) => OptRecord optRecord Source
The class of all optionality record types.
Associated Types
type All optRecord :: * -> *Source
Converts an optionality record type into an ordinary record type by dropping all Req and Opt annotations.
type Required optRecord :: * -> *Source
Extracts all required fields from an optionality record type and drops their Req annotations.
Methods
show/hide Instances
OptRecord X
OptRecord optRecord => OptRecord (optRecord :& (Opt name ::: Of signal val))
OptRecord optRecord => OptRecord (optRecord :& (Req name ::: Of signal val))
Produced by Haddock version 2.4.2