git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Prelude's print function doesn't need to be an FFI call.
00e0cb3Phil Freeman
libraries/prelude/prelude.purs+3−1
@@ -321,13 +321,15 @@ module IORef where
321
321
322module Trace where
322module Trace where
323
323
324+ import Prelude
324 import Eff
325 import Eff
325
326
326 foreign import data Trace :: !
327 foreign import data Trace :: !
327
328
328 foreign import trace "function trace(s) { return function() { console.log(s); return {}; }; }" :: forall r. String -> Eff (trace :: Trace | r) {}
329 foreign import trace "function trace(s) { return function() { console.log(s); return {}; }; }" :: forall r. String -> Eff (trace :: Trace | r) {}
329
330
330− foreign import print "function print(dict) { return function (o) { return function() { console.log(Prelude.show(dict)(o)); return {}; }; }; }" :: forall a r. (Prelude.Show a) => a -> Eff (trace :: Trace | r) {}
331+ print :: forall a r. (Prelude.Show a) => a -> Eff (trace :: Trace | r) {}
332+ print o = trace (show o)
331
333
332module ST where
334module ST where
333
335