| Anyway, it's strange that you are experiencing crashes. IIRC, there
| were problems if you mixed modules compiled with different levels of
| optimisation in the same program, but I am not sure it still happens.
If you can make a reproducible crash, please tar it up and send it to
us. It
Sorry should be fixed now (or shortly when the mirror does its stuff)
Simon
| -Original Message-
| From: Bulat Ziganshin [mailto:[EMAIL PROTECTED]
| Sent: 22 November 2005 19:28
| To: Simon Peyton-Jones
| Cc: haskell-cafe@haskell.org
| Subject: Re[2]: [Haskell-cafe] using of data types
Hi Haskell gurus,
I'm very puzzled on some code I saw in GHC Monad.StateT (which is
about state monad transformers) source and hope you can kindly give me
some insight into this.
newtype StateT s m a = S (s - m (a,s))
instance MonadPlus m = MonadPlus (StateT s m) where
mzero =
Did you encounter any difficulties in your
development because of Haskell?
Well, Haskell is different compared with other languages
like C. I thought collision detection would be easier
if i could use some local or global variables, but i
managed to get around it.
Was lazy evaluation ever a
David Menendez wrote:
Keean Schupke writes:
David Menendez wrote:
Chris Kuklewicz writes:
Would the record system describe at
http://lambda-the-ultimate.org/node/view/1119
also be convertable into System Fw, GHC's existing, strongly-typeed
intermediate language. ?
Scherrer, Chad wrote:
Maybe my point wasn't clear. Of course this idea of comparing lazy
evaluation to Unix pipes is very old (long before July 2004, I'm sure).
The point I'm making is that there is an old idea that may be underused.
It is, and only because (.) is defined all wrong!
The unix
On Wed, Nov 23, 2005 at 11:17:25AM +0100, Udo Stenzel wrote:
infixl 2 \|
(\|) = flip (.) -- though I'm using ()
The unix pipe becomes (filter (foo `isPrefixOf`) \| sort \| nub) or
something, which is rather neat, and (#) is used to call member
functions, as in
Why not use Control.Arrow. ?
On Wed, 23 Nov 2005, Udo Stenzel wrote:
Scherrer, Chad wrote:
Maybe my point wasn't clear. Of course this idea of comparing lazy
evaluation to Unix pipes is very old (long before July 2004, I'm sure).
The point I'm making is that there is an old idea that may be underused.
It is, and only
Am Mittwoch, 23. November 2005 10:03 schrieb Fan Wu:
[...]
I'm puzzled over this line:
~(a,s') - lift (mplus m1' m2')
Why is this line in Monad.State.StateT? Recently, we discussed that StateT
does *not* use a lazy pattern here but that it should be changed to using
one. So where did
On 21 November 2005 16:43, Joel Reymont wrote:
I'm being quite careful with resources these days. The outstanding
issues are
1) Crashes on Mac OSX that are not reproduced on Linux, Windows, etc.
2) Some kind of a problem with Chan. getChanContents retrieves things
smoothly, readChan only
On Nov 23, 2005, at 1:18 PM, Simon Marlow wrote:
After subsequent dicsussion, do you still think something strange was
going on here?
Yes, but in a different thread. The Postmortem one.
so this basically loops until there are no messages in the channel,
and
then exits. Is that what you
On 23 November 2005 13:29, Joel Reymont wrote:
On Nov 23, 2005, at 1:18 PM, Simon Marlow wrote:
After subsequent dicsussion, do you still think something strange was
going on here?
Yes, but in a different thread. The Postmortem one.
so this basically loops until there are no messages
Hello haskellers,
in past few days, a lot of stuff on concurrency went through
the conference. I'm trying to use posted things and my own.
They work, even in a context switching regime, but I can't
exploit all the CPU's on my computer. Always is active
just one thread and, thus, the computation
On 11/23/05, Dusan Kolar [EMAIL PROTECTED] wrote:
Hello haskellers,
in past few days, a lot of stuff on concurrency went through
the conference. I'm trying to use posted things and my own.
They work, even in a context switching regime, but I can't
exploit all the CPU's on my computer.
Henning Thielemann [EMAIL PROTECTED] writes:
Since
(a . b) x
a $ b x
a (b x)
are equivalent, do you also want to reverse function and
argument in order to match argument order of . and $ ?
That is
x (b . a)
x b $ a
(x b) a
?
I'm sorry, I'm not sure I understand your
On Wed, 23 Nov 2005, Scherrer, Chad wrote:
Henning Thielemann [EMAIL PROTECTED] writes:
Since
(a . b) x
a $ b x
a (b x)
are equivalent, do you also want to reverse function and
argument in order to match argument order of . and $ ?
That is
x (b . a)
x b $ a
(x b) a
?
I'm
Henning Thielemann [EMAIL PROTECTED] writes:
I want to say, that the order of symbols for ($), (.) and
function application is consistent. This is a fine thing. I
think that shall not be distroyed by giving ($) and (.)
reversed argument order.
I see. I like the argument order also,
Udo Stenzel [EMAIL PROTECTED] writes:
The unix pipe is actually function composition. Its argument
(standard
input) isn't explicitly mentioned
Then it seems Unix must overload the | operator. I typically use it to
do things like
grep . *.hs | wc
So I think of the types as being
grep .
On Wed, Nov 23, 2005 at 09:01:07AM -0800, Scherrer, Chad wrote:
So I think of the types as being
grep . *.hs :: String
wc :: String - Int -- ok, not really, but it shows the point better.
Every unix program has a standard input, even if it doesn't use it, so
I would rather give this type to
HI Wolfgang,
The code is from GHC source
ghc-6.4.1/libraries/monads/Monad/StateT.hs, am I looking at the wrong
place?
I found the thread discussing Monad strictness, where is your StateT defined?
But it is still not clear to me why lazy pattern is used here. Any ideas?
Thanks,
Fan
On
On Wed, Nov 23, 2005 at 08:48:04AM -, Simon Peyton-Jones wrote:
| Anyway, it's strange that you are experiencing crashes. IIRC, there
| were problems if you mixed modules compiled with different levels of
| optimisation in the same program, but I am not sure it still happens.
If you can
On Wed, 2005-11-23 at 08:55 -0800, Scherrer, Chad wrote:
. . .
I see. I like the argument order also, since it so nicely reflects
mathematical notation. But I do think there's a place for (flip ($)) and
(flip (.)). The problem is that the assignment of fixities is much more
subtle and
Am Mittwoch, 23. November 2005 19:02 schrieb Fan Wu:
HI Wolfgang,
The code is from GHC source
ghc-6.4.1/libraries/monads/Monad/StateT.hs, am I looking at the wrong
place?
I found the thread discussing Monad strictness, where is your StateT
defined?
Hello Fan,
the GHC source is just where
On Wed, 2005-11-23 at 17:47 +0100, Henning Thielemann wrote:
. . .
Why is there no () and why is (=) not the default? The order of 'do
{a;b;c}' is compatible with that of (). So we have the fundamental
conflict, that usually function application is from right to left, but
interpreting
On Wed, Nov 23, 2005 at 02:03:22AM -0700, Fan Wu wrote:
instance MonadPlus m = MonadPlus (StateT s m) where
mzero = lift mzero
mplus m1 m2 = do s - peek
let m1' = runState s m1
m2' = runState s m2
Hi Wolfgang,
Thanks for your response and examples! It helps a lot.
From your example I can see Lazy patterns are useful in contexts
where infinite data structures are being defined recursively (quote
section 4.4 of Gentle Introduction to Haskell). But does it apply to
the mplus case? I mean the
Wolfgang Jeltsch writes:
If we use an implementation of State *without lazy patterns*, it
becomes something like this:
\s - case next s of
(x,s') - case everyting s' of
(xs,s'') - ((x : xs),s'')
Note that I used case expressions to realize strict patterns
Folks this is a parser for Context Free Grammars, for some reason when
I go simplify the grammar trying to remove productions that substitute
variables like in the case:
S - A, A - B, B - a, it works perfectly and returns S -
a, the problem is when the root symbol is on the listthat must be
Hello Sebastian,
Wednesday, November 23, 2005, 6:46:54 PM, you wrote:
They work, even in a context switching regime, but I can't
exploit all the CPU's on my computer. Always is active
just one thread
SS Did you compile it with -threaded?
this will not help. multi-processing support will be
Bulat Ziganshin [EMAIL PROTECTED] writes:
They work, even in a context switching regime, but I can't
exploit all the CPU's on my computer. Always is active
just one thread
this will not help. multi-processing support will be added in GHC 6.6,
which must roll out due 6 months, as HCAR says
Keean Schupke writes:
HList can do O(log n) by the way, if the labels have order, you can
implement a binary search tree of labels (Of course all the accessor
functions would need to be rewritten).
The idea of writing a type-level balanced binary search tree fills me
with an uncertain mixture
On 23/11/05, Scherrer, Chad [EMAIL PROTECTED] wrote:
Bill Wood [EMAIL PROTECTED] writes:
Interesting note: in Richard Bird and Oege de Moor, _Algebra
of Programming_, pp. 2-3, the authors write
As a departure from tradition, we write f : A - B rather than
f : B - A to indicate
On Wed, 2005-11-23 at 21:21 -0500, Cale Gibbard wrote:
. . .
Hmm, which edition? My copy (5th ed.) uses the ordinary notation: f(x).
x f does perhaps make more sense, especially with the current
categorical view of functions, but there would have to be a really
hugely good reason to
Cale Gibbard:
x f does perhaps make more sense, especially with the current
categorical view of functions, but there would have to be a really
hugely good reason to change notation, as almost all current work puts
things the other way around.
Almost all?
Well, excluding the Smalltalkers,
On 24/11/05, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Cale Gibbard:
x f does perhaps make more sense, especially with the current
categorical view of functions, but there would have to be a really
hugely good reason to change notation, as almost all current work puts
things the other
35 matches
Mail list logo