[Haskell-cafe] Linking to third party libraries in windows

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri May 26 04:41:13 EDT 2006


Hello Matthew,

Friday, May 26, 2006, 11:50:28 AM, you wrote:

> I can't say I fully understand why this is true.  In both cases I was
> wrapping Rmatrix in
> a monad after every computation.  The difference is that the array 
> component  had an
> additional monad wrapper around and now it doesn't.  That is,

> old case
> newtype Rmatrix = Rmatrix (Int, Int,  IO(StorableArray Int CDouble))

> new case
> newtype Rmatrix = Rmatrix (Int, Int,  StorableArray Int CDouble)

seems that you just don't understood monads. "IO a" type means
"an action that returns value of type 'a'" :)

just as example - 'getChar' is an action that has type "IO Char". this
action by itself don't contain any Char, as you can guess :)

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list