CurryInfo: wui2-3.1.0 / HTML.WUI.wRadioSelect

definition:
wRadioSelect :: Eq a => (a->[HtmlExp]) -> [a] -> WuiSpec a
wRadioSelect showelem selset =
  WuiSpec (renderTuple, tupleError, const True)
          (checkLegalInput radioWidget)
          (\wparams -> conditionOf wparams)
          (\env s -> selset !! read (env (state2cgiRef s)))
 where
  radioWidget render v =
    let ref free
        idx = maybe 0 id (elemIndex v selset)
        numhitems = zip [0..] (map showelem selset)
        showItem (i,s) = table [[[(if i==idx then radioMain else radioOther)
                                        ref (show i)],s]]
     in (render (map showItem numhitems),
         cgiRef2state ref)
demand:
no demanded arguments
deterministic:
possibly non-deterministic operation
documentation:
--- A widget to select a value from a given list of values via a radio button.
--- The current value should be contained in the value list and is preselected.
--- The first argument is a mapping from values into HTML expressions
--- that are shown for each item after the radio button.
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_,_) |-> {WuiSpec}}
name:
wRadioSelect
precedence:
no precedence defined
result-values:
{WuiSpec}
signature:
Prelude.Eq a => (a -> [HTML.Base.HtmlExp]) -> [a] -> WuiSpec a
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term