by voxfrege · 11y ago · 0 comments
Better yet, if you know it to be pure, you can give it an appropriate type and just use it in pure code, like:
pure native cos java.lang.Math.cos :: Double -> Double
which should be roughly equivalent to: foreign import jvm "java.lang.Math.cos" cos :: Double -> Double
except that no Haskell compiler that I know implements the "jvm" calling convention, for obvious reasons.In fact, all primitive operations, types and so on are defined this way in the Frege Prelude.
No comments yet.