« first day (5 days earlier)      last day (375 days later) » 

12:17 AM
@RMartinhoFernandes I thought that was recently removed?
 
I didn't know GHC already had that removed.
 
Okay so more precisely it seems that Haskell 2010 disallows that. Check the language conformance settings?
 
I don't really need it.
 
I can't say I'm surprised.
 
I do need the simplest way to write a list comprehension only with functions and no special syntax.
[ x : y | y <- f blah, x <- [1..8], pred blah]
> In the first versions of Haskell, the comprehension syntax was available for all monads. (...) Later the comprehension syntax was restricted to lists.
:(
Would allow crazy things.
 
 
2 hours later…
2:32 AM
Hello, i need some help:
rule5 b = if(countThings "1" b <= 2)

countThings :: Char->BitString->Int
countThings x (y:ys)
|x==y = 1+(countThings x ys)
|otherwise = countThings x ys
this gives me a "parse error on input 'countThings'
 
 
2 hours later…
4:31 AM
Mwahahahahaha!
0
A: Solve the eight queens problem at compile-time

Martinho FernandesI came up with a solution that uses the Haskell type system. I googled a bit for an existing solution to the problem at the value level, changed it a bit, and then lifted it to the type level. It took a lot of reinventing. I also had to enable a bunch of GHC extensions. First, since integers are...

 
 
11 hours later…
3:11 PM
would anyone be able to help me with a "Parse error"?
 
On that code snippet from 4AM?
 
yes
please
 
Did you indent it properly?
 
yes (i believe)
i just tried with more indents... same error.
 
Oh, you're missing half of the if expression in that rule5.
 
3:15 PM
i do not understand
 
It must be if condition then if_true else if_false.
Possibly with then/else indented, I can't remember.
 
oh ya. you need all of them
let me give it a try, thanks alot
Perfect!! you are correct. I was stuck there for hours!
 
 
2 hours later…
5:39 PM
@Specialk An if without an else doesn't make sense in a pure language.
 

« first day (5 days earlier)      last day (375 days later) »