Hi cafe,
For a while now, I've been wondering why the 'let' keyword in a do block
isn't optional. So instead of
do ...
let x = exp1
y = exp2
z - exp3
...
you could simply write
do ...
x = exp1
y = exp2
z - exp3
...
Where each sequence of let-less bindings is put
2012/8/8 Martijn Schrage mart...@oblomov.com:
Hi cafe,
For a while now, I've been wondering why the 'let' keyword in a do block
isn't optional. So instead of
do ...
let x = exp1
y = exp2
z - exp3
...
you could simply write
do ...
x = exp1
y = exp2
z - exp3
Vo Minh Thu not...@gmail.com wrote:
This is not a parsing problem, but a scoping one: try to run this
program:
main = do
let x = y
y = 5
let a = b
let b = 6
print (x, y, a, b)
Cheers,
Thu
Martijn has actually covered this question:
Where each sequence of let-less
On 08-08-12 17:27, Ertugrul Söylemez wrote:
Vo Minh Thu not...@gmail.com wrote:
This is not a parsing problem, but a scoping one: try to run this
program:
main = do
let x = y
y = 5
let a = b
let b = 6
print (x, y, a, b)
Cheers,
Thu
Martijn has actually covered this
-- Forwarded message --
From: David Feuer david.fe...@gmail.com
Date: Wed, Aug 8, 2012 at 12:22 PM
Subject: Re: [Haskell-cafe] 'let' keyword optional in do notation?
To: Martijn Schrage mart...@oblomov.com
Changing scoping rules based on whether things are right next to each
Gast [1] describes a 3 level hierarchy of Haskell objects using elementOf from set theory:value *elementOf* type *elementOf* classQuestionIf we include super-classes would the following be an appropriate mathematical representation?value *elementOf* type *elementOf* class *subSet*
On Wed, Aug 08, 2012 at 12:22:39PM -0400, David Feuer wrote:
Changing scoping rules based on whether things are right next to each
other? No thanks.
Would expanding each let-less binding to a separate let feel more
sound to you?
Cheers,
Simon
___
Patrick Browne patrick.bro...@dit.ie wrote:
Gast [1] describes a 3 level hierarchy of Haskell objects using
elementOf from set theory:
value *elementOf* type *elementOf* class
This hierarchy is pretty arbitrary and quickly runs into problems with
some type system extensions. You can
On 08-08-12 19:01, Simon Hengel wrote:
On Wed, Aug 08, 2012 at 12:22:39PM -0400, David Feuer wrote:
Changing scoping rules based on whether things are right next to each
other? No thanks.
Would expanding each let-less binding to a separate let feel more
sound to you?
That was actually my
On 08/08/12, Ertugrul Söylemez e...@ertes.de wrote: If we include super-classes would the following be an appropriate mathematical representation?What is a superclass? What are the semantics?I assume that like a normal class a super-class *defines* a set operations for types, but it is not *a
Is it really so bad to use an explicit let when you need mutually recursive
bindings?
On Aug 8, 2012 1:51 PM, Martijn Schrage mart...@oblomov.com wrote:
On 08-08-12 19:01, Simon Hengel wrote:
On Wed, Aug 08, 2012 at 12:22:39PM -0400, David Feuer wrote:
Changing scoping rules based on
Patrick Browne patrick.bro...@dit.ie wrote:
If we include super-classes would the following be an appropriate
mathematical representation?
What is a superclass? What are the semantics?
I assume that like a normal class a super-class *defines* a set
operations for types, but it is
I am trying to create a parsec parser that parses an integer and then
checks if that integer has the right size. If not, it generates an
error.
I tried the following:
8---
import Text.Parsec
import Text.Parsec.String
integer :: Parser
On 08/08/12, Ertugrul Söylemez e...@ertes.de wrote:So you basically just mean class (Functor f) = Applicative fYes, but I want to know if there is a simple mathematical relation between the classes and/or their typesBut from your emails the original hierarchy seems to have been superseded,
I found a similar question asked in June 2009 on the haskell-beginners
archives, titled Clearing Parsec error messages. A hack that was proposed
(http://www.haskell.org/pipermail/beginners/2009-June/001809.html) was to
insert a dummy character into the stream, consume it, and then fail. Still,
Hi all,
There have been rumors that recent versions of GHC may allow foreign
imports of objects that link against gmp without interfering with the
gmp imports in integer-gmp. What is the current state of that issue?
What is the currently recommended way to deal with that problem?
Thanks,
Lars
You need to build GHC using the integer-simple library (instead of the
'integer-gmp' library). From the 6.12.1 release notes:
It is now possible to build GHC with a simple, BSD-licensed Haskell
implementation of Integer, instead of the implementation on top of
GMP. To do so, set INTEGER_LIBRARY
On 8/8/12 2:55 PM, Thomas DuBuisson wrote:
You need to build GHC using the integer-simple library (instead of the
'integer-gmp' library). From the 6.12.1 release notes:
It is now possible to build GHC with a simple, BSD-licensed Haskell
implementation of Integer, instead of the
On Wed, Aug 8, 2012 at 3:24 PM, Lars Kuhtz hask...@kuhtz.eu wrote:
On 8/8/12 2:55 PM, Thomas DuBuisson wrote:
You need to build GHC using the integer-simple library (instead of the
'integer-gmp' library). From the 6.12.1 release notes:
It is now possible to build GHC with a simple,
On 8/8/12 3:36 PM, Patrick Browne wrote:
On 08/08/12, *Ertugrul Söylemez *e...@ertes.de wrote:
So you basically just mean
class (Functor f) = Applicative f
Yes, but I want to know if there is a simple mathematical relation between the
classes and/or their types
Let us introduce
On 9/08/2012, at 11:11 AM, wren ng thornton wrote:
Notably, a type class instantiated with all its arguments is not itself a
type!
All the comparisons of Haskell typeclasses with Java classes answered
in one brief lucid sentence.
___
Welcome to issue 239 of the HWN, an issue covering crowd-sourced bits
of information about Haskell from around the web. This issue covers the
week of July 29 to August 4, 2012.
Quotes of the Week
* romm: i thought i knew programming. this is like discovering a new
continent.
*
Inserting a character into the stream can be expensive if for example
the stream is a ByteString.
I tried the following crazy solution and it seems that it works:
succeed :: Parser ()
succeed = mkPT $ \st -
return $ Consumed $ return $ Ok () st $ unknownError st
succeed is a parser that
On Wed, 8 Aug 2012, Ertugrul S??ylemez e...@ertes.de wrote:
Patrick Browne patrick.bro...@dit.ie wrote:
Gast [1] describes a 3 level hierarchy of Haskell objects using
elementOf from set theory:
value?? *elementOf*?? type?? *elementOf*?? class
This hierarchy is pretty arbitrary and
On Wed, Aug 8, 2012 at 8:26 PM, silly silly8...@gmail.com wrote:
Inserting a character into the stream can be expensive if for example
the stream is a ByteString.
I tried the following crazy solution and it seems that it works:
succeed :: Parser ()
succeed = mkPT $ \st -
return $
So I was thinking about a mutable array of tuples, but to avoid allocating
tuples to modify their fields, I guess I really want an immutable array of
tuples of STRefs. Just how much less efficient is this than a plain mutable
array? might it even make sense to use parallel mutable arrays? The
26 matches
Mail list logo