In an ideal world, the Haskell grammar would be simplified by merging
the rules for pattern syntax with those for expression syntax.
Yes, Alastair is right once again! Hurray for less syntax but more static
semantics.
Erik
if I write
(a b) x = a x b x
hugs accepts it, but ghc rejects it. I think that ghc is correct in
that the report only allows
funlhs
-
var apat {apat }
|
pati+1 varop(a,i) pati+1
|
lpati
if I write
(a b) x = a x b x
hugs accepts it, but ghc rejects it. I think that ghc is correct in
that the report only allows
funlhs
-
var apat {apat }
|
pati+1 varop(a,i) pati+1
|
lpati varop(l,i)
When I try to execute this:
result = foldl (+) 0 [1..10]
main = putStr $show (result `mod` 10)
Hugs gives: ERROR: Garbage collection fails to reclaim sufficient space
GHC gives: Stack space overflow: current size 262152 bytes.
Why would this have an error? The list should be
Wow! If Ralf is right, then foldl in a lazy language always generates a
space leak and should be avoided in favor of strictFoldl.
However, I still am not clear why explicity strictness is required for
foldl to behave properly. In fact it seems like the problem is
insufficient laziness.
If
if I write
(a b) x = a x b x
hugs accepts it, but ghc rejects it. I think that ghc is correct in
that the report only allows ...
Yes, GHC adheres to the report more closely than Hugs.
However, the fact that you typed it in suggests that it's a reasonable
thing for Standard Haskell to
The reason I am using Transaction rather than Connection is because I am
assuming that the database provides a transaction isolation model in which
the database is required to remain in the same state (from the point
of view of the client) until the transaction is committed. Therefore any
When I try to execute this:
result = foldl (+) 0 [1..10]
main = putStr $show (result `mod` 10)
Hugs gives: ERROR: Garbage collection fails to reclaim sufficient space
GHC gives: Stack space overflow: current size 262152 bytes.
Why would this have an error? The list should be constructed