The module Spork.App does not export the type AppInstance (and also the type AppChange). Why not?
Here is a simple usecase:
import Spork.App as App
main :: Eff AppEffects Unit
main = do
inst <- App.makeWithSelector never app "#app"
onresize inst UpdateSize
inst.run
onresize
:: forall eff s i
. App.AppInstance (dom :: DOM | eff) s i -- the type AppInstance is needed here
-> (Int -> Int -> i)
-> Eff (dom :: DOM | eff) Unit
onresize inst action = do
win <- DOM.window
let updateSize = do
inst.push =<< action <$> DOM.innerWidth win <*> DOM.innerHeight win
inst.run
listener = DOM.eventListener (const updateSize)
DOM.addEventListener ET.resize listener false (DOM.windowToEventTarget win)
updateSize
The module
Spork.App
does not export the typeAppInstance
(and also the typeAppChange
). Why not?Here is a simple usecase: