I've tried it out and it looks good so far. I had to fiddle with
haskell-src-ext's .cabal file to get it to install with GHC 6.10,
which is surprising since it isn't listed as a broken package... ah
well.
I'm able to write code like this now:
> foo x = [$vec|sin x, myFunc x, 4*5|]
Since Haskell
Daniel Fischer <[EMAIL PROTECTED]> wrote:
> Am Montag, 27. Oktober 2008 13:34 schrieb Achim Schneider:
> > >
> > > Who does such horrible things?
> > > Repeat after me: 1 is NOT a prime. Never, under no circumstances.
> >
> > Then chase it out of your prime factor products. You'd be the first
> >
On Mon, Oct 27, 2008 at 3:23 PM, Thomas Schilling
<[EMAIL PROTECTED]> wrote:
> Not at the moment. I was thinking about abstracting out the finder,
> which might be useful for other things, too. Can you maybe describe
> your actual goal? Adding an import "foo/bar" would not parse, so you
> must h
On Tue, Oct 28, 2008 at 2:23 PM, Don Stewart <[EMAIL PROTECTED]> wrote:
> reiner.pope:
>>Hi,
>>
>>Is there a way to use GHCi with code which is cabal-buildable but not "ghc
>>--make"-able? The emacs haskell-mode makes a pretty good guess by :cd-ing
>>into the directory with the .ca
On 28 Oct 2008, at 3:51 pm, Derek Elkins wrote:
Some variation on a module then:
http://en.wikipedia.org/wiki/Module_(mathematics)
When you have M acting on X and X is an abelian group:
M is a field => vector space
M is a ring => module
M is a semiring => module over a semiring
M is
On 2008-10-27, Bart Massey <[EMAIL PROTECTED]> wrote:
> Peter Gavin gmail.com> writes:
>> The reason for doing it this way is that e.g. 2.5 is
>> exactly between 2 and 3, and rounding *up* every time
>> would cause an uneven bias toward 3. To counteract that
>> effect, rounding to the nearest eve
By the way, T, feel free to lean on me if you run into any problems.
I did something along the lines of what you were describing some time
ago, my particular non-linear transform being converting a vertex
array to/from polar coordinates and updating in realtime.
-- Jeff
On Tue, Oct 28, 2008 at 12
On Mon, Oct 27, 2008 at 11:04 PM, Don Stewart <[EMAIL PROTECTED]> wrote:
> It depends on the operations (safe indexing or unsafe indexing).
> Being strict or unboxed doesn't determine the safety.
OK, that makes sense.
This is a huge load off my conscience. I can now dig into Real World
Haskell w
Peter Gavin gmail.com> writes:
> The reason for doing it this way is that e.g. 2.5 is
> exactly between 2 and 3, and rounding *up* every time
> would cause an uneven bias toward 3. To counteract that
> effect, rounding to the nearest even integer is used,
> which causes the half of the x.5 values
On Tue, 2008-10-28 at 15:43 +1300, Richard O'Keefe wrote:
> On 28 Oct 2008, at 2:54 pm, Derek Elkins wrote:
>
> > On Tue, 2008-10-28 at 13:54 +1300, Richard O'Keefe wrote:
> >> Is there a special name for an operator monoid where the
> >> structure that's acted on is an Abelian group?
> >
> > This
reiner.pope:
>Hi,
>
>Is there a way to use GHCi with code which is cabal-buildable but not "ghc
>--make"-able? The emacs haskell-mode makes a pretty good guess by :cd-ing
>into the directory with the .cabal file; however, if there is a different
>source-dir this doesn't work s
t.r.willingham:
> On Mon, Oct 27, 2008 at 10:07 PM, Don Stewart <[EMAIL PROTECTED]> wrote:
> >
> > Seems fine. You'll be working at a low level, with strict, mutable,
> > unboxed data structures, but that's fine: the machine loves them.
> >
>
> Thanks for the quick reply. One last question -- is
On Mon, Oct 27, 2008 at 10:07 PM, Don Stewart <[EMAIL PROTECTED]> wrote:
>
> Seems fine. You'll be working at a low level, with strict, mutable,
> unboxed data structures, but that's fine: the machine loves them.
>
Thanks for the quick reply. One last question -- is it at all
possible to segfault
On Mon, Oct 27, 2008 at 07:24:31PM -0700, Jason Dagit wrote:
> I would like to find out if any darcs users who build from the source
> are still using ghc 6.6?
>
> If you are such a user, please let me know.
Yep. OpenBSD is still at ghc-6.6.
Ciao,
Kili
--
Trust your brain, not the mach
On Tue, 2008-10-28 at 15:43 +1300, Richard O'Keefe wrote:
> On 28 Oct 2008, at 2:54 pm, Derek Elkins wrote:
>
> > On Tue, 2008-10-28 at 13:54 +1300, Richard O'Keefe wrote:
> >> Is there a special name for an operator monoid where the
> >> structure that's acted on is an Abelian group?
> >
> > This
On 28 Oct 2008, at 2:54 pm, Derek Elkins wrote:
On Tue, 2008-10-28 at 13:54 +1300, Richard O'Keefe wrote:
Is there a special name for an operator monoid where the
structure that's acted on is an Abelian group?
This should just be equivalent to a ring, maybe without
distributivity.
Maybe m
Hi all,
I'm trying to get HOC to build because I'd like to take Yi for a spin and
see how it works. I followed the instructions in the Yi README, but I can't
get HOC to build. It seems like HOC is under pretty heavy development right
now, so maybe this is something transient. I didn't build libffi
Hello,
I would like to find out if any darcs users who build from the source
are still using ghc 6.6?
If you are such a user, please let me know.
Thanks,
Jason
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listin
t.r.willingham:
>As my first Haskell exposure, I've been working through Real World
>Haskell.
>
>I am considering converting some of my C++ graphics libraries to
>Haskell. I've done a fair amount of googling on the subject, however
>I haven't quite been able to find clear answ
As my first Haskell exposure, I've been working through Real World
Haskell.
I am considering converting some of my C++ graphics libraries to
Haskell. I've done a fair amount of googling on the subject, however
I haven't quite been able to find clear answers to some of following
issues.
(1) Using
On 28 Oct 2008, at 11:11 am, Henning Thielemann wrote:
In measured data the .5-case should be very rare - a "null set"?
However I assume that .5 happens more often in practice - because of
prior rounding,
Think about money.
When I was a child, farthings (1/4 of a penny) had just been
dropped
On Tue, 2008-10-28 at 13:54 +1300, Richard O'Keefe wrote:
> Is there a special name for an operator monoid where the
> structure that's acted on is an Abelian group?
This should just be equivalent to a ring, maybe without distributivity.
Maybe missing some other properties depending on what you me
On 27 Oct 2008, at 11:00 pm, Henning Thielemann wrote:
On Mon, 27 Oct 2008, L.Guo wrote:
I think this is unresonable. then try it in GHC 6.8.3.
Prelude> round 3.5
4
Prelude> round 2.5
2
Is there any explanation about that ?
It's the definition we learnt in school ...
Check
http://en
G'day all.
Henning Thielemann suggested:
In measured data the .5-case should be very rare - a "null set"?
However I assume that .5 happens more often in practice - because of
prior rounding, which was shown to be bad practice in this thread.
The usual case in floating point is usually not
G'day all.
Quoting Daniel Fischer <[EMAIL PROTECTED]>:
Who does such horrible things?
Repeat after me: 1 is NOT a prime. Never, under no circumstances.
The definition of "prime" is well-understood standard terminology, but
that doesn't escape the fact that it's arbitrary and human-defined.
I
G'day all.
Quoting "Mitchell, Neil" <[EMAIL PROTECTED]>:
With rounding to the nearest even integer for 0.5's you get 6, otherwise
if you always round up you get 7. If you bias towards rounding up you
get a general upwards trend as numbers are rounded, which is bad, while
the even condition ensu
Is there a special name for an operator monoid where the
structure that's acted on is an Abelian group?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I think this is a bug in Haddock related to template-haskell
declarations. It will hopefully be fixed soon, but I'm afraid it won't
part of the 2.3.0 version that will come with GHC 6.10.1.
David
2008/10/27 Leonidas Fegaras <[EMAIL PROTECTED]>:
>
> Sorry for the previous message. I am sending it
Sorry for the previous message. I am sending it again.
Dear fellow haskell programmers,
I tried to install a package in hackageDB and got a strange error from
haddock:
haddock: internal Haddock or GHC error: Maybe.fromJust: Nothing
Hello Rodney,
Tuesday, October 28, 2008, 1:27:26 AM, you wrote:
> Now I define an IORef and a couple of counters that share
> the IORef,
>> iio :: IO (IORef Int)
>> iio = newIORef 0
>> ic1 = do { io <- iio ; count io 0 }
>> ic2 = do { io <- iio ; count io 0 }
> So apparently my mental picture
Not at the moment. I was thinking about abstracting out the finder,
which might be useful for other things, too. Can you maybe describe
your actual goal? Adding an import "foo/bar" would not parse, so you
must have some kind of preprocessing going on, so you might be able to
insert some dummy im
What the ..? Is that some sort of a virus?
On 28 Oct 2008, at 01:05, Fegaras, Leonidas wrote:
You have received a secure message
Read your secure message by opening the attachment, securedoc.html.
You will be prompted to open (view) the file or save (download) it
to your computer. For bes
On Mon, 27 Oct 2008, Janis Voigtlaender wrote:
Lennart Augustsson wrote:
I can't remember the method being called anything.
It was just what we were being taught. With the obvious explanation
that .5 is right in the middle so always going one way would introduce
a bias. This was circa 1969.
On Mon, 27 Oct 2008, Ketil Malde wrote:
Of course, Haskell should discard the rather tasteless IEEE754 crud,
and do its calculations on infinite streams of digits. Then, rounding
upwards after 'take'ing a sufficient amount of decimals will be the
right thing to do.
When I implemented just th
Please, oh please, get it into GHC Head! You'll be my hero.
Regards,
John A. De Goes
N-BRAIN, Inc.
http://www.n-brain.net
[n minds are better than n-1]
On Oct 27, 2008, at 3:02 PM, Brian Alliet wrote:
On Mon, Oct 27, 2008 at 10:58:11AM +, Simon Peyton-Jones wrote:
Is there an interest i
On Mon, Oct 27, 2008 at 12:02 PM, Brian Alliet <[EMAIL PROTECTED]> wrote:
> On Mon, Oct 27, 2008 at 10:58:11AM +, Simon Peyton-Jones wrote:
> > Is there an interest in hosting GHC on the JVM (besides my own).
>
> Yep. I wrote a JVM backend for GHC (LambdaVM). It is suffering from
> bit-rot tho
On Mon, Oct 27, 2008 at 3:27 AM, Thomas Schilling
<[EMAIL PROTECTED]> wrote:
> I'm not quite sure what you are trying to do. But for what it's
> worth, you can load a specific file via
>
> setTarget [Target (TargetFile "foo/blah.hs") True Nothing]
right, but I cant do that from inside a module i
On Mon, Oct 27, 2008 at 10:58:11AM +, Simon Peyton-Jones wrote:
> Is there an interest in hosting GHC on the JVM (besides my own).
Yep. I wrote a JVM backend for GHC (LambdaVM). It is suffering from
bit-rot though. I think this thread has re-spaked my interest in it
though.
> I don't think it
On Mon, Oct 27, 2008 at 4:49 PM, brad clawsie <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> i have a small program i have been using routinely that has stopped
> working. the last alteration of my install configuration was to upgrade
> the haskell-feed package as
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
i have a small program i have been using routinely that has stopped
working. the last alteration of my install configuration was to upgrade
the haskell-feed package as arch linux recommended. here is the error i
get:
- -
$ runghc newspage.hs
GHC
L.Guo wrote:
Hi all:
I just read about definitions of Prelude [1], and noticing that.
In 6.4.6 Coercions and Component Extraction, it discribes like this:
"round x returns the nearest integer to x, the even integer if x is equidistant
between two integers."
I think this is unresonable. th
It's well known from numerical analysis that you can achieve the best
general behavior by rounding to even in "half" the cases, and rounding
to odd in "half" the cases. It's usually deterministic by looking at
the digit to the right of the round point.
Regards,
John A. De Goes
N-BRAIN, I
Ketil Malde wrote:
Of course, Haskell should discard the rather tasteless IEEE754 crud,
and do its calculations on infinite streams of digits. Then, rounding
upwards after 'take'ing a sufficient amount of decimals will be the
right thing to do.
Except arbitrary-precision real arithmetic is not
>>> 2.4x -> x
>> That's supposed to be 2.4x -> 2, of course.
> Ah, damn it. I was hoping for a long discussion on just what math
> would look like with rounding like that ;-)
I think it has a name... "modulo" maybe?
Stefan
___
Haskell-Cafe m
This behaviour is not what I expect after reading the description at
http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:round
. Given that this behaviour has caused a bit of confusion I think a
change to the documention might be in order.
The authority here is the report whic
Ketil Malde wrote:
Janis Voigtlaender <[EMAIL PROTECTED]> writes:
Since just about every floating point operation involves some sort of
loss of precision, repeated rounding is a fact of life.
Of course. But that was not the point of the discussion...
Well, allow me to contribute to kee
Janis Voigtlaender <[EMAIL PROTECTED]> writes:
>> Since just about every floating point operation involves some sort of
>> loss of precision, repeated rounding is a fact of life.
> Of course. But that was not the point of the discussion...
Well, allow me to contribute to keeping the discussion
Hello David,
> I tried to use HXT's readDocument with its tagsoup option for my
> application. I couldn't find a way to construct the operation that
> didn't run out of memory. I'll attach some code using HaXml's
> saxParse so you can see what I want. Is that easy to do in HXT?
> I simply
On 2008 Oct 27, at 6:00, Henning Thielemann wrote:
On Mon, 27 Oct 2008, L.Guo wrote:
I think this is unresonable. then try it in GHC 6.8.3.
Prelude> round 3.5
4
Prelude> round 2.5
2
Is there any explanation about that ?
It's the definition we learnt in school ...
Maybe you did; I learned "
[1] The Haskell 98 Report: Predefined Types and Classes
http://haskell.org/onlinereport/basic.html
This behaviour is not what I expect after reading the description at
http://haskell.org/ghc/docs/latest/html/libraries/base/
Prelude.html#v:round
. Given that this behaviour has caused a bit o
On Mon, Oct 27, 2008 at 1:37 PM, Lennart Augustsson
<[EMAIL PROTECTED]> wrote:
> I can't remember the method being called anything.
> It was just what we were being taught. With the obvious explanation
> that .5 is right in the middle so always going one way would introduce
> a bias. This was cir
On Mon, Oct 27, 2008 at 9:48 AM, L.Guo <[EMAIL PROTECTED]> wrote:
> Hi all:
>
>
> I just read about definitions of Prelude [1], and noticing that.
>
> In 6.4.6 Coercions and Component Extraction, it discribes like this:
>
>
> "round x returns the nearest integer to x, the even integer if x is
> eq
Lennart Augustsson wrote:
I can't remember the method being called anything.
It was just what we were being taught. With the obvious explanation
that .5 is right in the middle so always going one way would introduce
a bias. This was circa 1969.
Well, I wasn't serious about the "political" exp
I can't remember the method being called anything.
It was just what we were being taught. With the obvious explanation
that .5 is right in the middle so always going one way would introduce
a bias. This was circa 1969.
On Mon, Oct 27, 2008 at 3:30 PM, Janis Voigtlaender
<[EMAIL PROTECTED]> wrot
Lennart Augustsson wrote:
It is certainly what I learnt in school. But that was another school.
Hmm, on reflection, taking Neil's explanation into account and the fact
that this rounding mode was referred to as "banker's rounding", the
point may be that it was not only another school, but anot
But you shouldn't use the "common round function", you should use the
Haskell round function.
That's the one that is mathematically better and has hardware support.
On Mon, Oct 27, 2008 at 2:05 PM, L.Guo <[EMAIL PROTECTED]> wrote:
> Thank you all for instructions.
>
> I am not the same education r
It is certainly what I learnt in school. But that was another school.
On Mon, Oct 27, 2008 at 12:15 PM, Janis Voigtlaender
<[EMAIL PROTECTED]> wrote:
> Henning Thielemann wrote:
>>
>> On Mon, 27 Oct 2008, L.Guo wrote:
>>
>>> I think this is unresonable. then try it in GHC 6.8.3.
>>>
>>>
>>> Prelu
Am Montag, 27. Oktober 2008 13:34 schrieb Achim Schneider:
> >
> > Who does such horrible things?
> > Repeat after me: 1 is NOT a prime. Never, under no circumstances.
>
> Then chase it out of your prime factor products. You'd be the first one
> to break a monoid and locate unsafeCalculate#.
Huh?
2008/10/27 Janis Voigtlaender <[EMAIL PROTECTED]>:
> Janis Voigtlaender wrote:
>
>> 2.4x -> x
>
> That's supposed to be 2.4x -> 2, of course.
Ah, damn it. I was hoping for a long discussion on just what math
would look like with rounding like that ;-)
/M
--
Magnus Therning
"Felipe Lessa" <[EMAIL PROTECTED]> wrote:
> On Mon, Oct 27, 2008 at 10:20 AM, Achim Schneider <[EMAIL PROTECTED]>
> wrote:
> > Hmmm... I'm wondering whether there's a standard C way to set the
> > rounding direction.
>
> nearbyint() and rint() may be used, and the rounding mode can be set
> by fe
Daniel Fischer <[EMAIL PROTECTED]> wrote:
> Am Montag, 27. Oktober 2008 12:35 schrieb Achim Schneider:
> > Daniel Fischer <[EMAIL PROTECTED]> wrote:
> > > Am Montag, 27. Oktober 2008 11:46 schrieb Henning Thielemann:
> > > > I also know a didact which tells teachers that 1 has no prime
> > > > dec
On Mon, Oct 27, 2008 at 10:20 AM, Achim Schneider <[EMAIL PROTECTED]> wrote:
> Hmmm... I'm wondering whether there's a standard C way to set the
> rounding direction.
nearbyint() and rint() may be used, and the rounding mode can be set
by fesetround(). IIRC, this is C99.
--
Felipe.
_
Henning Thielemann <[EMAIL PROTECTED]> wrote:
>
> On Mon, 27 Oct 2008, L.Guo wrote:
>
> > And then, in haskell, is that means, I have to use 'floor . (.5+)'
> > instead of 'round' to get the common round function ?
>
> That's certainly the best to do.
>
Hmmm... I'm wondering whether there's a
On Mon, 27 Oct 2008, L.Guo wrote:
And then, in haskell, is that means, I have to use 'floor . (.5+)'
instead of 'round' to get the common round function ?
That's certainly the best to do.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http:/
Thank you all for instructions.
I am not the same education route with you, so i just heard round-to-even for
the very first time.
Now I understand why it exists in theory.
And then, in haskell, is that means, I have to use 'floor . (.5+)' instead of
'round' to get the common round function ?
Am Montag, 27. Oktober 2008 12:35 schrieb Achim Schneider:
> Daniel Fischer <[EMAIL PROTECTED]> wrote:
> > Am Montag, 27. Oktober 2008 11:46 schrieb Henning Thielemann:
> > > I also know a didact which tells teachers that 1 has no prime
> > > decomposition. Oh, I see, she may have copied that from
Ketil Malde wrote:
Janis Voigtlaender <[EMAIL PROTECTED]> writes:
If you round to odd instead of round to even, then 4.5 rounds to 5,
Well, of course I did not learn to round to odd. I learned to round .5
to above, but not to do repeated rounding.
Since just about every floating point o
Daniel Fischer <[EMAIL PROTECTED]> wrote:
> Am Montag, 27. Oktober 2008 11:46 schrieb Henning Thielemann:
>
> > I also know a didact which tells teachers that 1 has no prime
> > decomposition. Oh, I see, she may have copied that from Wikipedia:
> > http://en.wikipedia.org/wiki/Prime_factorisat
On Mon, 27 Oct 2008, Daniel Fischer wrote:
Am Montag, 27. Oktober 2008 11:46 schrieb Henning Thielemann:
On Mon, 27 Oct 2008, Janis Voigtlaender wrote:
Henning Thielemann wrote:
I think one reason is that repeated rounding should not be worse than
rounding in one go. Consider the rule 'use c
Am Montag, 27. Oktober 2008 11:46 schrieb Henning Thielemann:
> On Mon, 27 Oct 2008, Janis Voigtlaender wrote:
> > Henning Thielemann wrote:
> >> I think one reason is that repeated rounding should not be worse than
> >> rounding in one go. Consider the rule 'use ceiling when the first
> >> removed
Janis Voigtlaender <[EMAIL PROTECTED]> writes:
>> If you round to odd instead of round to even, then 4.5 rounds to 5,
> Well, of course I did not learn to round to odd. I learned to round .5
> to above, but not to do repeated rounding.
Since just about every floating point operation involves som
"L.Guo" <[EMAIL PROTECTED]> wrote:
> "round x returns the nearest integer to x, the even integer if x is
> equidistant between two integers."
>
>
> Is there any explanation about that ?
>
Yes. math.h, rint() and IEEE.
The Right Way(tm) to round is rounding every other n.5 into a different
dire
Is there an interest in hosting GHC on the JVM (besides my own).
There's interest but my understanding is that the GHC backend architecture is
not at all friendly to work with. That said, I hear in the next release (I
think 6.12, not the 6.10 that's in beta) will have a redesigned backend
arc
"Felipe Lessa" <[EMAIL PROTECTED]> wrote:
> On Mon, Oct 27, 2008 at 6:47 AM, Achim Schneider <[EMAIL PROTECTED]>
> wrote:
> > Don't you slam pointless style!
>
> main = mapM_ (($ [1..10^8::Int]) . (.) (putStrLn . show)) [last, head]
>
> =)
>
Hmmm... Template Haskell... repetitive code... defici
On Mon, 27 Oct 2008, Janis Voigtlaender wrote:
Henning Thielemann wrote:
I think one reason is that repeated rounding should not be worse than
rounding in one go. Consider the rule 'use ceiling when the first removed
digit is 5'. Then
0.45 - (round to one place) -> 0.5 - (round to integer)
Felipe Lessa wrote:
On Mon, Oct 27, 2008 at 8:30 AM, Janis Voigtlaender
<[EMAIL PROTECTED]> wrote:
Well, of course I did not learn to round to odd. I learned to round .5
to above, but not to do repeated rounding.
Nobody rounds in passes, of course =).
Oh, Mrs. "I forgot her name" actually
Henning Thielemann wrote:
I think one reason is that repeated rounding should not be worse than
rounding in one go. Consider the rule 'use ceiling when the first
removed digit is 5'. Then
0.45 - (round to one place) -> 0.5 - (round to integer) -> 1
But repeated rounding *is* worse than round
On Mon, Oct 27, 2008 at 8:30 AM, Janis Voigtlaender
<[EMAIL PROTECTED]> wrote:
> Well, of course I did not learn to round to odd. I learned to round .5
> to above, but not to do repeated rounding.
Nobody rounds in passes, of course =). I was talking about two
successive rounds.
> In fact, by your
Janis Voigtlaender wrote:
2.4x -> x
That's supposed to be 2.4x -> 2, of course.
--
Dr. Janis Voigtlaender
http://wwwtcs.inf.tu-dresden.de/~voigt/
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/
Felipe Lessa wrote:
On Mon, Oct 27, 2008 at 8:15 AM, Janis Voigtlaender
<[EMAIL PROTECTED]> wrote:
That is of course true (and was the topic of heated discussion with my
fourth grade math teacher), but does not explain 2.5 -> 2.
If you round to odd instead of round to even, then 4.5 rounds t
(Janis, sorry for e-mailiing just for you on the first time.)
On Mon, Oct 27, 2008 at 8:15 AM, Janis Voigtlaender
<[EMAIL PROTECTED]> wrote:
> That is of course true (and was the topic of heated discussion with my
> fourth grade math teacher), but does not explain 2.5 -> 2.
If you round to odd in
I'm not quite sure what you are trying to do. But for what it's
worth, you can load a specific file via
setTarget [Target (TargetFile "foo/blah.hs") True Nothing]
see http://code.haskell.org/~nominolo/html/ghc/GHC.html#v%3AsetTargets
Here're GHC's current haddocks (for HEAD):
http://code.h
On Mon, 27 Oct 2008, Janis Voigtlaender wrote:
Henning Thielemann wrote:
On Mon, 27 Oct 2008, L.Guo wrote:
I think this is unresonable. then try it in GHC 6.8.3.
Prelude> round 3.5
4
Prelude> round 2.5
2
Is there any explanation about that ?
It's the definition we learnt in school ..
Henning Thielemann wrote:
On Mon, 27 Oct 2008, L.Guo wrote:
I think this is unresonable. then try it in GHC 6.8.3.
Prelude> round 3.5
4
Prelude> round 2.5
2
Is there any explanation about that ?
It's the definition we learnt in school ...
Hmm, Henning, this is strange. The two of us w
On Sun, 26 Oct 2008, Galchin, Vasili wrote:
Hi Henning,
I am rereading my emails and I don't believe I got an examples of
"instance Lattice". E.g. instance Lattice Bool. ??
Did you look into the Lattice module?
Bool with respect to && and ||
Sets with respect to union and intersection (a
Hi,
That is a fairly standard implementation of rounding for financial
institutions. Consider
sum . map round
Over the list [3.5,2.5]
With rounding to the nearest even integer for 0.5's you get 6, otherwise
if you always round up you get 7. If you bias towards rounding up you
get a general upwa
On Mon, 27 Oct 2008, L.Guo wrote:
I think this is unresonable. then try it in GHC 6.8.3.
Prelude> round 3.5
4
Prelude> round 2.5
2
Is there any explanation about that ?
It's the definition we learnt in school ...
I think one reason is that repeated rounding should not be worse than
roun
Hi all:
I just read about definitions of Prelude [1], and noticing that.
In 6.4.6 Coercions and Component Extraction, it discribes like this:
"round x returns the nearest integer to x, the even integer if x is equidistant
between two integers."
I think this is unresonable. then try it in GH
On Mon, Oct 27, 2008 at 6:47 AM, Achim Schneider <[EMAIL PROTECTED]> wrote:
> Don't you slam pointless style!
main = mapM_ (($ [1..10^8::Int]) . (.) (putStrLn . show)) [last, head]
=)
--
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
h
Bulat Ziganshin <[EMAIL PROTECTED]> wrote:
> Hello Albert,
>
> Saturday, October 25, 2008, 9:02:14 PM, you wrote:
>
> > u = (putStrLn . show . last $ list) >> (putStrLn . show . head $
> > list) where list = [1..10^8::Int]
>
> i prefer to write it as
>
> main = do let list = [1..10^8]
>
90 matches
Mail list logo