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

2013-09-20 Thread Scott Lawrence
. Thanks and regards, -Damodar Kulkarni -- Scott Lawrence ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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 -&

[Haskell-cafe] Bytestring map/zipWith rationale

2013-09-12 Thread Scott Lawrence
o each other with pack/unpack, and as I 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

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 follo

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,

[Haskell-cafe] Lazy object deserialization

2013-03-12 Thread Scott Lawrence
uld be possible 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

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

2012-12-27 Thread Scott Lawrence
f you intend 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 wrote: On Fri, 28 Dec 2012, xuan bach wrote: Hi everyone,

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: g

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

2012-12-12 Thread Scott Lawrence
os, and it avoids dependency hell quite nicely. 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] ANN: format-0.1.0.0

2012-05-26 Thread Scott Lawrence
27;s (and apache's) default format string - pretty slow. 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
libs.html but I 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] 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
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/listin

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

2011-12-04 Thread Scott Lawrence
t coming out 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-

[Haskell-cafe] Anonymous, Unique Types, maybe

2011-12-03 Thread Scott Lawrence
r way to accomplish this. Hope that was clear, and thanks (as always) 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

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.haskel

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

2011-09-11 Thread Scott Lawrence
riterion was a single character, then I could use noneOf 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 li

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

2011-08-06 Thread Scott Lawrence
String > "*** Exception: Prelude.read: no parse > > Why? > > Michael > > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > -- Scott Lawrence __

Re: [Haskell-cafe] GHC7 build problem

2011-06-14 Thread Scott Lawrence
uld have been 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-hea

[Haskell-cafe] GHC7 build problem

2011-06-11 Thread Scott Lawrence
that I did). -- 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. > I

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-07 Thread Scott Lawrence
ldy solution in case of more than 2 different models (each, presumably, with their own subset of specializations). -- Scott Lawrence ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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)

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

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-05 Thread Scott Lawrence
(Tree a) On Mon, Jun 6, 2011 at 02:13, Scott Lawrence wrote: > On Mon, Jun 6, 2011 at 01:52, Yitzchak Gale wrote: >> Scott Lawrence wrote: >> You almost never want to use UndecidableInstances >> when writing practical programs in Haskell. > > Ah. That's what I wa

Re: [Haskell-cafe] Cons of -XUndecidableInstances

2011-06-05 Thread Scott Lawrence
On Mon, Jun 6, 2011 at 01:52, Yitzchak Gale 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 sourc

[Haskell-cafe] Cons of -XUndecidableInstances

2011-06-05 Thread Scott Lawrence
GHC to handle nicely...) [1] http://hackage.haskell.org/trac/haskell-prime/wiki/UndecidableInstances -- Scott Lawrence ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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 wrote: > 2011/5/31 Scott Lawrence : > >> Evalu

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 w

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

[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 recur