git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Prelude's print function doesn't need to be an FFI call.
commit00e0cb39f20b0a3b23f6f682c73faa847b7e1c95 authorPhil Freeman <paf31@cantab.net> dateSat 18 Jan 2014, 15:49 (13 years ago) parentf46023b
1 file changed+3−1
libraries/prelude/prelude.purs+3−1
libraries/prelude/prelude.purs+3−1
@@ -321,13 +321,15 @@ module IORef where
321321
322322module Trace where
323323
324+ import Prelude
324325 import Eff
325326
326327 foreign import data Trace :: !
327328
328329 foreign import trace "function trace(s) { return function() { console.log(s); return {}; }; }" :: forall r. String -> Eff (trace :: Trace | r) {}
329330
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)
331333
332334module ST where
333335