Matthew Sackman wrote:
Andres Loeh [EMAIL PROTECTED] wrote:
class OneStep a
data OS a :: *
instance OneStep (Cons v t)
data OS (Cons v t) = t
class TwoStep a
data TS a :: *
instance (OneStep a, OneStep b) = TwoStep a
instance (OneStep a, OneStep (OS a)) = TwoStep a
?
Doesn't
On 5-jun-2007, at 10:58, Michael T. Richter wrote:
I've given up on getting a decent text editor for editing Haskell
(specifically literate Haskell -- plain Haskell works fine in
GEDIT). Instead I fire up VIM and get ... a total mess. At first
I think maybe I've screwed up a whole bunch
Donald Bruce Stewart wrote:
Some things to remember using Doubles:
* {-# OPTIONS -fexcess-precision #-}
* -fvia-C
* -fbang-patterns
* -optc-O2 -optc-mfpmath=sse -optc-msse2
* -optc-march=pentium4
1. What do all those things do?
2. Is the effect actually that large?
Felipe Almeida Lessa wrote:
(Sorry if this is a newbie question, couldn't find the answer anywhere)
Suppose I have an expensive function (such that even to be reduced to WHNF
it takes a long processing time)
expensive :: Foo - Maybe Bar
and I want to calculate it on multiple processors,
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew Coppin
Donald Bruce Stewart wrote:
Some things to remember using Doubles:
* {-# OPTIONS -fexcess-precision #-}
* -fvia-C
* -fbang-patterns
* -optc-O2 -optc-mfpmath=sse -optc-msse2
* -optc-march=pentium4
1. What
andrewcoppin:
Donald Bruce Stewart wrote:
Some things to remember using Doubles:
* {-# OPTIONS -fexcess-precision #-}
* -fvia-C
* -fbang-patterns
* -optc-O2 -optc-mfpmath=sse -optc-msse2
* -optc-march=pentium4
1. What do all those things do?
Check the GHC
Hi,
Thanks. I eventually figured it out by doing pretty much what you
suggested with Lines.hs. I discovered that the thing that made lines
come out only in black was:
lighting $= Enabled
So disabling lighting before drawing lines and re-enabling it
afterwards allows me to draw colored
Daniil Elovkov wrote:
I wanted to add a couple of words that another solution would be to
add an option to xargs in target.mk
xargs -n NNN
where NNN is less than the OS limit.
(That helped me to build LambdaVM on windows, there are quite a lot of
class files there, and no SPLITOBJS
[mailto:[EMAIL PROTECTED] On Behalf Of Donald
Bruce Stewart
3) -fbang-patterns
Better than `seq`
Better in the more convenient to write sense, right? AFAIUI, seq and
bang patterns should be equivalent.
Alistair
*
Simon,
You're right, both versions should give the same code. Which version of GHC
are you using? Both with the HEAD and with 6.6.1 I get the nice unboxed code
with the `seq` version too. My test program is below.
I'm using 6.6, so I'll upgrade to 6.6.1 and retest. Preusmably you're
only
Alistair_Bayley:
[mailto:[EMAIL PROTECTED] On Behalf Of Donald
Bruce Stewart
3) -fbang-patterns
Better than `seq`
Better in the more convenient to write sense, right? AFAIUI, seq and
bang patterns should be equivalent.
Yes, in the 'more convenient' sense. Adding strictness
Jason Dagit wrote:
On 5/22/07, Robin Green [EMAIL PROTECTED] wrote:
On Tue, 22 May 2007 15:05:48 +0100
Duncan Coutts [EMAIL PROTECTED] wrote:
On Tue, 2007-05-22 at 14:40 +0100, Claus Reinke wrote:
so the situation for mailing lists and online docs seems to have
improved, but there is
Bayley, Alistair wrote:
[mailto:[EMAIL PROTECTED]] On Behalf Of Andrew Coppin
Donald Bruce Stewart wrote:
Some things to remember using Doubles:
* {-# OPTIONS -fexcess-precision #-}
* -fvia-C
* -fbang-patterns
* -optc-O2 -optc-mfpmath=sse -optc-msse2
On Friday 08 June 2007 01:19:02 Jason Dagit wrote:
Did you remember to do all the double buffering operations? Did you
setup the clear color first? One thing that you have to be careful
about with OpenGL is that you correctly manage the state of the opengl
machine. Haskell should have a
Hola Emilio!
On 6/7/07, Emilio Jesús Gallego Arias [EMAIL PROTECTED] wrote:
Hello,
I'm wondering why you can write
data FSet a = Show a = M (a - Double)
a :: FSet Double
a = M $ \x - 0
and it works, but
type FSet a = Show a = (a - Double)
type only works for redefinitions (i.e.
Hello Donald,
Friday, June 8, 2007, 5:42:41 AM, you wrote:
Previous experience[1] indicates it is pretty hard to write a C line
parsing program[2] that that run this fast. And the code, with comments:
[2] uses gets() function while your haskell code read whole buffer
each time. that is the
On 6/8/07, Simon Marlow [EMAIL PROTECTED] wrote:
The problem occurs when you've found the Nothing, but the rest of the list has
already been sparked. You really want to throw away all those sparks, but
there's no way to do that currently. One way you could improve the situation
though is to
Hello,
Is it safe to use killThread to terminate a thread that has already
terminated(it's IO action has run to completion)? Or are ThreadIds
reused, potentially causing an unwanted thread to be terminated?
I'm using ghc 6.6
Thanks,
bit
___
Hi Alfonso!
Alfonso Acosta [EMAIL PROTECTED] writes:
type FSet a = Show a = (a - Double)
type only works for redefinitions (i.e. adding the |Show a| constraint
makes FSet a different type to (a - Double)).
Yes, I know.
What I mean, if type is a type macro, why cannot it expand type
Following up on haskell-cafe:
Hi Chris,
For the last few years I've been working on a pattern-match checker
for Haskell, named Catch. I'm now happy to make a release:
I would love to use this with regex-tdfa (and the other regex-* modules).
At the moment regex-tdfa is uses a few extensions
3) -fbang-patterns
Better than `seq`
Do you mean more convenient than or generates better code than. I don't
think the latter should be true; send a counterexample if you find one!
Simon
___
Haskell-Cafe mailing list
Ok how about this class:
class (Monoid m) = MonoidBreak m where
mbreak::m-m-m
And the condition is
mappend (mbreak y z) y == z
-Alex-
Dan Piponi wrote:
On 6/7/07, Alex Jacobson [EMAIL PROTECTED] wrote:
Is there a standard class that looks something like this:
class (Monoid m) =
Hello all,
I have this class which gives a common interface to (UniqueIndex a k)
and (MultiIndex a k) :
class (Show a, Key_ k) = Index_ i a k | i - k, k - a where
buildKey :: (a - k)
insertIndex :: Id - a - i - Maybe i
deleteIndex :: Id - a - i - i
updateIndex :: Id - a - a - i -
Felipe Almeida Lessa wrote:
On 6/8/07, Simon Marlow [EMAIL PROTECTED] wrote:
The problem occurs when you've found the Nothing, but the rest of the
list has
already been sparked. You really want to throw away all those sparks,
but
there's no way to do that currently. One way you could improve
Hello all,
It seems this message was lost somehow, so i'm trying to send it again
sorry if it comes up twice on the list !
I have this class which gives a common interface to (UniqueIndex a k)
and (MultiIndex a k) :
class (Show a, Key_ k) = Index_ i a k | i - k, k - a where
buildKey
On 6/8/07, Bulat Ziganshin [EMAIL PROTECTED] wrote:
I second that. I particularly like the elimination of ]'s. We certainly
need some symbol to separate the map and the key; but we do really need
to also mark here be the end of the key?
and how (arr ! key ++ data) should be parsed? :)
Does anybody know what the magical LaTeX command is to turn (say) ++
into two overprinted pluses? (As seems to be fashionable...)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Phlex schrieb:
I have this class which gives a common interface to (UniqueIndex a k)
and (MultiIndex a k) :
I do not understand this
class (Show a, Key_ k) = Index_ i a k | i - k, k - a where
buildKey :: (a - k)
this method buildKey is not sufficient to derive the type i in an
You can define
\newcommand{\pp}{+ \hspace{-0.2cm} +}
On 6/8/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Does anybody know what the magical LaTeX command is to turn (say) ++
into two overprinted pluses? (As seems to be fashionable...)
___
On Fri, Jun 08, 2007 at 05:23:23PM +0200, Phlex wrote:
But i don't seem to find a way to get out of this DbIndex type to
actually work on the enclosed index.
for instance, this doesn't work:
liftDbIndex (DbIndex index) fun = DbIndex (fun index)
The compiler probably can't infer
Hi again,
On 6/8/07, Emilio Jesús Gallego Arias [EMAIL PROTECTED] wrote:
I guess this is due to types like
type A a = Show a = a
type B a = Show a = a
You're right. This is not valid in the standard nor GHC.
so if you do
f :: A a - B b
it should get translated to
f :: (Show a = a) -
On 6/8/07, Alfonso Acosta [EMAIL PROTECTED] wrote:
Yep, you're right. a is alredy universally quantified in the RHS. This
is probably what you're looking for:
type FSet a = forall a. Show a = FSet (a - Double)
I meant
type FSet a = forall a. Show a = (a - Double)
On 6/8/07, Andrés Sicard Ramírez [EMAIL PROTECTED] wrote:
You can define
\newcommand{\pp}{+ \hspace{-0.2cm} +}
Why 0.2cm? Wouldn't that depend on the font size? using ems as the
hspace size sounds more reasonable.
___
Haskell-Cafe mailing list
Sorry for digging up such an old thread, but my undergraduate
dissertation is on this topic so I couldn't resist. :)
(Some credit in the following goes to my supervisor, Ulrich Berger.)
Mark Engelberg wrote:
I'd like to write a memoization utility. Ideally, it would look
something like
Hi again
So, I keep trying to implement the dsl, I mentioned yesterday. I ran
into a problem which can be illustrated by the following small
example.
class Cl s1 a1 s2 a2 where
clF :: a1 - a2
clF doesn't mention s1 and s2, they're used only to restrict types below
data T s a where
C
On Jun 8, 2007, at 16:25 , Emilio Jesús Gallego Arias wrote:
Yeah, in general Haskell types don't carry constraints, however, I
don't
see the reason that this doesn't work when using type level macros, as
type F a = C a = a
should just be a macro and substitute.
It is. That's the
On 08/06/07, Peter Berry [EMAIL PROTECTED] wrote:
You could generate F and the Memoizable instance using TH or DrIFT or
the like (allowing derivation would be really nice :). Actually F
could be considered a dependent type, so you could define a pretty
much universal instance using TH with that
On Fri, Jun 08, 2007 at 07:24:09AM -0700, Alex Jacobson wrote:
Dan Piponi wrote:
On 6/7/07, Alex Jacobson [EMAIL PROTECTED] wrote:
Is there a standard class that looks something like this:
class (Monoid m) = MonoidBreak m where
mbreak::a-m a-(m a,m a)
I think you have some kind of
On 6/8/07, Alfonso Acosta [EMAIL PROTECTED] wrote:
\newcommand{\pp}{+ \hspace{-0.2cm} +}
Why 0.2cm? Wouldn't that depend on the font size?
You are right. It depends on the font size.
using ems as the
hspace size sounds more reasonable.
Yes, we can define \pp in this way, or we can
On Fri, Jun 08, 2007 at 07:49:20PM +0200, Tomasz Zielonka wrote:
On Fri, Jun 08, 2007 at 05:23:23PM +0200, Phlex wrote:
But i don't seem to find a way to get out of this DbIndex type to
actually work on the enclosed index.
for instance, this doesn't work:
liftDbIndex (DbIndex index)
40 matches
Mail list logo