Skip to content

Other kinds of abstract definitions #314

@ppolesiuk

Description

@ppolesiuk

The abstr visibility mode for types means that the type is public, but constructors (values) are not. The abstr with the same semantics would be useful for other kinds of definitions. A motivating example is to create a global handler with public effect, but private capability that is used for defining other useful function. For instance, consider the following implementation of logging, assuming that hState is a library defined handler for state (btw, we have not such handler yet).

abstr handle logger / Log with hState

pub let log msg =
  logger := msg :: logger.get ()

...

Here, the Log effect should be public, but the capability logger should be private.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. parsingThings related to lexer and parser1. type inferenceType inference and the Unif language

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions