rec-def-0.1: Recusively defined values
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Recursive.R

Description

This module re-exports the safe parts of Data.Recursive.R.Internal.

If you import a module like Data.Recursive.Bool you do not need to import this module here directly.

Synopsis

Documentation

data R a Source #

A value of type R a is a a, but defined using only specific operations (which you will find in the corresponding module, e.g. Data.Recursive.Bool), which allow recursive definitions.

You can use getR to extract the value.

Do not use the extracted value in the definition of that value, this will loop just like a recursive definition with plain values would.

mkR :: HasPropagator a => a -> R a Source #

Any value of type a is also a value of type r a.

getR :: HasPropagator a => R a -> a Source #

Extract the value from a R a. This must not be used when _defining_ that value.

getRDual :: HasPropagator (Dual a) => R (Dual a) -> a Source #

Convenience variant of getR to also remove the Dual newtype wrapper, mostly for use with Data.Recursive.DualBool.