Reputation: 233
You have a signal function PointlessButton
which inhabits Signal (Maybe Unit) -> ?
that represents a button that does nothing, and a rendering function, Render
that inhabits ? -> Signal (ScreenDimensions -> RGB)
, where ScreenDimensions = Nat × Nat
and RGB = Nat × Nat × Nat
, that takes the entire FRP circuit and maps each pixel of the screen to an RGB value. PointlessButton
is associated to two possible renderings corresponding to when it is clicked or not, which are inhabitants of Nat × Nat -> Maybe RGB
that return None
when given pixels over which the button is not defined.
My question is, what exactly is the relationship between PointlessButton
and Render
? Or more precisely,
Render
, so that it can make use of them?Render
, so that it knows which of these is the one that should be used at a particular moment in time?My work on the question in the comments. Hints, references, comments highly appreciated!
Upvotes: 0
Views: 44