Re: default instance for IsString

2012-04-24 Thread Daniel Peebles
Why are potentially partial literals scarier than the fact that every value in the language could lead to an exception when forced? On Tue, Apr 24, 2012 at 5:35 AM, Yitzchak Gale g...@sefer.org wrote: Markus Läll wrote: You do know, that you already *can* have safe Text and ByteString from

Re: default instance for IsString

2012-04-24 Thread Daniel Peebles
I think my point was more along the lines that every *value*, regardless of whether it's a function or not, can be partial (ignoring primitive types and such). I can hand you a list where the third Int in it will cause you to crash if you force it. In that sense, whether every numeric literal

Re: default instance for IsString

2012-04-21 Thread Daniel Peebles
I think it'll be hard to do that without putting Text in base, which I'm not sure anyone wants to do. Dan On Sat, Apr 21, 2012 at 8:20 PM, Greg Weber g...@gregweber.info wrote: I would like to default IsString to use the Text instance to avoid ambiguous type errors. I see defaulting

Re: behaviour change in getDirectoryContents in GHC 7.2?

2011-11-06 Thread Daniel Peebles
Can't we just have the usual .Internal module convention, where people who want internals can get at them if they need to, and most people get a simpler interface? It's amazingly frustrating when you have a library that does 99% of what you need it to do, except for one tiny internal detail that

Re: foldr oddity

2011-10-11 Thread Daniel Peebles
Yeah, you should absolutely mind the order of the parameters (or more generally, when the operation isn't commutative), the strictness of the function's second parameter. In this case, both () and (||) are strict in their first parameter, but both short circuit if the first parameter is

Re: [Haskell-cafe] How to install GhC on a Mac without registering?

2011-06-06 Thread Daniel Peebles
Isn't gcc just used for its assembler and object file creation, these days, now that via-C is deprecated? Or are there other parts of it that are needed? On Mon, Jun 6, 2011 at 10:47 AM, Malcolm Wallace malcolm.wall...@me.comwrote: On 6 Jun 2011, at 13:49, Lyndon Maydwell wrote: I would be

Re: parsing types

2011-04-23 Thread Daniel Peebles
I don't have an answer for you, but you might want to look at what :k does in ghci, since that needs to parse a type. On Sat, Apr 23, 2011 at 2:06 PM, Ranjit Jhala jh...@cs.ucsd.edu wrote: Hi all, can someone give me a hint as to the best way to parse a type from a string. Ideally, I'd like

Re: Injective type families?

2011-02-14 Thread Daniel Peebles
I think what you want is closed type families, as do I and many others :) Unfortunately we don't have those. On Mon, Feb 14, 2011 at 10:02 PM, Conal Elliott co...@conal.net wrote: Yes, it's one things that data families do. Another is introducing *new* data types rather than reusing existing

Re: building ghc-7.1.20110125 under Mac OS X

2011-01-31 Thread Daniel Peebles
The -march=-i686 issue was fixed in the past couple of days, so I'd just grab a newer version. Not sure about the 64-bit question, though. -Dan On Tue, Feb 1, 2011 at 6:50 AM, Pavel Perikov peri...@gmail.com wrote: hi list. i have to build ghc-7.1.20110125 under mac os x, so i grabbed the

Re: RFC: migrating to git

2011-01-10 Thread Daniel Peebles
I fully support this (especially if it lived on github), but we should probably sort the top contributors to GHC in the past year or so and consider their opinions on the matter in that order :) I certainly would not be on that list. A git(hub)-based workflow would however facilitate any minor

Re: RFC: migrating to git

2011-01-10 Thread Daniel Peebles
So the basic point seems to be: if you know how to use a tool, you don't usually curse and swear when you use it. If you don't, you tend to swear a lot! :) On Mon, Jan 10, 2011 at 5:32 PM, Adam Wick aw...@galois.com wrote: On 01/10/2011 08:52 AM, Malcolm Wallace wrote: If I were considering

Re: Removing/deprecating -fvia-c

2010-02-14 Thread Daniel Peebles
I thought GHC's own codegen didn't do any instruction reordering for the pipeline. I guess that ends up not being much of an issue in practice? On Sun, Feb 14, 2010 at 12:58 PM, Don Stewart d...@galois.com wrote: igloo: Hi all, We are planning to remove the -fvia-c way of compiling code

Re: Compiling to ANSI C

2009-11-07 Thread Daniel Peebles
You can use -fvia-C and -keep-hc-files but the generated C code is pretty platform-dependent (at least in terms of word sizes and so on... it may be possible to port across platforms with the same word sizes?), and probably won't help you cross-compile. It also doesn't look much like any c code

Re: STM experiment

2009-10-02 Thread Daniel Peebles
Hi Luca, Just in case you weren't aware of it, your example didn't actually contain any STM (beyond the import), just regular Haskell IO-based concurrency. But the answer to your question is that there's no synchronization on writing to a file descriptor, so both threads are simultaneously

Re: Choosing implementation depending on class instances using rewriting rules

2009-06-03 Thread Daniel Peebles
This isn't necessarily correct, is it? An equality-based (n^2) nub works fine on infinite lists, whereas any O(n log n) sort-based nub must necessarily evaluate the entire list before being able to return the value. The original n^2 nub also returns the elements in the order of their first

Re: No last core parallel slowdown on OS X

2009-04-18 Thread Daniel Peebles
That looks great! I wonder what about Mac OS leads to such good performance... Now if only we could get a nice x86_64-producing GHC for Mac OS too, I could use all my RAM and the extra registers my Mac Pro gives me :) On Sat, Apr 18, 2009 at 2:39 PM, Dave Bayer ba...@cpw.math.columbia.edu wrote: