dvberkel / microkanren / MicroKanren

Visualization of μKanren goals

Types


type Message
    = TakeFromStream

Message a StreamModel can react to


type alias StreamModel a =
{ name : String
, seenStates : List (Kernel.State a)
, stream : Kernel.Stream a 
}

Keep track of a Stream.

Constructor

streamModelFromGoal : String -> Kernel.Goal a -> StreamModel a

Create a StreamModel from a Goal.

Elm Architecture

update : Message -> StreamModel a -> StreamModel a

Update the StreamModel according to the received Message

view : (a -> String) -> StreamModel a -> Html Message

Represent a StreamModel.

This needs a way to visualize the generic parameter. It is provided as funtion with signature (a -> String).