Re: Haskell Platform Update?

2014-05-31 Thread Daniel Fischer
On Friday 30 May 2014, 23:42:57, Caitlin wrote: Hi all. I was just wondering if an updated release for the Haskell Platform was planned in the neat future? The current schedule lists November of last year as being the time for release candidates.. Thanks, ~Caitlin Yes, the

Re: installing random-1.0.1.1

2014-04-22 Thread Daniel Fischer
On Tuesday 22 April 2014, 22:53:36, Sergei Meshveliani wrote: People, can you, please, explain me how to make the `random' package visible for GHC ? It is visible to GHC, but `cabal install random` installed the package into the user database: and now ghc-pkg list shows

Re: 7.8.1 cabal install of vector package (dependent on primitive package) fails

2014-04-10 Thread Daniel Fischer
On Wednesday 09 April 2014, 23:42:26, Carter Schonwald wrote: i bet you have cabal --version reply with 1.16 1) cabal update 2) cabal install cabal-install 3) rm ~/.cabal/config # old pre 1.18 config should go! 4) cabal update # also probably add ~/.cabal/bin to path There should be a

Re: [Haskell-cafe] Looking for portable Haskell or Haskell like language

2013-04-27 Thread Daniel Fischer
On Saturday 27 April 2013, 19:18:35, Andrew Cowie wrote: On Fri, 2013-04-26 at 21:21 -0800, Christopher Howard wrote: Hi. I've got this work situation where I've got to do all my work on /ancient/ RHEL5 systems, with funky software configurations, and no root privileges. I wanted to install

Re: [Haskell-cafe] Why does not zipWith' exist

2013-02-01 Thread Daniel Fischer
On Friday 01 February 2013, 12:50:18, Andres Löh wrote: Hi Kazu. I'd be surprised if zipWith' yields significant improvements. In the case of foldl', the strictness affects an internal value (the accumulator). However, in the case of zipWith', you're just forcing the result a bit more, but

Re: [Haskell-cafe] Why does not zipWith' exist

2013-02-01 Thread Daniel Fischer
On Friday 01 February 2013, 13:06:09, Daniel Fischer wrote: zipWith' would [I haven't tested, but I'm rather confident] make a difference if you benchmarked bench name (whnf (fibs !!) 10) etc. Well, it took a little bit of persuasion to let GHC not cache the list(s

Re: [Haskell-cafe] Why does not zipWith' exist

2013-02-01 Thread Daniel Fischer
On Friday 01 February 2013, 13:43:59, Andres Löh wrote: Right, I'm not arguing that it's impossible to produce a difference, but I think that if you're defining the sequence of fibs, the most likely scenario might be that you're actually interested in a prefix, Right. If you only want one

Re: [Haskell-cafe] Package conflicts using cabal-dev

2013-01-30 Thread Daniel Fischer
On Wednesday 30 January 2013, 22:29:23, Arnaud Bailly wrote: YakGraph.hs:13:30: Couldn't match expected type `Data.Text.Lazy.Internal.Text' with actual type `text-0.11.2.0:Data.Text.Lazy.Internal.Text' one package (at least) you use - probably graphviz - was compiled with a

Re: [Haskell-cafe] quotRem and divMod

2013-01-29 Thread Daniel Fischer
On Tuesday 29 January 2013, 03:27:41, Artyom Kazak wrote: Hi! I’ve always thought that `quotRem` is faster than `quot` + `rem`, since both `quot` and `rem` are just wrappers that compute both the quotient and the remainder and then just throw one out. However, today I looked into the

Re: [Haskell-cafe] 9.3 - (2 * 4.5) = 0.3000000000000007

2013-01-16 Thread Daniel Fischer
On Wednesday 16 January 2013, 15:25:15, ivan dragolov wrote: 9.3 - (2 * 4.5) = 0.3007 I expected 0.3 ? Prelude Text.FShow.RealFloat FD 9.3 9.300710542735760100185871124267578125 The closest Double to 9.3 is somewhat larger than 9.3. Since the first two significant

Re: [Haskell-cafe] ANN: crypto-pubkey: all your public key crypto algorithms belong to us.

2013-01-14 Thread Daniel Fischer
On Monday 14 January 2013, 12:36:22, Vincent Hanquez wrote: On Sat, Jan 12, 2013 at 02:12:44PM +0100, Ertugrul Söylemez wrote: I've spend some good chunk of time adding KATs and tests, documentation, and making sure the performance was ahead of other haskell implementations. I

Re: [Haskell-cafe] cabal sdist warns about optimization levels

2013-01-13 Thread Daniel Fischer
On Sunday 13 January 2013, 21:27:44, Petr P wrote: I wonder: (1) Is there a way how to disable the warning? As the main aim of the library is speed, I believe -O2 is appropriate here. And since the code is quite short, I'm quite sure the increased compile time won't be noticeable. (2)

Re: [Haskell-cafe] ln, e

2013-01-05 Thread Daniel Fischer
On Samstag, 5. Januar 2013, 16:03:23, Christopher Howard wrote: Hi. Are natural log and Euler's constant defined somewhere in base, or a convenience math module somewhere? I'm having trouble finding them with hayoo or system documentation. The natural logarithm is simply `log`. Euler's

Re: [Haskell-cafe] Tail recursive

2012-12-19 Thread Daniel Fischer
On Mittwoch, 19. Dezember 2012, 17:17:19, J.W. Krol wrote: From: jkr...@live.com To: haskell-cafe@haskell.org Subject: Tail recursive Date: Wed, 19 Dec 2012 17:07:14 +0100 Hello, I need a non tail recursive version of scanl, scanl isn't tail recursive, I believe you meant you need a tail

Re: Need workaround for lack of fromIntegral/Int-Word rules in 7.4.2

2012-12-17 Thread Daniel Fischer
On Montag, 17. Dezember 2012, 07:07:21, Johan Tibell wrote: This compiles badly in 7.4.2: f :: Int - Word f = fromIntegral I need a workaround. Mine produces (with optimisations, of course) Convert.f :: GHC.Types.Int - GHC.Word.Word [GblId, Arity=1, Caf=NoCafRefs, Str=DmdType

Re: [Haskell-cafe] Why is boxed mutable array so slow?

2012-12-01 Thread Daniel Fischer
On Samstag, 1. Dezember 2012, 16:09:05, Branimir Maksimovic wrote: All in all even unboxed array is about 10 times slower than Java version. I don't understand why is even unboxed array so slow. It's not the unboxed arrays that are slow. Your code has a couple of weak spots, and GHC's native

Re: [Haskell-cafe] Vedr: To my boss: The code is cool, but it is about 100 times slower than the old one...

2012-11-29 Thread Daniel Fischer
On Donnerstag, 29. November 2012, 21:00:36, Fixie Fixie wrote: The program seems to take around 6 seconds on my linux-box, while the c version goes for 0.06 sekcond. That is really some regression bug :-) Anyone with a more recent version thatn 7.4.1? I don't even have a problem with

Re: [Haskell-cafe] Vedr: To my boss: The code is cool, but it is about 100 times slower than the old one...

2012-11-29 Thread Daniel Fischer
On Donnerstag, 29. November 2012, 13:40:42, Johan Tibell wrote: word2Double :: Word - Double word2Double (W# w) = D# (int2Double# (word2Int# w)) On my (64-bit) machine the Haskell and C versions are on par. Yes, but the result is very different.

Re: [Haskell-cafe] Vedr: To my boss: The code is cool, but it is about 100 times slower than the old one...

2012-11-29 Thread Daniel Fischer
On Donnerstag, 29. November 2012, 13:40:42, Johan Tibell wrote: word2Double :: Word - Double word2Double (W# w) = D# (int2Double# (word2Int# w)) On my (64-bit) machine the Haskell and C versions are on par. On my box, the Haskell is even faster then, but, as said, the result is incorrect

Re: [Haskell-cafe] Strange behavior with listArray

2012-11-12 Thread Daniel Fischer
On Montag, 12. November 2012, 08:36:49, Bas van Dijk wrote: On 12 November 2012 04:50, Alex Stangl a...@stangl.us wrote: I'm stymied trying to figure out why the program below blows up with loop when I use f 0 If you replace the a!0 in f by its value 0, f is equivalent to: f

Re: [Haskell-cafe] Trying to use more than one array in runSTUArray

2012-03-15 Thread Daniel Fischer
On Thursday 15 March 2012, 19:27:18, Juan Miguel Vilar wrote: Hello, café: I am trying to use more than one array with runSTUArray but I don't seem to be able to understand how it works. My first try is this: test1 n = runSTUArray $ do a - newArray (1, n) (2::Int)

Re: [Haskell-cafe] Trying to use more than one array in runSTUArray

2012-03-15 Thread Daniel Fischer
On Thursday 15 March 2012, 19:53:56, Daniel Fischer wrote: On Thursday 15 March 2012, 19:27:18, Juan Miguel Vilar wrote: Hello, café: However, when I write test2 n = runSTUArray $ do let createArray v n = newArray (1, n) (v::Int) Here you create a local binding

Re: ghci 7.4.1 no longer loading .o files?

2012-02-27 Thread Daniel Fischer
On Monday 27 February 2012, 18:56:47, Yitzchak Gale wrote: It's nice if there is a way for experts to load .o files in GHCi, e.g., for the rare case where the performance difference for some specific module is so great that you can't work effectively interactively in some other module that

Re: [Haskell-cafe] ANN: combinatorics

2012-02-05 Thread Daniel Fischer
On Wednesday 01 February 2012, 07:53:03, wren ng thornton wrote: The primes function in the combinat package is based on an old Cafe thread, and actually seems to be faster than the one in the combinatorics package. Yes, but it has a memory leak. On my box at least, with ghc 6.12, 7.0 and

Re: [Haskell-cafe] ANN: combinatorics

2012-02-05 Thread Daniel Fischer
On Sunday 05 February 2012, 23:14:35, wren ng thornton wrote: On 2/5/12 10:21 AM, Daniel Fischer wrote: Why not use one of the packages on hackage which offer faster prime generators? Mostly because I hadn't looked, having had the code already laying around. Yeah, that's fine

Re: ANNOUNCE: GHC 7.4.1 Release Candidate 2

2012-02-04 Thread Daniel Fischer
On Wednesday 01 February 2012, 19:08:16, Evan Laforge wrote: On Wed, Feb 1, 2012 at 8:16 AM, Simon Hengel s...@typeful.net wrote: Are you referring to the classical pattern, that allows you to add a shebang? #!/usr/bin/env runhaskell import Distribution.Simple main =

Re: [Haskell-cafe] Natural Transformations and fmap

2012-01-23 Thread Daniel Fischer
On Tuesday 24 January 2012, 04:39:03, Ryan Ingram wrote: At the end of that paste, I prove the three Haskell monad laws from the functor laws and monoid-ish versions of the monad laws, but my proofs all rely on a property of natural transformations that I'm not sure how to prove; given

Re: [Haskell-cafe] function composition

2012-01-15 Thread Daniel Fischer
On Sunday 15 January 2012, 16:17:24, TP wrote: Hi, I have a basic question concerning function composition. I have used http://www.haskell.org/tutorial/functions.html to write a composition function: Prelude let f°g = f g This does not what you probably expect. That definition means (°)

Re: [Haskell-cafe] Text.Regex.Base throws exceptions with makeRegexOptsM

2011-12-29 Thread Daniel Fischer
On Thursday 29 December 2011, 23:52:46, Omari Norman wrote: Hi folks, I'm using Text.Regex.Base with the TDFA and PCRE backends. I want to compile regular expressions first and make sure the patterns were actually valid, so I used makeRegexOptsM, which indicates a bad regular expression by

Re: [Haskell-cafe] Recommended class instances for container type

2011-12-08 Thread Daniel Fischer
On Thursday 08 December 2011, 18:13:50, Christoph Breitkopf wrote: Well, including a some file via CPP did look experimental enough to me. I'd like to stay away from GHC-only code, if possible. CPP is standard (maybe not in the sense that it's included in the language standard, but every

Re: GHC HEAD build error

2011-12-07 Thread Daniel Fischer
On Wednesday 07 December 2011, 16:45:31, Bas van Dijk wrote: Hello, I'm trying to build GHC HEAD but get the following error: inplace/bin/ghc-stage1 -H64m -O0 -fasm -Iincludes -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -dcmm-lint -i -irts -irts/dist/build

Re: [Haskell-cafe] List x ByteString x Lazy Bytestring

2011-12-05 Thread Daniel Fischer
On Monday 05 December 2011, 14:14:56, John Sneer wrote: I've used Haskell and GHC to solve particular real life application. 4 tools were developed and their function is almost the same - they modify textual input according to patterns found in the text. Thus, it Hmm, modification can be a

Re: [Haskell-cafe] How to get a file path to the program invoked?

2011-12-05 Thread Daniel Fischer
On Monday 05 December 2011, 15:53:35, dokondr wrote: Balazs, thanks for your comments! The first comment works just fine. With / operator I get this: Main System.Environment.Executable System.FilePath /abc / / / Instead of getting /abc/ I get /. What am I doing wrong? The second path is

Re: [Haskell-cafe] Poll: Do you want a mascot? -- please stop this

2011-12-05 Thread Daniel Fischer
On Monday 05 December 2011, 17:03:35, Mark Lentczner wrote: On 23/11/11 19:11, heathmatlock wrote: Question: Do you want a mascot? No. I thought it was dead. Since it isn't: also no. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Poll: Do you want a mascot?

2011-11-25 Thread Daniel Fischer
On Friday 25 November 2011, 09:28:29, Ivan Lazar Miljenovic wrote: On 25 November 2011 19:13, Liyang HU haskell@liyang.hu wrote: heathmatlock heathmatlock at gmail.com writes: Question: Do you want a mascot? Yes And we already have one: http://paraiso-lang.org/ikmsm/books/c80.html

Re: [Haskell-cafe] Decision procedure for foldr/foldl/foldl'?

2011-11-20 Thread Daniel Fischer
On Sunday 20 November 2011, 17:28:43, David Fox wrote: Does anyone have a quick way to decide which of the fold functions to use in a given situation? There are times when I would like to find out which to use in the quickest way possible, rather than reading a long explanation of why each

Re: [Haskell-cafe] ST not strict enough?

2011-11-18 Thread Daniel Fischer
On Friday 18 November 2011, 11:18:33, Yves Parès wrote: Instead of rewriting modifySTRef, why not just do : modifySTRef counter (\x - let y = x+1 in y `seq` y) Is there a problem with that? Yes, y `seq` y is precisely the same as y. a `seq` b means whenever evaluation of b is demanded,

Re: [Haskell-cafe] ST not strict enough?

2011-11-18 Thread Daniel Fischer
On Friday 18 November 2011, 13:05:06, Yves Parès wrote: ...so there is no way to do that inside the function passed to modifySTRef? In other words, there is no way to ensure inside a function that its result will be evaluated strictly? Well, modifySTRef ref fun = do val - readSTRef ref

Re: heads up: GHC gets a new constraint solver (again)

2011-11-16 Thread Daniel Fischer
On Wednesday 16 November 2011, 19:22:53, Dimitrios Vytiniotis wrote: Friends, After a very busy period of hard work with Simon, we've re-engineered GHCs constraint solver and I just pushed a big patch on master along with modifications in the testsuite. The new constraint solver is based

Re: [Haskell-cafe] ST not strict enough?

2011-11-16 Thread Daniel Fischer
On Wednesday 16 November 2011, 22:45:16, Johan Tibell wrote: On Wed, Nov 16, 2011 at 12:33 PM, Antoine Latter aslat...@gmail.com wrote: We already have one in base - it re-exports Data.STRef in whole :-) http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-STRef-

Re: [Haskell-cafe] Problems with installing the correct version of process. Help?

2011-11-15 Thread Daniel Fischer
On Tuesday 15 November 2011, 22:34:17, Blaine wrote: Great question. How does one ignore the warning? Not. process and directory are boot packages, required by ghc and indirectly by many of the packages you install(ed). Having multiple versions of these spells trouble and breakage. Read

Re: [Haskell-cafe] deepseq-1.2.0.1 missing Data.Map instance

2011-11-15 Thread Daniel Fischer
On Tuesday 15 November 2011, 23:26:04, Henry Laxen wrote: So I guess my question is: Is there a reason that the map instance was removed from deepseq-1.2.0.1, Yes. and can we please put it back in? No. The NFData instance has been moved to the containers package, where it can be more

Re: [Haskell-cafe] Strange GC timings

2011-11-12 Thread Daniel Fischer
On Saturday 12 November 2011, 20:36:04, Artyom Kazak wrote: Hello! The following program executes 1.5 seconds on my computer: ---CODE BEGIN- module Main where import Data.Array.IArray main = print (answers ! 100)

Re: [Haskell-cafe] Bounds checking pragma?

2011-11-09 Thread Daniel Fischer
On Thursday 10 November 2011, 00:35:07, Artyom Kazak wrote: Hello! The (!) operator is short and nice. Unfortunately, when doing heavy computing, we have to use unsafeAt instead. It looks ugly and it is ugly, also. Some compilers for imperative languages like Free Pascal have an option

Should GHC default to -O1 ?

2011-11-08 Thread Daniel Fischer
On the haskell-cafe as well as the beginners mailing lists, there frequently (for some value of frequent) are posts where the author inquires about a badly performing programme, in the form of stack overflows, space leaks or slowness. Often this is because they compiled their programme without

Re: Should GHC default to -O1 ?

2011-11-08 Thread Daniel Fischer
On Tuesday 08 November 2011, 17:16:27, Simon Marlow wrote: most people know about 1, but I think 2 is probably less well-known. When in the edit-compile-debug cycle it really helps to have -O off, because your compiles will be so much quicker due to both factors 1 2. Of course. So defaulting

Re: [Haskell-cafe] Project Euler Problem 357 in Haskell

2011-11-08 Thread Daniel Fischer
On Tuesday 08 November 2011, 12:21:14, mukesh tiwari wrote: Hello all Being a Haskell enthusiastic , first I tried to solve this problem in Haskell but it running for almost 10 minutes on my computer but not getting the answer. Hmm, finishes in 13.36 seconds here, without any changes. Of

Re: [Haskell-cafe] Project Euler Problem 357 in Haskell

2011-11-08 Thread Daniel Fischer
On Tuesday 08 November 2011, 14:54:18, Silvio Frischknecht wrote: On 11/08/2011 02:19 PM, Ryan Yates wrote: If I compile with optimizations: ghc --make -O3 primes.hs So far, -O3 is not different from -O2 (-On gives you -O2 for n 2). *Never* compile code you want to use without

Re: [Haskell-cafe] zlib build failure on recent GHC

2011-11-07 Thread Daniel Fischer
On Monday 07 November 2011, 21:06:17, Jason Dagit wrote: On Mon, Nov 7, 2011 at 8:17 AM, Johan Tibell johan.tib...@gmail.com wrote: This is due to a change in how FFI imports and newtypes work. GHC was recently changed to not allow you to use newtypes in FFI imports unless the constructor

Re: [Haskell-cafe] Cabal install problem

2011-11-05 Thread Daniel Fischer
On Saturday 05 November 2011, 16:00:40, Ivan Lazar Miljenovic wrote: On 6 November 2011 01:52, Victor Miller victorsmil...@gmail.com wrote: Lately whenever I try to install a cabal package it fails with the following error message: Could not find module `Control.Monad.State':

Re: [Haskell-cafe] Ridiculously slow FFI, or cairo binding?

2011-11-02 Thread Daniel Fischer
On Wednesday 02 November 2011, 10:19:08, Eugene Kirpichov wrote: I forgot to specify my environment. Windows Server 2008 R2 x64, ghc 7.0.3. However, I observed the same speed differences on a 64-bit ubuntu with ghc 6.12 - I profiled my application with cairo-trace, and cairo-perf-trace

Re: [Haskell-cafe] When does the UNPACK pragma work?

2011-10-28 Thread Daniel Fischer
On Friday 28 October 2011, 11:41:15, Eugene Kirpichov wrote: newtype Day = ModifiedJulianDay {toModifiedJulianDay :: Integer} newtype DiffTime = MkDiffTime Pico And Pico is also essentially a newtype for Integer. So, I'm getting warnings on this definition of UTCTime. QUESTION: Is it the

Re: [Haskell-cafe] When does the UNPACK pragma work?

2011-10-28 Thread Daniel Fischer
On Friday 28 October 2011, 11:57:54, Eugene Kirpichov wrote: Another question: Can I unpack some fields in a record and not unpack others? Yes, no problem with that. Does their order matter then? In what way? The order of the fields in the definition of the type will determine the order in

Re: [Haskell-cafe] Really impossible to reinstall `base' using cabal?

2011-10-26 Thread Daniel Fischer
On Wednesday 26 October 2011, 22:58:46, Joachim Breitner wrote: Hi, Am Mittwoch, den 26.10.2011, 13:10 +1100 schrieb Ivan Lazar Miljenovic: How did you get your ghc? If from your distro's package manager, you should be able to get the dyn- libs from that too. Unless you distro

Re: [Haskell-cafe] Really impossible to reinstall `base' using cabal?

2011-10-25 Thread Daniel Fischer
On Tuesday 25 October 2011, 22:32:23, Captain Freako wrote: dbanas@dbanas-eeepc:~$ cabal install base and got this: Resolving dependencies... cabal: internal error: impossible Is it really impossible to use cabal to reinstall `base'? Fortunately, yes. Reinstalling base is impossible

Re: [Haskell-cafe] Really impossible to reinstall `base' using cabal?

2011-10-25 Thread Daniel Fischer
On Wednesday 26 October 2011, 02:00:49, Captain Freako wrote: So, do you have any advice for me, with regard to solving this issue: Implicit import declaration: Could not find module `Prelude': Perhaps you haven't installed the dyn libraries for package `base'? ? That is, how

Re: [Haskell-cafe] Error when installing RSA (for yesod) with GHC 7.2.1

2011-10-24 Thread Daniel Fischer
On Monday 24 October 2011, 23:13:32, Yves Parès wrote: I'm using GHC 7.2.1 and cabal-install 0.8 (Cabal 1.8.0.2), and when cabal install rsa Apparently it's an instance being declared twice. However RSA hackage page states that it compiles under GHC 7.2:

Re: [Haskell-cafe] SpecConstr message while compiling

2011-10-23 Thread Daniel Fischer
On Sunday 23 October 2011, 19:33:55, Daniel Díaz Casanueva wrote: Hi, cafe! I wrote a program and had the following message while compiling (with -O2): SpecConstr Function `addOc{v s6RL} [lid]' has four call patterns, but the limit is 3 Use -fspec-constr-count=n to set the

Re: [Haskell-cafe] hello Haskell

2011-10-23 Thread Daniel Fischer
On Monday 24 October 2011, 03:54:09, Erik de Castro Lopo wrote: R J wrote: hey Haskell this is nuts http://www.business10i.com hey Haskell this is nuts ://xxx.xxx.xxx Maybe its time to moderate all newcomers to this list, at least until they post one non-spam message to the

Re: [Haskell-cafe] hello Haskell

2011-10-23 Thread Daniel Fischer
On Monday 24 October 2011, 05:04:03, Erik de Castro Lopo wrote: That suggests a hijacked account. Looks quite so, cf. Conrad Parker's message. Such accounts could still be put under moderation. Yes, that's probably the best. ___ Haskell-Cafe

Re: [Haskell-cafe] haskell-janitors (was Re: New rss maintainer)

2011-10-23 Thread Daniel Fischer
On Monday 24 October 2011, 04:56:49, Erik de Castro Lopo wrote: Conrad Parker wrote: I like the janitors idea because it is practical, and I also like the ideal world where every package has an active maintainer. How about we set up the haskell-janitors github group as Vincent

Re: [Haskell-cafe] runStateT execution times measurement baffling

2011-10-22 Thread Daniel Fischer
On Saturday 22 October 2011, 23:07:44, thomas burt wrote: Sorry, thought I had replied to this with my result! I added `seq` and $! inside `stuffToDo` to ensure that there weren't any thunks left around after it was called. The measured times were only a few hundredths of a second apart

Re: [Haskell-cafe] Haddock fails on ConfigFile, but why?

2011-10-21 Thread Daniel Fischer
On Friday 21 October 2011, 23:49:45, Magnus Therning wrote: Would love to get some help on making Haddock accept ConfigFile[1]. The error message is about as far from helpful as you can get ;) dist/build/tmp-15743/src/Data/ConfigFile/Monadic.hs:34:1: parse error on input `import' The

Re: [Haskell-cafe] Haddock fails on ConfigFile, but why?

2011-10-21 Thread Daniel Fischer
On Friday 21 October 2011, 23:49:45, Magnus Therning wrote: Would love to get some help on making Haddock accept ConfigFile[1]. The error message is about as far from helpful as you can get ;) dist/build/tmp-15743/src/Data/ConfigFile/Monadic.hs:34:1: parse error on input `import' The

Re: [Haskell-cafe] Correction: subclasses and classes with same type in instance

2011-10-16 Thread Daniel Fischer
On Sunday 16 October 2011, 20:03:02, Patrick Browne wrote: Hi, Does the subclass relation have any meaning when two classes have instances with the same type? I get the same results from Listing 1 and Listing 2 below. Regards, Pat The only effect of a superclass constraint is that you can't

Re: [Haskell-cafe] Correction: subclasses and classes with same type in instance

2011-10-16 Thread Daniel Fischer
On Sunday 16 October 2011, 21:50:13, Patrick Browne wrote: In the current example does the following totally or partially ignore the type class system. boo :: Shed - Integer boo h = addressB h + addressH h It doesn't ignore the type class system at all. It's a monomorphic function using

Re: [Haskell-cafe] Fwd: how to increase the stack size

2011-10-16 Thread Daniel Fischer
On Monday 17 October 2011, 04:39:49, kolli kolli wrote: when I am running the program in my terminal on ubuntu its showing me GHC stack-space overflow: current limit is 536870912 bytes. Use the `-Ksize' option to increase it. how can i increase the stack sizePlz help me out $

Re: [Haskell-cafe] __GLASGOW_HASKELL__ macro in 7.2.1

2011-10-14 Thread Daniel Fischer
On Friday 14 October 2011, 16:47:45, JP Moresmau wrote: Hello list, I must be doing something stupid, but what? ghc --version The Glorious Glasgow Haskell Compilation System, version 7.2.1 ghc -E -optP-dM -cpp Main.hs (per

Re: [Haskell-cafe] Lists concatenation being O(n)

2011-10-14 Thread Daniel Fischer
On Friday 14 October 2011, 16:55:14, Bas van Dijk wrote: On 13 October 2011 20:53, Albert Y. C. Lai tre...@vex.net wrote: The number of new cons cells created in due course is Θ(length xs). I was actually surprised by this because I expected: length(xs++ys) to fuse into one efficient loop

Re: [Haskell-cafe] Lists concatenation being O(n)

2011-10-14 Thread Daniel Fischer
On Friday 14 October 2011, 17:10:00, Yves Parès wrote: Wow, I don't get core haskell, but I get you point. It's indeed odd foldl' doesn't use foldr (and sum doesn't use foldl' instead of foldl as (+) is strict (*)) if foldr permits loop fusion. No, it's not odd. The fusion technology isn't yet

Re: GHC infinite loop when building vector program

2011-10-11 Thread Daniel Fischer
On Tuesday 11 October 2011, 21:11:30, Bas van Dijk wrote: Hello, When benchmarking my new vector-bytestring[1] package I discovered that building the following program causes GHC to go into, what seems to be, an infinite loop: I use vector-0.9 and ghc-7.2.1. Replicated with

Re: [Haskell-cafe] Implementing a new primtype

2011-10-10 Thread Daniel Fischer
On Tuesday 11 October 2011, 00:57:39, Paul Monday wrote: There seems to be plenty of documentation around on implementing a new primop, much of it needs some tweaking as files have moved and such. I can't seem to find any documentation about how to implement primtypes though. For example,

Re: Is this a concurrency bug in base?

2011-10-09 Thread Daniel Fischer
On Sunday 09 October 2011, 15:30:20, Jean-Marie Gaillourdet wrote: Hi Daniel, On 09.10.2011, at 14:45, Daniel Fischer wrote: On Sunday 09 October 2011, 13:52:47, Jean-Marie Gaillourdet wrote: This seems to be a Heisenbug as it is extremely fragile, when adding a | grep 1 to the while

Re: Is this a concurrency bug in base?

2011-10-09 Thread Daniel Fischer
Jean-Marie Gaillourdet: the Eq instance of TypeRep shows the same non-deterministic behavior: Of course, equality on TypeReps is implemented by comparison of the Keys. On Sunday 09 October 2011, 16:40:13, Jean-Marie Gaillourdet wrote: Hi Daniel, I've been chasing the source of the

Re: Is this a concurrency bug in base?

2011-10-09 Thread Daniel Fischer
On Sunday 09 October 2011, 17:51:06, Jean-Marie Gaillourdet wrote: That sounds plausible. Do you see any workaround? Perhaps repeatedly evaluating typeOf? typeOf' seems to be a working workaround: typeOf' val | t1 == t2 = t1 | otherwise = typeOf' val where t1 =

Re: [Haskell-cafe] Best bit LIST data structure

2011-10-09 Thread Daniel Fischer
On Sunday 09 October 2011, 15:54:14, Joachim Breitner wrote: Hi, Am Freitag, den 07.10.2011, 10:52 -0400 schrieb Ryan Newton: What about just using the Data.Bits instance of Integer? Well, presently, the setBit instance for very large integers creates a whole new integer, shifts, and

Re: [Haskell-cafe] How to install haddock with ghc-7.2.1?

2011-10-06 Thread Daniel Fischer
On Thursday 06 October 2011, 15:20:44, Paulo Pocinho wrote: Implicit import declaration: base:Prelude can't be safely imported! The package (base) the module resides in isn't trusted. Due to an oversight, the base package isn't trusted by default in ghc-7.2.1, run C:\ ghc-pkg trust base

Re: [Haskell-cafe] module - package

2011-09-30 Thread Daniel Fischer
On Friday 30 September 2011, 21:04:48, Roman Beslik wrote: Hello. How can I find which installed package a specified module belongs to? ghci or cabal or ghc-pkg? $ ghc-pkg find-module Foo.Bar.Baz ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-25 Thread Daniel Fischer
On Sunday 25 September 2011, 19:20:52, Chris Smith wrote: Would it be an accurate summary of this thread that people are asking for (not including quibbles about naming and a few types): Not quite, I'm afraid. class Ord a = Enum a where succ :: a - a pred :: a - a fromEnum ::

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-25 Thread Daniel Fischer
On Sunday 25 September 2011, 23:13:47, Chris Smith wrote: Don't mix range and arithmetic sequences. I want arithmetic sequences for Double, Float and Rational, but not range. (For Float and Double one could implement range [all values between the given bounds, in increasing order, would be

Re: [Haskell-cafe] A Missing Issue on Second Generation Strategies

2011-09-24 Thread Daniel Fischer
On Saturday 24 September 2011, 18:01:10, Burak Ekici wrote: Dear List, I am trying to parallelize RSA encryption and decryption by using below manner, but when I run executable output file with +RTS -s -N2 command on Windows 7, output stats say 4 sparks are being created however none of

Re: [Haskell-cafe] stack overflow pain

2011-09-21 Thread Daniel Fischer
On Thursday 22 September 2011, 01:00:37, Tim Docker wrote: I believe the error is happening in the concat because there are subsequent IO actions that fail to execute. ie the code is equivalent to: vs - fmap concat $ mapM applyAction sas someOtherAction consume

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-21 Thread Daniel Fischer
On Wednesday 21 September 2011, 20:39:09, Casey McCann wrote: On Wed, Sep 21, 2011 at 12:09 AM, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: Yes. Which can be inconvenient if you are interested in whether you got a -0.0, so if that's the case, you can't simply use (== -0.0

Re: Evaluating type expressions in GHCi

2011-09-20 Thread Daniel Fischer
On Wednesday 21 September 2011, 01:02:52, wagne...@seas.upenn.edu wrote: Would it be possible to have no command at all? Types are distinguished by upper-case letters, so it should be possible to tell whether a given expression is a value-level or a type-level expression. Unless I'm

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-20 Thread Daniel Fischer
On Tuesday 20 September 2011, 17:39:49, Ketil Malde wrote: Chris Smith cdsm...@gmail.com writes: It would be a shame if we lost an occasionally useful and easy to read You forgot confusing? Expecting Enum to enumerate all inhabitants of a type seems very reasonable to me, and seems to hold

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-20 Thread Daniel Fischer
On Tuesday 20 September 2011, 23:56:53, Evan Laforge wrote: I actually think the brokenness of Ord for floating point values is worse in many ways, as demonstrated by the ability to insert a value into a Data.Set.Set and have other values disappear from the set as a result. Getting an

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-20 Thread Daniel Fischer
On Wednesday 21 September 2011, 00:20:09, Casey McCann wrote: This plays havoc with the search tree used internally by Set and Map, the result being that if you have any NaN values in the data structure, you may not be able to find other values anymore. Because NaN values never compare equal

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-20 Thread Daniel Fischer
On Wednesday 21 September 2011, 00:38:12, Maciej Marcin Piechotka wrote: +1 for: class Eq a = Iq a where (.) :: a - a - Bool (.) :: a - a - Bool Regards -1 for the class name, too easy to miscount the Es. And perhaps it would be better to add the IEEE compliant(?)

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-20 Thread Daniel Fischer
On Wednesday 21 September 2011, 01:23:48, Casey McCann wrote: On Tue, Sep 20, 2011 at 6:58 PM, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: On Wednesday 21 September 2011, 00:20:09, Casey McCann wrote: Because NaN values never compare equal to themselves, I'm not sure if it's

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-20 Thread Daniel Fischer
On Wednesday 21 September 2011, 04:18:38, Casey McCann wrote: On Tue, Sep 20, 2011 at 8:20 PM, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: Yes, where NaNs matter, you always have to check (well, unless you *know* that your calculations don't produce any NaNs). Btw, -0.0 can

Re: [Haskell-cafe] The applicative instances for Either?

2011-09-17 Thread Daniel Fischer
On Saturday 17 September 2011, 08:42:42, Ketil Malde wrote: Hi, I have a program that makes use of the applicative instance for Either String. I used to define these instances locally, but at some point, they became part of Control.Applicative. I have limited the dependencies to 'base =

Re: [Haskell-cafe] Error in Installing Data.deriveTH

2011-09-17 Thread Daniel Fischer
On Saturday 17 September 2011, 12:41:17, mukesh tiwari wrote: Does there exist an unversioned ghc? What does $ which ghc print? It prints nothing . Okay, since cabal defaults to looking for plain ghc when no compiler is explicitly passed, that explains why it didn't work

Re: [Haskell-cafe] Error in Installing Data.deriveTH

2011-09-16 Thread Daniel Fischer
On Friday 16 September 2011, 13:55:25, mukesh tiwari wrote: Thank you for reply Daniel . I installed the ghc-7.2.1 but now running cabal install keys --dry-run -v gives error. One more thing i would like to know. Before installing any package , i should check its dependency and if it depends

Windows build problems

2011-09-15 Thread Daniel Fischer
I'm trying to set up a build/test environment on Windows. Building ghc (sh validate) fails after a while due to flex and bison crashing. Those two come with git and even $ flex --version (or bison) crashes, so they seem truly hosed. Do I need flex/bison at all to build ghc? It seems they're not

Re: Windows build problems

2011-09-15 Thread Daniel Fischer
On Thursday 15 September 2011, 21:41:10, Bill Tutt wrote: From Daniel Fischer: I'm trying to set up a build/test environment on Windows. Building ghc (sh validate) fails after a while due to flex and bison crashing. Those two come with git and even $ flex --version (or bison) crashes

Re: [Haskell-cafe] Error in Installing Data.deriveTH

2011-09-15 Thread Daniel Fischer
On Thursday 15 September 2011, 21:37:29, mukesh tiwari wrote: I tried to resolve this issue on #haskell and i got suggestion that it was due to conflict in global and local namespace [ see here for more detail http://hpaste.org/51376 ]. Yes.The containers in the global db is shadowed by

Re: [Haskell-cafe] efficient chop

2011-09-14 Thread Daniel Fischer
On Wednesday 14 September 2011, 09:17:16, Kazu Yamamoto wrote: You can find the results of my friend: https://gist.github.com/1215660 Please ignore the Japanese text. Please read the code and the results. I'm not sure why you had the different result. Input size. The lazy foldr

Re: [Haskell-cafe] Parsec: non-greedy 'between'

2011-09-11 Thread Daniel Fischer
On Sunday 11 September 2011, 22:38:30, Scott Lawrence wrote: Hey all, Trying to match C-style comments, I have: between (string /*) (string */) $ many anyChar Which doesn't work, because it is equivalent (ignoring returned values) to do {string /*; many anyChar; string */} If

Re: [Haskell-cafe] mapM is supralinear?

2011-09-08 Thread Daniel Fischer
On Friday 09 September 2011, 00:41:11, Roman Cheplyaka wrote: * Ertugrul Soeylemez e...@ertes.de [2011-09-07 16:20:03+0200] In general it's a bad idea to use mapM over IO. Could you explain why? Take it with a grain of salt, there's nothing necessarily wrong with using mapM over IO on

Re: [Haskell-cafe] mapM is supralinear?

2011-09-06 Thread Daniel Fischer
On Wednesday 07 September 2011, 01:01:08, Travis Erdman wrote: The performance of mapM appears to be supralinear in the length of the list it is mapping on. Hmm. Could reproduce with 6.12.3 and 7.0.4, but not with 7.2.1. Does it need to be this way? Apparently it doesn't, and it seems to

  1   2   3   4   5   6   7   8   9   10   >