Skip to main content

module salix::util::Debug

rascal-0.34.0
salix-core-0.2.3

Usage

import salix::util::Debug;

Source code

http://github.com/usethesource/salix-core/src/main/rascal/salix/util/Debug.rsc

Dependencies

import salix::HTML;
import salix::App;
import salix::Core;
import List;

alias DebugModel

tuple[int current, list[&T] models, list[Msg] messages, &T(Msg, &T) update]

data Msg

data Msg  
= next()
| prev()
| sub(Msg msg)
| goto(int version)
;

function debug

App[DebugModel[&T]] debug(str appId,
&T() model,
void(DebugModel[&T]) view, // // can't wrap view implicitly, because it'll lead to closures...
&T(Msg, &T) upd,
loc static,
Subs[&T] subs = noSubs)

function wrapSubs

Subs[DebugModel[&T]] wrapSubs(Subs[&T] subs)

function wrapModel

DebugModel[&T]() wrapModel(&T() model, &T(Msg, &T) upd)

function debugView

void debugView(DebugModel[&T] model, void(&T) subView)

function debugUpdate

DebugModel[&T] debugUpdate(Msg msg, DebugModel[&T] m)