Re: [Haskell-cafe] Re: HTTP client libraries

2008-03-30 Thread Adam Langley
On Fri, Mar 28, 2008 at 6:40 AM, John Goerzen [EMAIL PROTECTED] wrote: Your Source type is an interesting approach, too. I'm still not sure if it's actually a good idea. But if you do have any requests, I'm very open to them. I think that a fetchBasic which walks redirects would be a good start

[Haskell-cafe] ANNOUNCE: xmonad 0.7 released

2008-03-30 Thread Don Stewart
http://xmonad.org The xmonad dev team is pleased to announce xmonad 0.7! The headlines: The 0.7 release of xmonad provides several improvements over 0.6, including improved integration with GNOME, more flexible rules, various stability fixes, and of

Re: [Haskell-cafe] Equality constraints in type families

2008-03-30 Thread Manuel M T Chakravarty
Hugo Pacheco: Yes, but doesn't the confluence problem only occur for type synonyms that ignore one or more of the parameters? If so, this could be checked... You can't check this easily (for the general case). Given type family G a b type FList a x = G a x type instance F [a] =

Re: [Haskell-cafe] Equality constraints in type families

2008-03-30 Thread Hugo Pacheco
On Sun, Mar 30, 2008 at 3:54 AM, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: Hugo Pacheco: Yes, but doesn't the confluence problem only occur for type synonyms that ignore one or more of the parameters? If so, this could be checked... You can't check this easily (for the general

Re: [Haskell-cafe] Equality constraints in type families

2008-03-30 Thread Hugo Pacheco
Anyway, do you think it is feasible to have a flag such as -fallow-unsafe-type-families for users to use at their own risk? (supposing we know how to guarantee these constraints). I speak for my own, there are currently some nice thinks that I can only accomplish with partially applied type

Re: [Haskell-cafe] compilation succeeds -- execution fails

2008-03-30 Thread Jason Dusek
Bertram Felgenhauer [EMAIL PROTECTED] wrote: Jason Dusek wrote: It compiles fine and loads fine -- but it doesn't run fine: unknown symbol `___stginit_cedictzm0zi1zi1_DataziCharziCEDICTziMatter_' This is a cabal pitfall. Thank you -- this tip saved my bacon. -- _jsn

Re: [Haskell-cafe] compilation succeeds -- execution fails

2008-03-30 Thread Jason Dusek
Stefan O'Rear [EMAIL PROTECTED] wrote: The only type that you are allowed to assume corresponds to a C int is CInt, in the Foreign.C.Types module. This probably isn't the problem, but it could make problems of its own on a 64-bit or otherwise weird system. So say I turn everything back

[Haskell-cafe] announce: hgdbmi (GDB/MI interface)

2008-03-30 Thread Evan Martin
Just in case someone else needed this, here you go: GDB/MI lets programs drive GDB. It can be used, for example, by GDB frontends. This module wraps attaching GDB to a process and parsing the (surprisingly complicated) GDB/MI output.

Re: [Haskell-cafe] compilation succeeds -- execution fails

2008-03-30 Thread Stefan O'Rear
On Sat, Mar 29, 2008 at 10:21:32PM -0700, Jason Dusek wrote: Stefan O'Rear [EMAIL PROTECTED] wrote: The only type that you are allowed to assume corresponds to a C int is CInt, in the Foreign.C.Types module. This probably isn't the problem, but it could make problems of its own on a

Re: [Haskell-cafe] Parsec Expected Type

2008-03-30 Thread Tillmann Rendel
Paul Keir wrote: What I'd like is to parse either the string parameter, or the string :. I'm using 'reserved' and 'symbol' because they seem to correspond well to the concepts in the language I'm parsing. You may consider using reservedOp for :, depending on how :+ should be parsed:

Re: [Haskell-cafe] [GSoC] Porting HaRe to use the GHC API

2008-03-30 Thread Jules Bean
Chaddaï Fouché wrote: Comments, reactions ? You can also propose refactoring, if I complete the port early, I'll try to add some refactoring to HaRe. Comment: Yes please ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: HTTP client libraries

2008-03-30 Thread Iavor Diatchki
Hi, On Fri, Mar 28, 2008 at 6:42 AM, John Goerzen [EMAIL PROTECTED] wrote: On 2008-03-28, Don Stewart [EMAIL PROTECTED] wrote: paulrbrown+haskell-cafe: And we have a curl binding, already in wide use. http://code.haskell.org/curl.git/ a release to hackage is imminent. Do

Re: [Haskell-cafe] compilation succeeds -- execution fails

2008-03-30 Thread Claude Heiland-Allen
Jason Dusek wrote: Stefan O'Rear [EMAIL PROTECTED] wrote: The only type that you are allowed to assume corresponds to a C int is CInt, in the Foreign.C.Types module. This probably isn't the problem, but it could make problems of its own on a 64-bit or otherwise weird system. So say I

Re: [Haskell-cafe] compilation succeeds -- execution fails

2008-03-30 Thread Jonathan Cast
On 29 Mar 2008, at 10:21 PM, Jason Dusek wrote: Stefan O'Rear [EMAIL PROTECTED] wrote: The only type that you are allowed to assume corresponds to a C int is CInt, in the Foreign.C.Types module. This probably isn't the problem, but it could make problems of its own on a 64-bit or

Re: [Haskell-cafe] announce: Glome.hs raytracer

2008-03-30 Thread Ian Lynagh
On Thu, Mar 27, 2008 at 02:49:35AM +, Ian Lynagh wrote: On Wed, Mar 26, 2008 at 02:33:20PM -0700, Jim Snow wrote: -Memory consumption is atrocious: 146 megs to render a scene that's a 33k ascii file. Where does it all go? A heap profile reports the max heap size at a rather more

[Haskell-cafe] Announce: Decimal arithmetic package

2008-03-30 Thread Paul Johnson
I've just uploaded version 0.1.0 of a decimal arithmetic package to Hackage. Decimal numbers are stored as an Integral mantissa and a Word8 exponent, where the number stored is mantissa * 10^(-exponent). In other words the exponent is the number of decimal places stored. There are also

Re: [Haskell-cafe] Monad instance for Data.Set

2008-03-30 Thread Henning Thielemann
On Tue, 25 Mar 2008, Ryan Ingram wrote: settest :: S.Set Int settest = runSetM $ do x - mplus (mplus mzero (return 2)) (mplus (return 2) (return 3)) return (x+3) -- fromList [5,6] What this does under the hood is treat the computation on each element of the set separately, except at

[Haskell-cafe] Usage of Read Class

2008-03-30 Thread Simeon Mattes
Hello, I would like to ask something that results in when I have the following commands data Color = Red | Green | Blue | Indigo | Violet deriving (Enum,Show,Read) (read.show) x interactive:1:1: Ambiguous type variable `a' in the constraint: `Read a' arising from a use of `read' at

[Haskell-cafe] lexicographic order

2008-03-30 Thread Simeon Mattes
Hello everyone, I would like to ask something that I found in the ebook a Gentle Introduction to Haskell. http://haskell.org/tutorial/stdclasses.html#sect8.4 data Tree a = Leaf a | Branch (Tree a) (Tree a) instance (Ord a) = Ord (Tree a) where (Leaf _) = (Branch _) = True

Re: [Haskell-cafe] Usage of Read Class

2008-03-30 Thread Niklas Broberg
I would like to ask something that results in when I have the following commands data Color = Red | Green | Blue | Indigo | Violet deriving (Enum,Show,Read) (read.show) x interactive:1:1: Ambiguous type variable `a' in the constraint: `Read a' arising from a use of `read' at

Re: [Haskell-cafe] lexicographic order

2008-03-30 Thread Niklas Broberg
Although I have tried to make sense what lexicographic order means I haven't figured out. Maybe an example with a simple application of this would be helpful. To be honest I can't understand what the symbol = really means. = means less than or equal to. Normally, lexicograpic order is the

Re: [Haskell-cafe] lexicographic order

2008-03-30 Thread Bulat Ziganshin
Hello Simeon, Monday, March 31, 2008, 12:45:54 AM, you wrote: The latter specifies a lexicographic order: Constructors are ordered by the order of their appearance the data declaration, and the arguments of a constructor are compared from left to right. Although I have tried to make sense

Re: [Haskell-cafe] Usage of Read Class

2008-03-30 Thread Ariel J. Birnbaum
interactive:1:1: Ambiguous type variable `a' in the constraint: `Read a' arising from a use of `read' at interactive:1:1-4 Probable fix: add a type signature that fixes these type variable(s) What the error message says is, it doesn't know which type to read to. read has

Re[2]: [Haskell-cafe] lexicographic order

2008-03-30 Thread Bulat Ziganshin
Hello Bulat, Monday, March 31, 2008, 1:16:35 AM, you wrote: if you can compare chars and 'a' 'b', then *lists* of chars compared in lexicographic order will be aaa aab aab aba baa abb as it was mentioned by Niklas Broberg, the last sentence should be reversed: abb baa sorry for +1

Re: [Haskell-cafe] lexicographic order

2008-03-30 Thread Chaddaï Fouché
2008/3/30, Bulat Ziganshin [EMAIL PROTECTED]: although the last alternative, (Branch l r) = (Branch l' r') = l == l' r = r' || l = l' seems suspicious to me. isn't it the same as (Branch l r) = (Branch l' r') = l = l' Yes, it should be : (Branch l r) = (Branch l' r') = l l' ||

Re: [Haskell-cafe] compilation succeeds -- execution fails

2008-03-30 Thread Jason Dusek
Thanks for your answers, everybody. -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Monad instance for Data.Set

2008-03-30 Thread Ryan Ingram
On Sun, Mar 30, 2008 at 1:09 PM, Henning Thielemann [EMAIL PROTECTED] wrote: It's like working in the List monad mainly, collapsing duplicates from time to time, right? Sort of. You can look at it that way and get a basic understanding of what's going on. A slightly more accurate analysis

[Haskell-cafe] Possible to automatically determine typeclass membership?

2008-03-30 Thread Ryan Ingram
Is it possible in Haskell + GHC extensions to use reflection techniques to determine typeclass membership? I'm thinking of things like the following: Idea 1: data MaybeEq a = NoEq a | Eq a = HasEq a checkEq :: (some typeclass constraint) = a - MaybeEq a (such that checkEq x returns HasEq x

Re: [Haskell-cafe] Functional dependencies with Type Classes

2008-03-30 Thread Manuel M T Chakravarty
Henning Günther: suppose there are two (identical) classes: class Res a b | a - b where getRes :: a - b and class Res2 t where type Member t getRes2 :: t - Member t It is easy to automatically make every instance of Res2 an instance of res: instance Res2 a =

Re: [Haskell-cafe] Wumpus World

2008-03-30 Thread Richard A. O'Keefe
On 28 Mar 2008, at 10:59 pm, Benjamin L. Russell wrote: The commercial SICStus Prolog is also substantially more expensive (see http://www.sics.se/isl/sicstuswww/site/index.html), at 153 euros for a Personal License (see http://www.sics.se/isl/sicstuswww/site/order4.html). Prices for Academic,

Re: [Haskell-cafe] Equality constraints in type families

2008-03-30 Thread Manuel M T Chakravarty
Hugo Pacheco: Anyway, do you think it is feasible to have a flag such as -fallow- unsafe-type-families for users to use at their own risk? (supposing we know how to guarantee these constraints). Sorry, but it doesn't seem like a good idea to enable an unsound type system even by an

Re: [Haskell-cafe] [GSoC] Porting HaRe to use the GHC API

2008-03-30 Thread Bryan O'Sullivan
Chaddaï Fouché wrote: My proposal for the SoC is to port HaRe (its parsing and refactoring) to use the GHC API instead of Programmatica. This is an appealing idea, and it has the kind of tight scope that makes it plausible as a summer project. Excellent! b

[Haskell-cafe] Haskell job opening

2008-03-30 Thread Chris Smith
MindIQ Corporation is looking for a Haskell programmer. Details can be found at http://cdsmith.twu.net/jobposting.html. This isn't officially announced yet, but it will be in a few days. From the announcement: Why You Want This Job * You can program in Haskell and get a salary for it. * Work

Re: [Haskell-cafe] Re: SoC project: Python-Haskell bridge - request for feedback

2008-03-30 Thread gwern0
On 2008.03.27 14:07:23 -0700, Dan Weston [EMAIL PROTECTED] scribbled 0.7K characters: I did not see MissingPy on Hackage (presumably it would be next to MissingH?) Remember, Hackage is alphabetical by category and then by title; I personally would not stick MissingH in the Unclassified

Re: [Haskell-cafe] Possible to automatically determine typeclass membership?

2008-03-30 Thread jeff p
Hello, Is it possible in Haskell + GHC extensions to use reflection techniques to determine typeclass membership? I'm thinking of things like the following: I think the short answer is not in general; i.e. I don't think there is any way to access the members of an arbitrary typeclass (but