[Haskell-cafe] Using unboxed integers

Richard A. O'Keefe ok at cs.otago.ac.nz
Wed Nov 2 05:50:48 UTC 2016


I have x, y :: Int#
I expect that x <=# y :: Bool
but ghc 7.8 says
     Couldn't match expected type ‘Bool’ with actual type ‘Int#’
     In the expression: x <=# y
     In an equation for ‘b’: b = x <=# y

I have MagicHash and I've imported the right modules so that
<=# is recognised as *something*, but at this point I'm baffled.

I'm also not clear on how I can show an Int#.




More information about the Haskell-Cafe mailing list