definition: |
wMaybe :: Eq a => WuiSpec Bool -> WuiSpec a -> a -> WuiSpec (Maybe a) wMaybe (WuiSpec paramb showb _ readb) (WuiSpec parama showa cora reada) def = WuiSpec (renderTuple, tupleError, const True) (\ (render,errmsg,legal) nocheck mbs -> let (heb,rtb) = showb paramb nocheck (mbs/=Nothing) (hea,rta) = showa parama nocheck (maybe def id mbs) in ((if nocheck || legal mbs then render else renderError render errmsg) [heb,hea], states2state [rtb,rta])) (\wparams mbv -> conditionOf wparams mbv && maybe True (\v -> cora parama v) mbv) (\env s -> let [rb,ra] = state2states s vb = readb env rb va = reada env ra in if vb then Just va else Nothing) |
demand: |
arguments 2 3 |
deterministic: |
deterministic operation |
documentation: |
--- WUI for Maybe values. It is constructed from a WUI for --- Booleans and a WUI for the potential values. Nothing corresponds --- to a selection of False in the Boolean WUI. --- The value WUI is shown after the Boolean WUI. --- @param wspecb - a WUI specification for Boolean values --- @param wspeca - a WUI specification for the type of potential values --- @param def - a default value that is used if the current value is Nothing |
failfree: |
<FAILING> |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{(_,{WuiSpec},{WuiSpec},_) |-> {WuiSpec}} |
name: |
wMaybe |
precedence: |
no precedence defined |
result-values: |
{WuiSpec} |
signature: |
Prelude.Eq a => WuiSpec Prelude.Bool -> WuiSpec a -> a -> WuiSpec (Prelude.Maybe a) |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
possibly non-reducible on same data term |