Small syntax question
 
            Hi, I can do this: (let a=3 in a) + (let b=4 in b) but not this: (a where a=3) + (b where b=3) Why? Thanks, Maurício
 
            Mauricio, The let variant is an expression, while the where one is not. An expression is allowed to happen inside a greater expression, you just need to place the parentheres properly as you did. The where keyword does not construct a valid expression, it can only happen inside some other constructs (like module and function declarations). Cheers, Thiago Arrais
 
            By the way, you can find the syntax specification here http://haskell.org/onlinereport/syntax-iso.html Regards, Thiago Arrais -- Mergulhando no Caos - http://thiagoarrais.blogspot.com Pensamentos, idéias e devaneios sobre desenvolvimento de software e tecnologia em geral
 
            Jeroen Fokker has made Haskell syntax diagrams, which are part of lecture notes for first-year students. Maybe they are helpful to others too, Doaitse http://abaris.zoo.cs.uu.nl:8080/wiki/pub/FP/CourseLiterature/ haskellsyntax-main.pdf On Jul 11, 2006, at 4:30 PM, Thiago Arrais wrote:
By the way, you can find the syntax specification here
http://haskell.org/onlinereport/syntax-iso.html
Regards,
Thiago Arrais -- Mergulhando no Caos - http://thiagoarrais.blogspot.com Pensamentos, idéias e devaneios sobre desenvolvimento de software e tecnologia em geral _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
 
            That's very good for us begginers. It would be great if this could be in the main Haskell site. Doaitse Swierstra wrote:
Jeroen Fokker has made Haskell syntax diagrams, which are part of lecture notes for first-year students. Maybe they are helpful to others too,
Doaitse
http://abaris.zoo.cs.uu.nl:8080/wiki/pub/FP/CourseLiterature/haskellsyntax-m...
On Jul 11, 2006, at 4:30 PM, Thiago Arrais wrote:
By the way, you can find the syntax specification here
http://haskell.org/onlinereport/syntax-iso.html
Regards,
Thiago Arrais --Mergulhando no Caos - http://thiagoarrais.blogspot.com Pensamentos, idéias e devaneios sobre desenvolvimento de software e tecnologia em geral _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
 
            Hello Maurício, Tuesday, July 11, 2006, 5:34:58 PM, you wrote:
Hi,
I can do this:
(let a=3 in a) + (let b=4 in b)
but not this:
(a where a=3) + (b where b=3)
Why?
'where' is a part of function definition syntax, while 'let .. in ..' is just an expression like 'if ...' or '(...)'. -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com
participants (5)
- 
                 Bulat Ziganshin Bulat Ziganshin
- 
                 David House David House
- 
                 Doaitse Swierstra Doaitse Swierstra
- 
                 Maurício Maurício
- 
                 Thiago Arrais Thiago Arrais
