Module Plural

This module provides datatypes and operations to implement operations with plural arguments.

Author: Michael Hanus

Version: December 2012

Summary of exported operations:

plural :: PluralArg a -> a  Deterministic 
Access a plural argument by applying the wrapped operation.

Exported datatypes:


Plural

This trivial type synonym is used to mark plural arguments in a Curry program.

Type synonym: Plural a = a


PluralArg

Datatype for representing plural arguments. A plural argument is a unary operation wrapped with some constructor. Thus, each expression e to construct an actual plural argument must be replaced by (PluralArg (\_->e)).

Constructors:

  • PluralArg :: (() -> a) -> PluralArg a

Exported operations:

plural :: PluralArg a -> a  Deterministic 

Access a plural argument by applying the wrapped operation. Thus, each use of a plural argument parameter x in the right-hand side must be replaced by (plural x).