joelr1:
> Folks,
>
> How is one to interpret the following? I'm particularly interested in
> the "IO $ \ s -> " notatoin as I have never seen that before.
>
> allocaBytes :: Int -> (Ptr a -> IO b) -> IO b
> allocaBytes (I# size) action = IO $ \ s ->
> case newPinnedByteArray# size s o
Folks,
How is one to interpret the following? I'm particularly interested in
the "IO $ \ s -> " notatoin as I have never seen that before.
allocaBytes :: Int -> (Ptr a -> IO b) -> IO b
allocaBytes (I# size) action = IO $ \ s ->
case newPinnedByteArray# size s of { (# s, mbarr# #) ->