3 ms·
You cannot “window.print” in a Float32→Float32 function. It just won’t compile.
by lelf 7y ago
You cannot “window.print” in a Float32→Float32 function. It just won’t compile.
- H8crilA 7y agoIn what language?
- pathikrit 7y agoHaskell
- tedunangst 7y agoYou can't console.log either...
- drdaeman 7y agoThere is Debug.Trace.trace which does the trick with unsafePerformIO (which is a special non-type-safe escape hatch for IO)
- gmfawcett 7y agoYou could make it compile in Haskell. You just shouldn't: f x = unsafePerformIO $ print "boom" >> return (pi * x)
- jakear 7y agoBut of course, the function in question isn’t Math.Round. It’s “interpretDotNetFunction”. Which is, necessarily, “string -> IO ()” (forgive my syntax).