I agree. Computation on the type level does not imply computation on the
value level.
On 8/18/07, Tim Chevalier [EMAIL PROTECTED] wrote:
On 8/17/07, Kim-Ee Yeoh [EMAIL PROTECTED] wrote:
Incidentally, GHC's type checker is Turing complete. You
already have as much static evaluation as is
Dan Piponi wrote:
On 8/17/07, Dan Piponi [EMAIL PROTECTED] wrote:
On 8/17/07, Andrew Coppin [EMAIL PROTECTED] wrote:
That sounds completely absurd to me... can anybody explain?
Except...you can switch on ghc's special time travel features...
On reflection I decided my
Justin Bailey:
Would retainer profiling help me see what was building up
this large thunk/closure?
I'm not really familiar enough with GHC's profiling to answer that, but
I'll take a guess.
My guess is that profiling will only sometimes be useful in diagnosing
stack overflows, because I
Andrew Coppin wrote:
Surely all this means is that the magical mdo keyword makes the
compiler arbitrarily reorder the expression...?
It is not magical but simple syntactic sugar. And no, the compiler does
not 'arbitrarily reorder' anything, you do the same in any imperative
language with
On 8/18/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Surely all this means is that the magical mdo keyword makes the
compiler arbitrarily reorder the expression...?
What mdo actually does is described here:
http://www.cse.ogi.edu/PacSoft/projects/rmb/mdo.pdf
My last example desugars to:
test =
Hi all,
Recently I am considering doing part of my job using Haskell.
My duty is writing a network server which talks to another server through a
binary based private protocol.
As the old version of this component is written in C, it's very natural that
this protocol is base on C structure
I'm a little surprised no one's tried a parallel solution yet,
actually.
We've got an SMP runtime for a reason, people!
I hacked up a parallel version of Richard Bird's function pearl solver:
http://www.haskell.org/sitewiki/images/1/12/SudokuWss.hs
It not really optimized, but there are a
As I am a newbie to Haskell, I am not sure how to handle this problem
with less work. Do you have any ideas about this problem?
Thanks in advance!
Have a look at
http://haskell.org/haskellwiki/Applications_and_libraries/Data_structures
section 3 (IO) -
When reading an article about tail recursion
(http://themechanicalbride.blogspot.com/2007/04/haskell-for-c-3-programmers.
html) I came across the follow statements:
If you can write a non-recursive function that uses the colon syntax it is
probably better than a tail recursive one that doesn't.
On Sat, 2007-08-18 at 20:35 +0200, Peter Verswyvelen wrote:
When reading an article about tail recursion
(http://themechanicalbride.blogspot.com/2007/04/haskell-for-c-3-programmers.
html) I came across the follow statements:
If you can write a non-recursive function that uses the colon
I've started a blog series on writing a chess engine in Haskell. I
just posted the second blog entry today:
http://sequence.complete.org/node/361
I suspect there's more work to be done on that function, though. It
seems like there should be a nice way to remove that flip in apply.
Any thoughts?
L.S.,
Now that all hawiki pages have been removed, we have lost some valuable
information. For example The Monad.Reader; on
http://www.haskell.org/haskellwiki/The_Monad.Reader it says:
Older editions can be found on the old Haskell wiki – they haven't been
included here for licensing
Andrew Wagner wrote:
I've started a blog series on writing a chess engine in Haskell. I
just posted the second blog entry today:
http://sequence.complete.org/node/361
I suspect there's more work to be done on that function, though. It
seems like there should be a nice way to remove that flip in
Hi,
I am trying to implement quadratic fields Q(sqrt d). These are numbers of the
form a + b sqrt d, where a and b are rationals, and d is an integer.
In an earlier attempt, I tried
data QF = QF Integer Rational Rational
(see http://www.polyomino.f2s.com/david/haskell/hs/QuadraticField.hs.txt)
Use
value :: a - Integer
On 8/18/07, DavidA [EMAIL PROTECTED] wrote:
Hi,
I am trying to implement quadratic fields Q(sqrt d). These are numbers of
the
form a + b sqrt d, where a and b are rationals, and d is an integer.
In an earlier attempt, I tried
data QF = QF Integer Rational
DavidA wrote:
Hi,
I am trying to implement quadratic fields Q(sqrt d). These are numbers of the
form a + b sqrt d, where a and b are rationals, and d is an integer.
...
class IntegerType a where
value :: Integer
The problem is, this doesn't work. GHC complains:
The class method
foo n = if n0 then [] else n : foo (n-1)
bar n = aux 0 [] where
aux i xs = if in then xs else aux (i+1) (i:xs)
that foo is more efficient than bar because lazy evaluation of foo just puts
the delayed computation in the cdr of the list, while lazy evaluation of
bar has to keep track of
Twan van Laarhoven twanvl at gmail.com writes:
The solution is to use a dummy parameter:
class IntegerType a where
value :: a - Integer
And call it like:
f = value (undefined :: Two)
So for instance:
instance IntegerType d = Show (QF d) where
show (QF a b) = show a ++
On Saturday 18 August 2007 19:05:04 Wouter Swierstra wrote:
I hacked up a parallel version of Richard Bird's function pearl solver:
http://www.haskell.org/sitewiki/images/1/12/SudokuWss.hs
It not really optimized, but there are a few neat tricks there.
Rather than prune the search space by
This isn't really a Haskell question but I'm guessing some Haskell
hackers have a solution. MacOS X's Spotlight doesn't seem to be able
to search for text in .lhs and .hs files. But it can find text in .txt
files. Is there a way of getting Spotlight to treat .lhs and .hs files
like .txt files so I
20 matches
Mail list logo