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
Alistair
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.
If you can make a reproducible test case of the unexpected behaviour please
dons:
> dons:
> > mdanish:
> > > Hello,
> > >
> > > I've been playing with the INTEST problem on SPOJ which demonstrates
> > > the ability to write a program which processes large quantities of
> > > input data. http://www.spoj.pl/problems/INTEST/
> >
> > > But when I make a slight modificatio
clawsie:
> i recently saw a (yet-another) benchark comparing various languages:
>
> http://www.timestretch.com/FractalBenchmark.html
>
> while no haskell example was listed, i thought i would try a naive
> implementation myself for comparison. it is available here:
>
> http://www.b7j0c.org/dev/h
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 still the wiki
dons:
> mdanish:
> > Hello,
> >
> > I've been playing with the INTEST problem on SPOJ which demonstrates
> > the ability to write a program which processes large quantities of
> > input data. http://www.spoj.pl/problems/INTEST/
>
> > But when I make a slight modification, the program chews up
mdanish:
> Hello,
>
> I've been playing with the INTEST problem on SPOJ which demonstrates
> the ability to write a program which processes large quantities of
> input data. http://www.spoj.pl/problems/INTEST/
> But when I make a slight modification, the program chews up a ton more memory
> an
On 6/7/07, Ruben Zilibowitz <[EMAIL PROTECTED]> wrote:
Hi,
Thanks for the reply. The Lines.hs example program seems to work just
right. Unfortunately I still can't get colored lines to work in my 3d
program.
Maybe it has something to do with the fact my one is 3d and
the example program is in
Hi,
Thanks for the reply. The Lines.hs example program seems to work just
right. Unfortunately I still can't get colored lines to work in my 3d
program. Maybe it has something to do with the fact my one is 3d and
the example program is in 2d. Any other ideas? I would post some
source code
i recently saw a (yet-another) benchark comparing various languages:
http://www.timestretch.com/FractalBenchmark.html
while no haskell example was listed, i thought i would try a naive
implementation myself for comparison. it is available here:
http://www.b7j0c.org/dev/haskell/misc/time.hs
my t
Justin Bailey wrote:
On 6/7/07, Grzegorz <[EMAIL PROTECTED]> wrote:
All this hard work for something that in a lesser language would be the
unimpressive: universe["Milky Way"]["Sun"] ;-P
Well, if you want to get picky there is the '!' operator defined in
Data.Map:
universe ! "Milky Way" !
On 6/7/07, Grzegorz <[EMAIL PROTECTED]> wrote:
All this hard work for something that in a lesser language would be the
unimpressive: universe["Milky Way"]["Sun"] ;-P
Well, if you want to get picky there is the '!' operator defined in Data.Map:
import Data.Map
universe :: Map String (Map
Grzegorz wrote:
> apfelmus quantentunnel.de> writes:
>
> [ .. lengthy discussion and implementation .. ]
>
>> As an example, we have
>>
>> Just "Earth" == lookup (at "Milky Way" at "Sun") universe
>>
>> assuming that
>>
>> universe :: Data.Map String (Data.Map String String)
>
> All this h
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 kind issue going on here. If m is a
Monoid I'm not sure what m a means. Looks like
Hey, I've solved the problem. To unify static and dynamic types I
didn't have to introduce FType m a. Rather I had to do the 'matches'
function a member of Typed class.
class Typed a where
typ :: m a -> Type m
matches :: m a -> Type m -> Maybe (m a)
with a trivial implementation
Hello everybody!
(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, like in
calc
Is there a standard class that looks something like this:
class (Monoid m) => MonoidBreak m where
mbreak::a->m a->(m a,m a)
and it should follow some law like:
m == uncurry mappend $ mbreak x m
-Alex-
___
Haskell-Cafe mailing list
Haskell-Ca
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)
>
> a :: FSet Double
> a _ = 0
fails with
> All of the type variables in the constraint `Show a' are already in sco
Hi
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 will obviously help)
Edit
Does anyone have any sample Haskell code they'd like to share for
doing things like creating a waveform from a list of samples or a
mathematical function and playing them using these libraries (or
indeed any easy to install on MacOS X Haskell library)?
--
Dan
__
On 6/6/07, Ruben Zilibowitz <[EMAIL PROTECTED]> wrote:
If anyone knows how to get HOpenGL to draw coloured lines, I'd like...
See
http://cvs.haskell.org/cgi-bin/cvsweb.cgi/~checkout~/fptools/libraries/GLUT/examples/RedBook/Lines.hs
Note the color line which in this example uses white.
For de
I think that using an existing back end of an optimizing compiler such
as GHC is more promising than targetting Java, C# or other
imperative/OO language. GHC already does a lot of work to achieve a
good performance. So, if you generate Java code, you'd have to do a
lot of work to get good perfo
Hello folks
Haskell is considered good for embedded DSLs. I'm trying to implement
some simple EDSL in a typeful manner and having a problem with looking
up variable values.
I've got an Expression GADT, which admits variables. The problem is
with writing compute function which will lookup variabl
Neil Mitchell wrote:
Hi Andrew,
I just tried to install Gtk2hs and got an error message to the effect
that it cannot be installed since I have GHC 6.6.1, which isn't 6.6
or 6.4.
Anybody know how to fix this? Am I being dumb?
Are you running Windows or Linux? If Linux, where did you get you
Hi Andrew,
I just tried to install Gtk2hs and got an error message to the effect
that it cannot be installed since I have GHC 6.6.1, which isn't 6.6 or 6.4.
Anybody know how to fix this? Am I being dumb?
Are you running Windows or Linux? If Linux, where did you get your package from?
After a
Hi
Help. I need support for a technical argument: why going to an intermediate
form for an existing functional back end like Haskell really, truly is
better for implementing a functional language than is going to an
intermediate form like the Java intermediate form and re-doing all the
various
apfelmus quantentunnel.de> writes:
[ .. lengthy discussion and implementation .. ]
> As an example, we have
>
> Just "Earth" == lookup (at "Milky Way" at "Sun") universe
>
> assuming that
>
> universe :: Data.Map String (Data.Map String String)
All this hard work for something that in a
Erm... wuh?
I just tried to install Gtk2hs and got an error message to the effect
that it cannot be installed since I have GHC 6.6.1, which isn't 6.6 or 6.4.
Anybody know how to fix this? Am I being dumb?
Thanks.
Andrew.
___
Haskell-Cafe mailing li
Gentlefolk:
Help. I need support for a technical argument: why going to an intermediate
form for an existing functional back end like Haskell really, truly is
better for implementing a functional language than is going to an
intermediate form like the Java intermediate form and re-doing all t
On Jun 6, 2007, at 11:38 PM, Daniel McAllansmith wrote:
[Trying to find the domain of a bounded integer linear program]
How would you go about finding extreme vertices? Would it be
quicker than
solving the constraints for each max/min?
If you're just looking to find bounding coordinates i
It's been a while, but I believe that you can solve integer programming
problems of this type using Groebner bases.
(Google for "integer programming with Groebner bases").
I have some Groebner basis code in Haskell at
http://www.polyomino.f2s.com/david/haskell/commalg.html
__
31 matches
Mail list logo