I think the error message tell you how to fix:
use -XNoMonomorphismRestriction
One approach is add following line into top of your hs file and it works for me.
{-# LANGUAGE NoMonomorphismRestriction #-}
Regarding the deeper reason, I think you would be able to find via GHC
user guide and
Test set not found!
On Thu, Mar 15, 2012 at 12:59 PM, Haisheng Wu fre...@gmail.com wrote:
Hi there,
Do you have any comments / suggestions for the following scenario?
I have two list and a function over list
testdata :: [Int]
testdata2 :: [Int]
f testdata = map g testdata
What I
Hi there,
Do you have any comments / suggestions for the following scenario?
I have two list and a function over list
testdata :: [Int]
testdata2 :: [Int]
f testdata = map g testdata
What I like to do is choosing what test data via command line arguments.
i.e. test.hs testdata2 will
Though the problem I'd ask is not quiet related to haskell, I
hope talent people here could provide some suggestions.
The problem is not just solve the Hangman problem but solve it in sort of
AI way.
General idea is :
1. Randomly pick words, e.g. 20 from a predefined word list file. (
original imperative algorithm with the right
variable names? You're using a 'd' array that's not been defined.
2012/2/5 Haisheng Wu fre...@gmail.com
a = [1,1,1,1]
b = [0,1,2,3]
d = [0,0,0,0]
for i in b:
for j in c:
if (i+j)3:
d[i+j] += a[i]
My just work implementation
*d = [sum $ map (a !!) [i | i - b, j - c, i + j 3, i + j == dIndex] |
dIndex - [0..3]] *
This is cool.
-Simon
On Sun, Feb 5, 2012 at 5:07 PM, L Corbijn aspergesoe...@gmail.com wrote:
On Sun, Feb 5, 2012 at 7:28 AM, Haisheng Wu fre...@gmail.com wrote:
a = [1,1,1,1]
b = [0,1,2,3]
d
Sorry there is a mistake in the problem description.
Here it is in Python:
a = [1,1,1,1] b = [0,1,2,3] c = [0,2] d = [0,0,0,0]
for i in b:
for j in c:
if (i+j)3:
d[i+j] += a[i]
-Haisheng
On Sun, Feb 5, 2012 at 2:28 PM, Haisheng Wu fre...@gmail.com wrote
a = [1,1,1,1]
b = [0,1,2,3]
d = [0,0,0,0]
for i in b:
for j in c:
if (i+j)3:
d[i+j] += a[i]
My just work implementation in Haskell
http://hpaste.org/57452
Another people implementation in Haskell with Monad and it turns out
complex and very imperatively.
http://hpaste.org/57358
Do
Turns out that those guys doing start-up with Haskell are already expert at
Haskell.
Hence choosing Haskell is more straightforward.
I'm thinking of using Haskell since it looks cool and beautiful.
However I have little experience and will move slowly at certain begging
period.
This sounds not
, 2011 at 10:49 PM, Daniel Fischer
daniel.is.fisc...@googlemail.com wrote:
On Saturday 19 November 2011, 09:09:50, Haisheng Wu wrote:
Hello,
I got great performance difference for the following code if I used
type `Int` rather than `Data.Word.Word32`.
Anyone can help to explain why
, Sep 4, 2011 at 2:02 PM, Michael Snoyman mich...@snoyman.com wrote:
On Sun, Sep 4, 2011 at 8:46 AM, Haisheng Wu fre...@gmail.com wrote:
Hello guys,
I googled for a real open source CMS application in Haskell but have no
luck.
So I'm wondering if Haskell is used very little in Web
Hello guys,
I googled for a real open source CMS application in Haskell but have no
luck.
So I'm wondering if Haskell is used very little in Web development area.
Thanks.
-Simon
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Dear Haskellers,
I'm a master student major of computer science and trying to find any
topics for my master thesis.
My mentor suggest me to find any topic I'm interested in.
Therefore I'm thinking whether there are some topics related to FP and
Haskell.
Especially use such technology to
Hello,
I'm trying to use Yesod oAuth plugin to a SNS site which is very similar
to Twitter.
I add oAuth into the authPlugin and I'm able to see the auth URL at login
page.
I click the URL and it forwards me to a page ask me input that SNS site
account.
I fill in my account then the
14 matches
Mail list logo