Bulat Ziganshin wrote:
Hello Brian,
Sunday, May 28, 2006, 1:06:06 AM, you wrote:
how best to understand IO but certainly before trying to do so, a
state monad is *infinitely* easier to understand and then provides a
good basis for understanding IO)
The first monad I understood was the
That's an interesting statement that bears further scrutiny. I've been
viewing monads as a kind of encapsulation in a quasi-hidden world state.
Yes a monad is a function that would give you an output if you had
access to the input world. That is the picture drawn in Simon Peyton
Jones'
Matthew Bromberg wrote:
That's an interesting statement that bears further scrutiny. I've
been viewing monads as a kind of encapsulation in a quasi-hidden
world state.
The IO monad can be viewed as encapsulating a function from a
world state to a pair consisting of an updated world state and
Brian Hulley wrote:
If I write:
do
let n = newListArray a l
p - n
q - n
two separate arrays will be created, because n is the action of
creating a new array, and this action is executed twice in the body
of the do.
However, if I instead wrote:
do
x
Hello Brian,
Sunday, May 28, 2006, 1:06:06 AM, you wrote:
how best to understand IO but certainly before trying to do so, a state
monad is *infinitely* easier to understand and then provides a good basis
for understanding IO)
The first monad I understood was the state monad on page 261 of
Not only does your suggestion make more sense than what I was doing, but
also
it causes the 'matrices' to behave as expected, namely to have the side
effects
incorporated into their array values.
I can't say I fully understand why this is true. In both cases I was
wrapping Rmatrix in
a monad
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.
Dear friends -
I must have clicked reply instead of reply all so here is the reply
haskell cafe would have received:
Matthew Bromberg wrote:
Not only does your suggestion make more sense than what I was doing,
but also
it causes the 'matrices' to behave as expected, namely to have the
side
Has anyone actually seen ghc link successfully to third party libraries on
windows?
While I have been able to link to C object code compiled by ghc (and thus
gcc by proxy), I have not been able to actually link against any substantial
third party library or dll in windows.
I am currently
SevenThunders wrote:
Has anyone actually seen ghc link successfully to third party
libraries on windows?
Yes - I'm currently writing a Haskell app that uses a Visual C++ DLL that
I'm also writing. It is quite complicated to link Haskell to Windows DLLs,
so I made a page describing how to do
OK I'm punting on the AMD libraries for now and will just use the Atlas
libraries until I can get
to the bottom of this.
However, for me, it seems the rabbit hole goes a little deeper on the
issue of array copies. Consider this
code snippet
import Matrix
main = do
print Matrices
let
11 matches
Mail list logo