Hi everybody,
I want to test a higher level language than C/C++ (type inference, garbage
collection), but much faster than Python. So I am naturally led to Haskell or
OCaml.
I have read and tested tutorials for the two languages. For the time being, my
preference goes to Haskell, first
On Sat, Jan 14, 2012 at 18:18, TP paratribulati...@free.fr wrote:
Times expr1 Plus( expr2 expr3 ) -
OCaml pattern syntax is not the same as Haskell pattern syntax. The
correct way to write that pattern is
Times expr1 (Plus expr2 expr3)
This is consistent with Haskell not using
It's an improvement. It's still not pretty, but I guess that's as good as
it's going to get...
Maybe this is an instance of Haskell trying to tell me if you need to write
a 20-line do-block in the middle of your function, you're doing it wrong.
20 lines is a lot, but I have smaller ones all
Is there a specific reason why GHC consistently refuses to accept the
following perfectly reasonable code snippet?
main = do
putStrLn Line 1
putStrLn Line 2
let xs = do
x - [1..10]
y - [1..10]
return (x+y)
print xs
No matter which way I rearrange this, it *insists* that there's
let ...
in ...
I guess GHC is finding where in is.
在 2010年 1月 17日 星期日 18:05:47,Andrew Coppin 寫道:
Is there a specific reason why GHC consistently refuses to accept the
following perfectly reasonable code snippet?
main = do
putStrLn Line 1
putStrLn Line 2
let xs = do
x -
No, but there's a specific reason why GHC consistently refuses to accept
your perfectly unreasonable code snippet :)
GHC accepts the following perfectly reasonable code snippet:
main = do
putStrLn Line 1
putStrLn Line 2
let xs = do x - [1..10]
y - [1..10]
return
Am Sonntag 17 Januar 2010 11:05:47 schrieb Andrew Coppin:
Is there a specific reason why GHC consistently refuses to accept the
following perfectly reasonable code snippet?
Yes, you violated the layout rule.
main = do
putStrLn Line 1
putStrLn Line 2
let xs = do
x - [1..10]
Tony Morris wrote:
No, but there's a specific reason why GHC consistently refuses to accept
your perfectly unreasonable code snippet :)
She sells csh on the sea shore. :-)
GHC accepts the following perfectly reasonable code snippet:
main = do
putStrLn Line 1
putStrLn Line 2
let xs =
Am Sonntag 17 Januar 2010 11:33:45 schrieb Andrew Coppin:
Tony Morris wrote:
No, but there's a specific reason why GHC consistently refuses to
accept your perfectly unreasonable code snippet :)
She sells csh on the sea shore. :-)
GHC accepts the following perfectly reasonable code
On Sun, Jan 17, 2010 at 10:33:45AM +, Andrew Coppin wrote:
Tony Morris wrote:
main = do
putStrLn Line 1
putStrLn Line 2
let xs = do x - [1..10]
y - [1..10]
return (x+y)
print xs
Urg, but that's *ugly*. Is there no way I can reduce the amount of
Daniel Fischer wrote:
Am Sonntag 17 Januar 2010 11:33:45 schrieb Andrew Coppin:
Urg, but that's *ugly*. Is there no way I can reduce the amount of
indentation to something more reasonable?
main = do
putStrLn Line 1
putStrLn Line 2
let xs = do
x - [1..10]
y -
On 17 Jan 2010, at 11:44, Andrew Coppin wrote:
Urg, but that's *ugly*. Is there no way I can reduce the amount of
indentation to something more reasonable?
main = do
putStrLn Line 1
putStrLn Line 2
let xs = do
x - [1..10]
y - [1..10]
return (x+y)
print xs
That
Hi,
I've defined the following datatype with haskell
data Graph a b = Empty | Context a b Graph a b
But I am having the error message: parse error on input `' .
I am wondering what it is wrong with my definition. How can I fix this?
Thanks in advance.
Kind regards
Am Samstag 25 April 2009 19:29:30 schrieb siso dagbovie:
Hi,
I've defined the following datatype with haskell
data Graph a b = Empty | Context a b Graph a b
But I am having the error message: parse error on input `' .
I am wondering what it is wrong with my definition. How can I fix
siso dagbovie wrote:
I've defined the following datatype with haskell
data Graph a b = Empty | Context a b Graph a b
But I am having the error message: parse error on input `' .
I am wondering what it is wrong with my definition. How can I fix this?
Constructors have to start with a
Hi everyone.
I am new to this Forum, Haskell and i am german, so i am sorry for noob
failures or spelling mistakes.
I am currently learning for an informatic exam (11th class) and i tried to
code a function to sum a polynom with a pair of polynoms... (I actually want
to to code a polynomdivision
You neglected a ) - remember to count your parentheses in future when
you get an error directly after a parenthesised expression.
--
Robin
On Thu, 31 May 2007 08:09:23 -0700 (PDT)
Akijmo [EMAIL PROTECTED] wrote:
Hi everyone.
I am new to this Forum, Haskell and i am german, so i am sorry
The second argument of the second line of the definition does not match
the expected type. (Polynom,Polynom) is a tuple, not a list, so
[]::(a,a) is not well typed for any a.
Dan
Akijmo wrote:
Hi everyone.
I am new to this Forum, Haskell and i am german, so i am sorry for noob
failures or
thx much green... this helped for the parser failure.
Dan you were right too, cause now i got the interfering types [(Int,Int)]
and Polynom for line 2.
But i fixed this by replacing it with ([],[])
So thx much guys :D
greenrd wrote:
You neglected a ) - remember to count your parentheses in
Hello!
In the attachment you will find a file, in which I try to access Java from
Haskell using the Java bridge for functional languages.
For details see
http://sourceforge.net/projects/jvm-bridge/
and
http://dapissarenko.com/resources/2005_02_17_eigenvaluesJava/2005_02_17_eigenva
You need { } around the declaration of matrix1. Otherwise the semicolon
at the end of its definition is considered to be part of the 'let':
let { matrix1 = (array ((1,1),(3,3)) [((1,1), 0.0), ((1,2), 0.0),
((1,3),-2.0), ((2,1), 0.0), ((2,2), 7.0), ((2,3), 0.0), ((3,1), 0),
((3,2), 0),
On Thu, 17 Mar 2005 20:42:30 +0100, Dmitri Pissarenko
[EMAIL PROTECTED] wrote:
Hello!
In the attachment you will find a file, in which I try to access Java from
Haskell using the Java bridge for functional languages.
For details see
http://sourceforge.net/projects/jvm-bridge/
and
Hello!
I'm building the haskell-jvm-bridge (http://sourceforge.net/projects/jvm-
bridge/).
The final step of the building procedure is to install the package of haskell-
jvm-bridge.
When I enter ghc-pkg -a -f javavm.ghc-pkg I'm getting the error
javavm.ghc-pkg: parse error in package config
Dmitri Pissarenko [EMAIL PROTECTED] writes:
Hello!
I'm building the haskell-jvm-bridge (http://sourceforge.net/projects/jvm-
bridge/).
The final step of the building procedure is to install the package of haskell-
jvm-bridge.
When I enter ghc-pkg -a -f javavm.ghc-pkg I'm getting the
24 matches
Mail list logo