On Monday 05 September 2011, 08:35:30, Alexander Dunlap wrote:
On 4 September 2011 21:44, Mario Blažević blama...@acanac.net wrote:
I was recently surprised to discover that the maximum and maximumBy
functions always return the *last* maximum, while minimum and
minimumBy return the
On Monday 29 August 2011, 12:32:51, Maciej Marcin Piechotka wrote:
On Fri, 2011-08-26 at 20:30 +0100, Andrew Coppin wrote:
I suppose I could use a binary logarithm. I'm just concerned that it
would be rather slow. After all, I'm not interested in the exact
logarithm (which is fractional),
On Sunday 28 August 2011, 20:43:11, Rene de Visser wrote:
Daniel Fischer daniel.is.fisc...@googlemail.com schrieb im
Newsbeitrag news:201108272331.01371.daniel.is.fisc...@googlemail.com...
On Saturday 27 August 2011, 23:10:17, David Virebayre wrote:
2011/8/27 aditya siram aditya.si
On Monday 29 August 2011, 00:56:52, KC wrote:
I just noticed that the 20x20 grid has some 00 entries; thus, time
could be saved by not touching any of the grid entries 3 cells away.
Same for the 01 entries.
The challenge, of course, is in finding these entries in the first
place. :)
On Saturday 27 August 2011, 02:34:24, Oscar Picasso wrote:
Hi,
I order to improve my Haskell skills I started (again) to solve the
project euler problems with this language.
I am now at problem 11 and would really appreciate any comment about
my code in order to make it more elegant or
to display them.
NoScript :)
I allowed oscarpicasso.com, but didn't look far enough to allow github.com.
On Sat, Aug 27, 2011 at 4:47 AM, Daniel Fischer
daniel.is.fisc...@googlemail.com wrote:
On Saturday 27 August 2011, 02:34:24, Oscar Picasso wrote:
Hi,
I order to improve my Haskell skills I
On Saturday 27 August 2011, 17:31:41, Oscar Picasso wrote:
As a side note, my domain name is not oscarpicasso.com. It was already
taken by someone else so I decided to use opicasso.com
Oh, yeah, it was that I allowed, misremembered the domain name.
On Saturday 27 August 2011, 22:24:03, michael rice wrote:
I'm not sure how to do that. Please demonstrate.
Michael
ghc -O -main-is StateGame --make StateGame
more generally,
ghc -O -main-is Foo.bar --make Foo
if the desired main is function bar in module Foo.
On Saturday 27 August 2011, 23:10:17, David Virebayre wrote:
2011/8/27 aditya siram aditya.si...@gmail.com:
Hi all,
I would like for the GHCI interpreter to save its environment before
reloading a file and allowed the user to revert back to that state if
the compilation was unsuccessful.
On Friday 26 August 2011, 19:24:37, Andrew Coppin wrote:
On 26/08/2011 02:40 AM, Daniel Peebles wrote:
And as Daniel mentioned earlier, it's not at all obvious what we mean
by bits used when it comes to negative numbers.
I guess part of the problem is that the documentation asserts that
Occasionally, the behaviour of decodeFloat and its consequences causes
concern and/or bug reports (e.g.
http://hackage.haskell.org/trac/ghc/ticket/3898).
The main problem is the treatment of NaNs and infinities (that it doesn't
distinguish between 0.0 and -0.0 is a minor thing), which are
On Friday 26 August 2011, 21:30:02, Andrew Coppin wrote:
You wouldn't want to know how many bits you need to store on disk to
reliably recreate the value? Or how many bits of randomness you need to
compute a value less than or equal to this one?
I suppose I could use a binary logarithm.
On Thursday 25 August 2011, 10:39:29, Johan Tibell wrote:
P.S. Could someone please remind me why containers ships with GHC?
Some other packages shipped with GHC depend on containers, e.g. hoopl,
template-haskell, haskeline, binary.
And via haskeline, ghci depends on containers too.
On Thursday 25 August 2011, 19:57:37, Andrew Coppin wrote:
Quoting the Haddock documentation for Data.Bits.bitSize:
Return the number of bits in the type of the argument. The actual value
of the argument is ignored. The function bitSize is undefined for types
that do not have a fixed
On Wednesday 24 August 2011, 14:45:19, Комар Максим wrote:
I have some script:
$ runhaskell readfile.hs
fromList [(Merchant {nick = 01010, location = prontera, x = 184, y
= 94},Shop {buy = ShopBuy {titleB = AB Green Salad=5k, itemsB =
fromList [(Item {itemId = 12065, price = 5000, refine = ,
On Wednesday 24 August 2011, 20:24:14, Armando Blancas wrote:
Studying the paper *A Simple Implementation for Priority Search Queues*,
by Ralf Hinze, I came across the following syntax that I didn't
understand and I couldn't use in GHCi 7.0.3 for defining a binding data
type (page 3):
On Tuesday 23 August 2011, 16:14:43, Qi Qi wrote:
Hello all,
I wanted to have an account on hackageDB to upload a package. I followed
http://hackage.haskell.org/packages/accounts.html, and sent an email to
r...@soi.city.ac.uk for asking an account. It's been a couple days that
I haven't
On Thursday 18 August 2011, 19:13:45, Johan Tibell wrote:
On Thu, Aug 18, 2011 at 7:07 PM, Simon Peyton-Jones
simo...@microsoft.com wrote:
| I shouldn't have to modify PrelNames since I kept GHC.Integer.Type,
| no? Or does PrelNames have to contain the name of the module that
|
On Sunday 14 August 2011, 21:53:21, Iustin Pop wrote:
On Sun, Aug 14, 2011 at 08:32:36PM +0200, Wishnu Prasetya wrote:
On 14-8-2011 20:25, Iustin Pop wrote:
On Sun, Aug 14, 2011 at 08:11:36PM +0200, Wishnu Prasetya wrote:
Hi guys,
I'm new in parallel programming with Haskell. I made a
On Sunday 14 August 2011, 22:42:13, Wishnu Prasetya wrote:
On 14-8-2011 22:17, Daniel Fischer wrote:
We don't know the times for a non-threaded run (or an -N1 run), so it
could be anything from a slowdown to a 4× speedup (but it's likely
to be a speedup by a factor 4×).
Well
On Sunday 14 August 2011, 00:41:33, Mark Spezzano wrote:
Hi Antoine,
The first Int field is a unique index, beginning at 1 and increasing by
1 for each unique Node.
Then you could use that for indexing, assuming the Ord instance matches.
range (MyNode x _ _ _, MyNode y _ _ _) = [x .. y]
On Thursday 11 August 2011, 14:06:21, Artyom Kazak wrote:
GMP has a lot of functions, such as extracting roots, primality test,
Legendre symbol,
I'm writing a package (arithmoi) that will include reasonably fast
implementations of those, but I never find the time to finish it :(
factorial
On Monday 08 August 2011, 18:24:45, Chris Yuen wrote:
Where is the `unsafeAt` function?
Data.Array.Base
I can't seem to find it (
http://haskell.org/hoogle/?hoogle=unsafeat).
Data.Array.Base is not haddocked (there's a reason for that), so hoogle
doesn't know about its functions.
For
On Sunday 07 August 2011, 10:52:20, Max Bolingbroke wrote:
In short I don't see how to get further without changing the algorithm
or doing some hacks like manual unrolling. Maybe someone else has some
ideas?
Well, the C# implementation uses arrays for lookup while the Haskell
version uses
On Friday 29 July 2011, 18:51:23, Chris Dornan wrote:
Hi All,
I am still having difficulty getting a plain GHC build with
INTEGER_LIBRARY = integer-simple. (I outlined my problem here yesterday
http://www.haskell.org/pipermail/glasgow-haskell-users/2011-July/020631
.htm l .)
RHEL 5
On Thursday 28 July 2011, 20:43:30, Paul Reiners wrote:
I have a question about the following GHCi interaction:
Prelude let x = 23
Prelude :show bindings
x :: Integer = _
What is the meaning of the underscore in the third line? Why doesn't it
say this, instead?
x :: Integer = 23
On Friday 08 July 2011, 11:29:40, Ketil Malde wrote:
Max Bolingbroke batterseapo...@hotmail.com writes:
Stack space overflow: current size 8388608 bytes.
Use `+RTS -Ksize -RTS' to increase it.
I want to find out the culprit function and rewrite it
tail-recursively. Is there a way to
On Thursday 07 July 2011, 20:44:57, Matthew Farkas-Dyck wrote:
I am trying to take a profile of a program, but when I run it, the
total time (as given in the profiling report file) is zero!
If you're on a Mac, it could be
http://hackage.haskell.org/trac/ghc/ticket/5282
On Tuesday 05 July 2011, 20:01:26, Tillmann Vogt wrote:
Hi,
For my font library I need A function that can handle ligatures. It can
be explained best with an example:
f [Th, ff, fi, fl, ffi] The fluffiest bunny
should be evaluated to
[Th, e, , fl, u, ffi, e, s, t, , b, u, n,
n,
On Sunday 03 July 2011, 09:19:11, dm-list-haskell-c...@scs.stanford.edu
wrote:
At Sat, 2 Jul 2011 17:23:50 -0400,
Brent Yorgey wrote:
On Sat, Jul 02, 2011 at 09:02:13PM +0200, Daniel Fischer wrote:
- disabling the monomorphism restriction
:set -XNoMonomorphismRestriction
On Sunday 03 July 2011, 21:34:17, Christopher Done wrote:
I just had a quick try with cabal-install and got the below. I'm not
sure where linux/posix_types is supposed to come from. Is this error
obvious to you?
glibc-devel or the equivalent package for your distro, I think.
On Saturday 02 July 2011, 20:23:48, Wonchan Lee wrote:
Hi cafe,
I found some strange phenomenon when I was hanging around with GHCi.
Please see the following interaction:
GHCi, version 7.0.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading
On Wednesday 29 June 2011, 10:22:20, Yitzchak Gale wrote:
Ryan Ingram wrote:
So this is definitely a GHC bug, but I think the problem is probably
triggered by this line:
instance Serializable a b = IResource a
I don't think this is a valid instance declaration without a
On Wednesday 29 June 2011, 11:37:39, Yitzchak Gale wrote:
So it's the derived Read instance in this context that
is causing the problem. Here is a slightly smaller test
case that triggers the bug:
{-# LANGUAGE MultiParamTypeClasses, UndecidableInstances #-}
module Bug where
class A a
On Monday 27 June 2011, 05:52:42, austin seipp wrote:
After doing a 'git pull origin master ./sync-all pull origin
master', I get the following build failure when stage1 attempts to
compile the RTS code:
http://paste.debian.net/121097/
A quick glance at the errors seem to indicate this
On Friday 24 June 2011, 10:26:42, Guy wrote:
What does the ~ type operator mean? I've sometimes seen types such as (a
~ b) in error messages, but can't understand what GHC is trying to tell
me.
Type equality, (a ~ b) means that a and b are the same type (rather, that
the compiler can prove
92dbf9a5b4516d27fc0d389f842e21b4d3df5e5e Mon Sep 17 00:00:00 2001
From: Daniel Fischer daniel.is.fisc...@googlemail.com
Date: Tue, 21 Jun 2011 14:32:13 +0200
Subject: [PATCH 1/7] DatatypeContexts for tcrun006
---
tests/ghc-regress/typecheck/should_run/tcrun006.hs |5 +++--
1 files changed, 3
On Friday 17 June 2011, 17:11:39, Jacques Carette wrote:
I favour Plan A.
+1
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
On Wednesday 15 June 2011, 16:53:37, Antoine Latter wrote:
Does this page help?
http://www.haskell.org/ghc/download_ghc_7_0_3
Take care,
Antoine
I would, however, recommend going for the new
http://www.haskell.org/ghc/download_ghc_7_0_4
which fixes a couple of bugs in 7.0.3
On Tuesday 14 June 2011, 14:35:19, Johannes Waldmann wrote:
Dear all,
I am very puzzled by a program that contains
an else branch that is never executed,
but still seems to slow down the program.
(When I replace it by undefined, the resulting program runs much
faster.)
On Tuesday 14 June 2011, 15:51:57, Daniel Fischer wrote:
On Tuesday 14 June 2011, 14:35:19, Johannes Waldmann wrote:
With id, main1 jumps to foldb_cap, which contains a lot of code for the
(cap 1)-branch, and - that's what causes the slowdown - a worker loop
$s$wfoldlM'_loop_s3EE [Occ
On Monday 13 June 2011, 17:46:23, Grigory Sarnitskiy wrote:
I've noted several times that GHC doesn't evaluate formulas for Double
values during compilation.
That is using
4.2326514735445615 instead of (512 / 0.844)**(1/3)
or
0.906179845938664 instead of (1/3) * sqrt(5 + 2 * sqrt(10 / 7))
On Friday 10 June 2011, 13:49:23, Dmitri O.Kondratiev wrote:
On Thu, Jun 9, 2011 at 11:31 AM, Max Bolingbroke
batterseapo...@hotmail.com
wrote:
If you want plain text serialization, writeFile output.txt . show
and fmap read (readFile output.txt) should suffice...
Max
This code
On Friday 10 June 2011, 14:25:59, Dmitri O.Kondratiev wrote:
Two questions:
1) Why to use 'fmap' at all if a complete file is read in a single line
of text?
Well, it's a matter of taste whether to write
foo - fmap read (readFile bar)
stuffWithFoo
or
text - readFile bar
let
On Friday 10 June 2011, 17:51:34, Dmitri O.Kondratiev wrote:
Configuring cairo-0.12.0...
setup.exe: The program pkg-config version =0.9.0 is required but it
could not be found.
You need the (non-Haskell) programme pkg-config, you should be able to get
it from e.g.
On Thursday 09 June 2011, 18:09:44, Yves Parès wrote:
Is it not:
noLeak :: State Int ()
noLeak = do
a - get
** * let a' = (a + 1)
a' `seq` put a'*
noLeak
??
Alternatively,
noLeak = do
a - get
a `seq` put (a+1)
noLeak
or
noLeak = do
a - get
put $! a+1
On Thursday 09 June 2011, 18:41:40, Alexey Khudyakov wrote:
On 09.06.2011 20:09, Yves Parès wrote:
Is it not:
noLeak :: State Int ()
noLeak = do
a - get
** *let a' = (a + 1)
a' `seq` put a'*
noLeak
??
Indeed. Now I understand. It didn't work for me
On Montag, 6. Juni 2011, 09:45, Patrick Browne wrote:
Are casts required to run the code below?
If so why?
Thanks,
Pat
-- Idetifiers for objects
class (Integral i) = IDs i where
startId :: i
newId :: i - i
newId i = succ i
sameId, notSameId :: i - i - Bool
-- Assertion is not
On Montag, 6. Juni 2011, 11:08, Ryan Ingram wrote:
Hi Pat. There aren't any casts in that code. There are type
annotations, but this is different than the idea of a cast like in C.
For example
((3 :: Integer) :: Int)
is a compile error.
What you are seeing is that 3 has
On Montag, 6. Juni 2011, 19:08, Albert Y. C. Lai wrote:
Bearing in mind that the characters that have been used to begin
end of line comments include *, /, ;, !, #, %, and $, it's not
clear that there's anything _that_ regrettable about -- .
Recall that the problem is not with isolated
On Monday 06 June 2011, 19:51:44, Albert Y. C. Lai wrote:
On 11-06-06 01:34 PM, Daniel Fischer wrote:
On Montag, 6. Juni 2011, 19:08, Albert Y. C. Lai wrote:
Recall that the problem is not with isolated characters, but whole
strings.
-- a is a comment, --a is a comment
On Thursday 02 June 2011 01:12:37, Tom Murphy wrote:
How about this:
myFoldr :: (a - b - b) - b - [a] - b
myFoldr f z xs = foldl' (\s x v - s (x `f` v)) id xs $ z
Cheers,
Ivan
Great! Now I really can say Come on! It's fun! I can write foldr with
foldl!
Unfortunately, you
On Wednesday 01 June 2011 12:25:06, Adrien Haxaire wrote:
On Wed, 01 Jun 2011 11:46:36 +0200, Henning Thielemann wrote:
Really, you can write foldr in terms of foldl? So far I was glad I
could
manage the opposite direction.
i didn't try it, that was just an example of how
On Wednesday 01 June 2011 12:13:54, John Lato wrote:
From: Brandon Moore brandon_m_mo...@yahoo.com
I was worried data sharing might mean your keys
retain entire 64K chunks of the input. However, it
seems enumLines depends on the StringLike ByteString
instance, which just converts
On Wednesday 01 June 2011 12:28:28, John Lato wrote:
There are a few solutions to this. The first is to make a copy of the
bytestring so only the required data is retained. In my experiments
this wasn't helpful, but it would depend on your corpus. The second is
to start with smaller chunks.
On Tuesday 31 May 2011 12:31:36, Simon Marlow wrote:
The ticket has low priority, but if anybody has an idea how to check
whether libbfd depends on libz in the configure script, I'd appreciate
it.
Could you install a shared version of libbfd?
I have one,
$ locate libbfd
On Tuesday 31 May 2011 14:44:58, Simon Marlow wrote:
What you need is libbfd.so, which is a symbolic link to the versioned
library (libbfd-2.20.0.20100122-6.so). This is normally installed by
the development version of the library (e.g. libbfd-dev on
Debian-derived distros).
Couldn't find
On Tuesday 31 May 2011 16:04:28, Simon Marlow wrote:
On 31/05/2011 14:53, Daniel Fischer wrote:
Well, compiling and running a simple test programme that calls
bfd_init() works here without linking in libz, so I guess that test
wouldn't detect the dependency even if it actually runs
On Tuesday 31 May 2011 16:39:19, Donn Cave wrote:
Quoth Daniel Fischer daniel.is.fisc...@googlemail.com,
...
calling bfd_openr alone produces tons of undefined references, I've no
idea what libraries I'd have to link with also :(
Try -lbfd -liberty -lz ?
Donn
Thanks
b7170be4f9d62e695316a70435919cc2769334d1 Mon Sep 17 00:00:00 2001
From: Daniel Fischer daniel.is.fisc...@googlemail.com
Date: Wed, 1 Jun 2011 03:42:11 +0200
Subject: [PATCH] new test for libbfd
---
configure.ac |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index
On Tuesday 31 May 2011 22:35:26, Yves Parès wrote:
He intended to show that, indeed, it is not, or else side-effects would
never be performed
On the other hand, IO is lazy in the values it produces.
Going with the IO a = State RealWorld a fiction, IO is state-strict but
value-lazy. The
So my last testsuite run (validate --slow) with a new HEAD produced 651
unexpected failures :(
Okay, the thing is that I forgot to add EXTRA_HC_OPTS=-optl-lz, see
http://hackage.haskell.org/trac/ghc/ticket/3756
So, unless I miscounted, 611 of those were in way threaded1 due to:
Linking
On Sunday 29 May 2011 19:14:57, Andrew Coppin wrote:
As far as I'm aware, the Haskell Platform doesn't come with any
graphics-related packages
I thought OpenGL was in the platform.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Saturday 28 May 2011 13:47:10, Dmitri O.Kondratiev wrote:
Hello,
I am trying to solve a simple task, but got stuck with double recursion
- for some reason not all list elements get processed.
Please advice on a simple solution, using plane old recursion :)
*** Task:
From a sequence of
On Saturday 28 May 2011 14:19:18, Dmitri O.Kondratiev wrote:
Thanks for simple and beautiful code to get all pairs.
Yet, I need to get to the next step - from all pairs to build all
chains, to get as a result a list of lists:
[[abcde, acde, ade, ae,]
[bcde, bde, be,]
[cde, cd, ce,]
de]]
On Thursday 26 May 2011 10:19:51, Johan Tibell wrote:
On Thu, May 26, 2011 at 9:37 AM, Simon Peyton-Jones
simo...@microsoft.com wrote:
Friends
Thanks to those who responded to the message below, about improving
the process for developing the core Haskell libraries.
On Thursday 26 May 2011 13:24:09, michael rice wrote:
How do I compile and run this parallel program?
Michael
===
import Control.Parallel
nfib :: Int - Int
nfib n | n = 1 = 1
| otherwise = par n1 (seq n2 (n1 + n2 + 1))
The 'seq' here should be a 'pseq'
On Thursday 26 May 2011 14:35:41, Neil Brown wrote:
foo is the function we want to apply, and eg shows how to apply it in
do-notation with an argument on each line. I couldn't manage to remove
the r$ at the beginning of each line, which rather ruins the whole
scheme :-( On the plus side,
On Thursday 26 May 2011 17:22:10, Jonas Almström Duregård wrote:
Unfortunately it does not play nice with $.
Yes.
Also I'm not sure this can be used for defining trees or nested function
application since a nesting of the operator inevitably require
parenthesis.
It can't be nested, like ($)
On Wednesday 18 May 2011 03:57:06 I wrote:
Following
http://hackage.haskell.org/trac/haskell-prime/wiki/Process#Proposals
I hereby volunteer to become the proposal owner.
So, how's this going to continue?
It sparked a renewed go at simplifying the libraries proposal process, but
since it
On Monday 23 May 2011 14:16:43, Jacek Generowicz wrote:
From this, you should be able to build 7.0.3 yourself.
That's interesting. I won't try that *right* now.
It's easy, assuming you have installed alex and happy (and preferably
hscolour), just download and unpack the source bundle,
On Monday 23 May 2011 15:08:41, Jacek Generowicz wrote:
On 2011 May 23, at 14:42, Daniel Fischer wrote:
On Monday 23 May 2011 14:16:43, Jacek Generowicz wrote:
If by cabal install you mean use the command cabal ... yeah, that
would be great, if only I could install cabal-install, which
On Saturday 21 May 2011 14:55:54, Paolo G. Giarrusso wrote:
However, it turns out that
Prelude let id2 :: Int - Int = \x - x
works but there's no way whatsoever to make the following work:
Prelude let (id2 :: forall t. t - t) = \x - x
Works without problems or extensions in the form
Prelude
On Saturday 21 May 2011 16:17:53, Paolo G. Giarrusso wrote:
Moreover, the proposed solution not always works.
Neither of these work:
let f :: x - x; g :: y - y; (f, g) = (id, id)
let f :: x - x; g :: y - y; (f, g) = (f, g)
Requires -XNoMonoPatBinds
On Saturday 21 May 2011 16:17:53, Paolo G. Giarrusso wrote:
As I said, I'm convinced that the argument of let is a pattern, on
which a signature is allowed, and GHC correctly understands that, so
that this declaration work:
let (id :: Int - Int) = \x - x
I don't think that
Prelude let a ::
On Thursday 19 May 2011 20:27:16, Andrew Coppin wrote:
This is basically the reason I asked. Currently Cabal assumes that
Haddock is the only tool of its kind. If somebody built a better
Haddock, you wouldn't be able to use it. (Unless you named the
executable haddock and made it accept
On Thursday 19 May 2011 23:15:06, Andrew Coppin wrote:
On 19/05/2011 10:11 PM, Artyom Kazak wrote:
And I can declare an instance for (x, y) which does NOT implies (Show
x):
instance Show (x, y) where
show _ = I'm tuple! Hooray!
Ah. So it's a feature.
Fortunately I refactored the
On Wednesday 18 May 2011 23:39:47, Andrew Coppin wrote:
On 18/05/2011 05:28 AM, Don Stewart wrote:
I'm intrigued by the idea of Hackage docs that don't use Haddock.
This is basically the reason I asked. Currently Cabal assumes that
Haddock is the only tool of its kind. If somebody built a
On Tuesday 17 May 2011 01:40:41, Gracjan Polak wrote:
Daniel Fischer daniel.is.fischer at googlemail.com writes:
On Monday 16 May 2011 23:41:44, Gracjan Polak wrote:
Thanks Daniel, Yves and Edward for explanation. Two things come to
my mind now.
1. It should be unified
Continuing with today's HEAD's results:
7506 expected passes
235 expected failures
0 unexpected passes
9 unexpected failures
More failures than Friday, with fewer tests run (no profiling).
But what's the actual difference?
We have our old acquaintances
T3064(normal)
On Monday 16 May 2011 11:07:15, Michael Vanier wrote:
Usually in monad tutorials, the = operator for the list monad is
defined as:
m = k = concat (map k m) -- or concatMap k m
but in the GHC sources it's defined as:
m = k = foldr ((++) . k) [] m
As far as I can tell, this
On Monday 16 May 2011 20:49:35, austin seipp wrote:
Looking at the Core for an utterly trivial example (test x = concatMap
k x where k i = [i..i*2]), the foldr definition seems to cause a
little extra optimization rules to fire, but the result seems pretty
big. The definition using concatMap
On Monday 16 May 2011 20:49:35, austin seipp wrote:
As you can see, with the foldr definition, GHC is able to fuse the
iteration of the input list with the generation of the result - note
the 'GHC.Base.++' call with the first argument being a list from
[x..x*2], and the second list to append
On Monday 16 May 2011 22:26:18, I wrote:
On Monday 16 May 2011 20:49:35, austin seipp wrote:
As you can see, with the foldr definition, GHC is able to fuse the
iteration of the input list with the generation of the result - note
the 'GHC.Base.++' call with the first argument being a list
On Monday 16 May 2011 23:05:22, Yves Parès wrote:
Probably because in the instance of Monad Either, fail has not been
overloaded, and still has its default implementation:
fail = error
Right. It used to be different in mtl-1.*, when there was an
instance Error e = Monad (Either e) where
On Monday 16 May 2011 23:41:44, Gracjan Polak wrote:
Thanks Daniel, Yves and Edward for explanation. Two things come to my
mind now.
1. It should be unified.
The (Either e) Monad instance was recently changed after people have long
complained that there shouldn't be an (Error e) constraint.
On Tuesday 17 May 2011 00:22:02, Alexey Khudyakov wrote:
On 16.05.2011 22:51, Casey McCann wrote:
How so? Equality on floating point values other than NaN works just
fine and behaves as expected. It's just that they violate all sorts of
algebraic laws when arithmetic is involved so
On Sunday 15 May 2011 15:32:03, Herbert Valerio Riedel wrote:
On Thu, 2011-05-12 at 19:31 +0200, Daniel Fischer wrote:
Minor nitpick: instead of doing 'sort . nub', please use 'import
qualified Data.Set as S' and do 'S.toAscList . S.fromList'. This
should be a lot faster.
Or `map
On Sunday 15 May 2011 16:35:35, Immanuel Normann wrote:
Hi,
how can I install the base-4.3.1.0 package. I tried first
No. That can't work (at least with GHC). The base package is one of the
packages that the compiler was built with, it is impossible to replace it
and have a working compiler
On Friday 13 May 2011 13:04:14, Guy wrote:
If only 1% of an imported module is used, GHC will link in the entire
module.
With split-objs, as far as I know, GHC only links in what you use (plus the
module initialiser).
split-objs was disabled for some GHC/OS X combinations recently,
On Saturday 14 May 2011 21:06:50, Guy wrote:
On 14/05/2011 21:12, Don Stewart wrote:
When compiled with split objs GHC makes it possible for the linker
to do dead code stripping. Make sure your GHC has split-objs on.
Thank you, I hadn't realised that the imported library could be built
On Friday 13 May 2011 23:41:34, Casey McCann wrote:
On Fri, May 13, 2011 at 4:48 PM, Luke Palmer lrpal...@gmail.com wrote:
On Thu, May 12, 2011 at 5:50 PM, Daniel Fischer
daniel.is.fisc...@googlemail.com wrote:
Prelude Data.List maximum [0,-1,0/0,-5,-6,-3,0/0,-2]
0.0
Prelude
On Saturday 14 May 2011 15:14:31, Ketil Malde wrote:
Daniel Fischer daniel.is.fisc...@googlemail.com writes:
Not having Eq and Ord instances for Double and Float would be
extremely inconvenient (too inconvenient to seriously consider, I
think), so one can a) do what's done now
b) make
On Saturday 14 May 2011 15:55:15, Henning Thielemann wrote:
Chris Smith schrieb:
Sure... see quotRem in the prelude.
http://www.haskell.org/haskellwiki/Haskell_programming_tips#Forget_about
_quot_and_rem
No, don't, just know when you want which.
quot and rem are what you get from the
On Saturday 14 May 2011 19:38:03, KC wrote:
Instead of finding the totient of one number, is there a quicker way
when processing a sequence?
For some sequences.
For [1 .. n] (you asked about [2 .. n], but it may be better to include 1),
it can efficiently be done, O(n*log log n), iirc.
Running the testsuite with today's HEAD (perf build, but without profiling
to keep time bearable) resulted in:
OVERALL SUMMARY for test run started at Do 12. Mai 13:34:13 CEST 2011
2765 total tests, which gave rise to
9300 test cases, of which
0 caused
On Thursday 12 May 2011 17:49:16, Simon Peyton-Jones wrote:
|hpc_markup_multi_001(normal)
|hpc_markup_multi_002(normal)
|hpc_markup_multi_003(normal)
|
| Unexpected passes:
|mc01(hpc,ghci)
|mc06(hpc,ghci)
|mc08(hpc,ghci)
|mc11(hpc)
|mc16(hpc)
|
On Thursday 12 May 2011 19:14:09, Felipe Almeida Lessa wrote:
On Thu, May 12, 2011 at 2:04 PM, Stefan Kersten s...@k-hornz.de wrote:
extractModules = sort . nub . everything (++) ([] `mkQ` f)
where f (NameQ x) = [modString x]
f (NameG _ _ x) = [modString x]
f _ =
On Friday 13 May 2011 01:19:52, Ganesh Sittampalam wrote:
On 12/05/2011 19:41, Nick Bowler wrote:
On 2011-05-12 21:14 +0400, Grigory Sarnitskiy wrote:
I don't want NaN to propagate, it is merely stupid, it should be
terminated.
NaN propagation is not stupid. Frequently, components of
On Wednesday 11 May 2011 09:25:05, Bin Jin wrote:
sorry, it's 15 seconds. It's a typo
It's less for me, something like 5.8s compiled without optimisations, 3.6s
with -O2 (Pentium4, 3.06GHz).
The overwhelming part of that is spent in GC:
MUT time0.69s ( 0.73s elapsed)
GCtime
101 - 200 of 1602 matches
Mail list logo