Closed MichaelXavier closed 6 years ago
Simply because there's no equivalent in the Elm original. I'd accept a PR to add it. (And you should definitely not attempt it with FFI, the JS side API is very much not guaranteed to remain stable.)
I may give it a try, although I think when I looked last FFI was the only option as the PS API did not make it possible to implement.
I mean, you should never try to get the value using FFI from your own application. Relying on the implementation inside purescript-signal is of course OK, there's no other way to do it.
I'm curious why there is no equivalent of
get
on the purescript side of Signal. Because signals must always have values, it seems like you could havegetSignal :: forall e a. Signal a -> Eff e a
. I've once or twice had use for something like this and hesitated to implement it myself with FFI.