Re: [Haskell-cafe] Mystery of an Eq instance

2013-09-20 Thread Scott Lawrence
? In general, programmers are **advised** not to base conditional branching on tests for **equality** of two floating point values. 3. Is this particular behaviour GHC specific? (I am using GHC 6.12.1) If there are references on this please share. Thanks and regards, -Damodar Kulkarni -- Scott

[Haskell-cafe] Bytestring map/zipWith rationale

2013-09-12 Thread Scott Lawrence
understand it, the compiler performs sufficient optimizations so that there's no performance hit to doing things like (pack $ zipWith xor a b), but it still seems inconsistent. Is there a deep reason for this? -- Scott Lawrence Linux baidar 3.10.9-1-ARCH #1 SMP PREEMPT Wed Aug 21 13:49:35

Re: [Haskell-cafe] Bytestring map/zipWith rationale

2013-09-12 Thread Scott Lawrence
On Thu, 12 Sep 2013, Tom Ellis wrote: On Thu, Sep 12, 2013 at 09:21:20AM -0400, Scott Lawrence wrote: Something's always bothered me about map and zipWith for ByteString. Why is it map :: (Word8 - Word8) - ByteString - ByteString but zipWith :: (Word8 - Word8 - a) - ByteString

Re: [Haskell-cafe] remote-build-reporting: cabal phoning home?!

2013-05-01 Thread Scott Lawrence
Hello, I think (and a quick reading of source seems to bear this out) that that only happens when you run cabal report. Which isn't quite undocumented - see cabal report --help. On Wed, 1 May 2013, Ertugrul Söylemez wrote: Hello there, could somebody please shed some light on the

Re: [Haskell-cafe] Lazy object deserialization

2013-03-13 Thread Scott Lawrence
structures would presumably encounter problems even if it worked for a list. Ah well. As long as I'm not duplicating someone else's work, I'm more than happy to go at this from scratch. On Wed, 13 Mar 2013, Jeff Shaw wrote: On 3/13/2013 12:15 AM, Scott Lawrence wrote: Hey all, All the object

[Haskell-cafe] Lazy object deserialization

2013-03-12 Thread Scott Lawrence
to build a cereal-like library that allows proper lazy deserialization. Does it exist, and I've just missed it? Thanks, -- Scott Lawrence Linux baidar 3.7.10-1-ARCH #1 SMP PREEMPT Thu Feb 28 09:50:17 CET 2013 x86_64 GNU/Linux ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Makefile for a Haskell Project

2012-12-27 Thread Scott Lawrence
On Fri, 28 Dec 2012, xuan bach wrote: Hi everyone, I'm a newbie in Haskell. I'm wondering that if there is any tool support creating Makefile for Haskell project like Ocamlbuild for Ocaml project? Since ghc handles dependencies automatically, I usually just do, all:

Re: [Haskell-cafe] Makefile for a Haskell Project

2012-12-27 Thread Scott Lawrence
to distribute your software on hackage. Running cabal init will guide you through creating a stub cabal file, so it's not too bad. Best Regards. On Fri, Dec 28, 2012 at 2:08 PM, Scott Lawrence byt...@gmail.com wrote: On Fri, 28 Dec 2012, xuan bach wrote: Hi everyone, I'm a newbie

Re: [Haskell-cafe] Can cabal be turned into a package manager?

2012-12-12 Thread Scott Lawrence
. But I think there ought to be a better solution.) Janek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Scott Lawrence ___ Haskell-Cafe

[Haskell-cafe] ANN: format-0.1.0.0

2012-05-26 Thread Scott Lawrence
. If there's demand, I'll be happy to pay more attention to that. -- Scott Lawrence ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] static linking with ghc?

2012-04-22 Thread Scott Lawrence
don't see anything on how to switch this off. - J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Scott Lawrence ___ Haskell-Cafe mailing

[Haskell-cafe] cabal-install package precedence with --extra-lib-dirs

2012-02-01 Thread Scott Lawrence
When running cabal install with --extra-lib-dirs=./lib, if a package is found both in ~/.cabal/lib and ./lib, cabal seems to favor the ~/.cabal/lib one. Is there some way to specify the correct precedence to use? -- Scott Lawrence signature.asc Description: OpenPGP digital signature

Re: [Haskell-cafe] Anonymous, Unique Types, maybe

2011-12-04 Thread Scott Lawrence
of `filter` isn't related to the list going in in this way, and shouldn't be re-paired with that list (or a direct derivative). My goal, again, is to represent that distinction in the type system. -- Scott Lawrence ___ Haskell-Cafe mailing list Haskell

Re: [Haskell-cafe] Anonymous, Unique Types, maybe

2011-12-04 Thread Scott Lawrence
Thanks all; I haven't quite gotten it to work, but I imagine I'll be able to now (after reading up on ExistentialQuantification). -- Scott Lawrence ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell-cafe] Anonymous, Unique Types, maybe

2011-12-03 Thread Scott Lawrence
) for the help (and being awesome). -- Scott Lawrence ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2011-11-23 Thread Scott Lawrence
No -- Scott Lawrence ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2011-09-11 Thread Scott Lawrence
or (satisfy . not), but that doesn't help here. So... what am I missing? Thanks in advance. -- Scott Lawrence signature.asc Description: OpenPGP digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

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

2011-09-11 Thread Scott Lawrence
On 09/11/11 16:45, Alexander Solla wrote: Use manyTill. Ah, but of course. Thanks again! -- Scott Lawrence signature.asc Description: OpenPGP digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Prelude read 1234 :: String - *** Exception: Prelude.read: no parse

2011-08-06 Thread Scott Lawrence
___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Scott Lawrence ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] GHC7 build problem

2011-06-14 Thread Scott Lawrence
fixed now, so you should try again. It's probably not fixed yet, since even last night build fails on opensolaris builder: http://darcs.haskell.org/ghcBuilder/builders/kgardas-opensolaris-x86-head/256/7.html Thanks, Karel -- Scott Lawrence

[Haskell-cafe] GHC7 build problem

2011-06-11 Thread Scott Lawrence
). -- Scott Lawrence signature.asc Description: OpenPGP digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Building Haskell Platform natively for 64bit Windows

2011-06-08 Thread Scott Lawrence
On 06/09/2011 01:47 AM, Jason Dagit wrote: Have you checked this by looking at the generated assembly? I generated some assembly from GHC on windows. Here is what it looks ilke: http://hpaste.org/47610 My assembly-fu is not strong enough to tell if it's using 64bit instructions. It

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-07 Thread Scott Lawrence
to do it, without having two entirely different code paths for 'Markov' and other models, starting from the point of decision (user input or some other factor) - an unwieldy solution in case of more than 2 different models (each, presumably, with their own subset of specializations). -- Scott

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-06 Thread Scott Lawrence
On Mon, Jun 6, 2011 at 01:52, Yitzchak Gale g...@sefer.org wrote: Scott Lawrence wrote: You almost never want to use UndecidableInstances when writing practical programs in Haskell. Ah. That's what I wanted to know :P (Although it does seem to me - from looking around docs and the source

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-06 Thread Scott Lawrence
6, 2011 at 02:13, Scott Lawrence byt...@gmail.com wrote: On Mon, Jun 6, 2011 at 01:52, Yitzchak Gale g...@sefer.org wrote: Scott Lawrence wrote: You almost never want to use UndecidableInstances when writing practical programs in Haskell. Ah. That's what I wanted to know :P (Although

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-06 Thread Scott Lawrence
On 06/06/2011 02:57 AM, Yitzchak Gale wrote: Generally, we don't start out with a type class. Type classes are great for the special situations in which they are needed (although you can do pretty well without them even then), but first let's get the basic concepts. Perhaps a model is just

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-06 Thread Scott Lawrence
On 06/06/2011 03:13 AM, Scott Lawrence wrote: I still don't know enough details about what you're doing, so my types are probably off. But I hope you get the idea. No, your types are right. Or not. type Model a = (Ord a) = Set a -- the set of lexemes

[Haskell-cafe] Cons of -XUndecidableInstances

2011-06-05 Thread Scott Lawrence
-prime/wiki/UndecidableInstances -- Scott Lawrence ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Lazy Evaluation in Monads

2011-05-31 Thread Scott Lawrence
I was under the impression that operations performed in monads (in this case, the IO monad) were lazy. (Certainly, every time I make the opposite assumption, my code fails :P .) Which doesn't explain why the following code fails to terminate: iRecurse :: (Num a) = IO a iRecurse = do

Re: [Haskell-cafe] Lazy Evaluation in Monads

2011-05-31 Thread Scott Lawrence
On 05/31/2011 04:20 PM, Artyom Kazak wrote: Suppose iRecurse looks like this: iRecurse = do x - launchMissiles r - iRecurse return 1 As x is never needed, launchMissiles will never execute. It obviously is not what is needed. Prelude let launchMissiles = putStrLn UH OH

Re: [Haskell-cafe] Lazy Evaluation in Monads

2011-05-31 Thread Scott Lawrence
On 05/31/2011 04:48 PM, Artyom Kazak wrote: Oh, sorry. I was unclear. I have meant assuming IO is lazy, as Yves wrote. Ah, ok. That makes more sense. And saying some hacks I meant unsafeInterleaveIO, which lies beneath the laziness of, for example, getContents. Which explains why

Re: [Haskell-cafe] Lazy Evaluation in Monads

2011-05-31 Thread Scott Lawrence
Apparently: Prelude let r = (fmap (1:) r) :: IO [Integer] Prelude fmap (take 5) r *** Exception: stack overflow Thanks - I'll just have to stay out of IO for this, then. On Tue, May 31, 2011 at 17:05, Stephen Tetley stephen.tet...@gmail.com wrote: 2011/5/31 Scott Lawrence byt...@gmail.com