On Dec 23, 2007 1:44 PM, Isaac Dupree [EMAIL PROTECTED] wrote:
parseHeader3 :: BS.ByteString - Maybe (Int, Int)
parseHeader3 bs = do
(x, rest) - BS.readInt $ BS.dropWhile (not . isDigit) bs
(y, _) - BS.readInt $ BS.dropWhile (not . isDigit) rest
return (x, y)
But that version still
Hi
Are CAF's specified in the Haskell report? I couldn't find them mentioned.
CAF is a term of art. If you define
fred = 2 + 2
that's a CAF.
I should have been more precise with my question. Given the code:
fred = 2 + 2
bob = fred + fred
In a Haskell implementation fred would be
On Wed, 26 Dec 2007 17:16:22 +0200, Neil Mitchell [EMAIL PROTECTED]
wrote:
Hi,
Are CAF's specified in the Haskell report? I couldn't find them
mentioned.
If not, why do all Haskell compilers support them? Is there some paper
which persuaded everyone they were a good idea, or some
Neil Mitchell [EMAIL PROTECTED] writes:
Hi,
Are CAF's specified in the Haskell report? I couldn't find them mentioned.
CAF is a term of art. If you define
fred = 2 + 2
that's a CAF.
If not, why do all Haskell compilers support them?
How could they not? I'm not sure I understand your
Well I certainly hope the standard defines that both fred and bob will only
be evaluated once, because my programs depend on that :)
Peter
Neil wrote:
fred = 2 + 2
bob = fred + fred
In a Haskell implementation fred would be evaluated once to 4, then
used twice. The 2+2 would only happen
Steve Lihn stevelihn at gmail.com writes:
I do come aross a question while reading the DSL page on Wikipedia.
http://en.wikipedia.org/wiki/Domain-specific_programming_language
In the Disadvantage section (near the end), there is an item -- hard
or impossible to debug. Can anybody explain
Hi Neil,
On Dec 26, 2007 7:16 PM, Neil Mitchell [EMAIL PROTECTED] wrote:
Given the code:
fred = 2 + 2
bob = fred + fred
In a Haskell implementation fred would be evaluated once to 4, then
used twice. The 2+2 would only happen once (ignore defaulting and
overloaded numerics for now).
Is
On 12/26/07, Cristian Baboi [EMAIL PROTECTED] wrote:
The reason I want to build functions of type String - (a - b) is because
I want to see how far I can get with functions are first class citizens
in Haskell. I thought that if I read the function from an external source,
there is no way the
The (extremely enlightening) discussion so far has focused on the
inconsistent (arguably buggy) behavior of [a,b..c] enumeration sugar.
I think it's worth pointing out that the code could also be made to
run by making the drop function strict. I got to thinking, in a
strictness debugging scenario
dbenbenn:
Since it's possible to support laziness for Integer (while still
avoiding any stack overflow), I think it makes sense to do so. What
if you have some big complicated program like the following:
x = some big slow computation
y = [x..]
lots of code
z = length $ take 10 y
On 26 Dec 2007, at 12:30 PM, Peter Verswyvelen wrote:
Well I certainly hope the standard defines that both fred and bob
will only
be evaluated once, because my programs depend on that :)
If your programs depend on lazy evaluation, they can't be Haskell
98. Any complete reduction method
On 12/26/07, Don Stewart [EMAIL PROTECTED] wrote:
Depending on laziness if fine, but depending on undefined strictness semantics
for particular types is more fragile. Whether Int or Bool or whatever
type has a strict or lazy accumulator in enumFromTo is entirely
unspecified -- you can't look
Just curious -- how can this be done in Arrows instead of Manad/T? Or can it?
On Dec 26, 2007 6:42 AM, Benja Fallenstein [EMAIL PROTECTED] wrote:
On Dec 23, 2007 1:44 PM, Isaac Dupree [EMAIL PROTECTED] wrote:
parseHeader3 :: BS.ByteString - Maybe (Int, Int)
parseHeader3 bs = do
(x,
arising from use of `/' at DSLTest.hs:11:14-28
Thanks for the example. I am particularly amazed GHC is complaining at
'/', not '+'. The type mismatch occurs (is reported) at much lower
level. It would be nice if there is a way to bump it up a couple
levels...
On Dec 26, 2007 12:56 PM,
* Steve Lihn wrote:
Thanks for the example. I am particularly amazed GHC is complaining at
'/', not '+'. The type mismatch occurs (is reported) at much lower
level. It would be nice if there is a way to bump it up a couple
levels...
Add type signatures for mu and dont_try_this.
http://en.wikipedia.org/wiki/First-class_object
The term was coined by Christopher Strachey in the context of “functions
as first-class citizens” in the mid-1960's.[1]
Depending on the language, this can imply:
1. being expressible as an anonymous literal value
2. being storable in
16 matches
Mail list logo