Re: [Haskell-cafe] Race condition possible?

2009-02-13 Thread Bulat Ziganshin
Hello Peter, Friday, February 13, 2009, 2:17:52 AM, you wrote: If so, how would it be possible to make sure that the operation of reading the current time and writing the pair to the MVar is an atomic operation, in the sense that no thread switch can happen between the two? Would this

Re: [Haskell-cafe] Re: Delimited continuations: please comment

2009-02-13 Thread Cristiano Paris
On Fri, Feb 13, 2009 at 2:05 AM, Chung-chieh Shan ccs...@post.harvard.edu wrote: ... It's not unheard of for the scheduler to react in different ways to the same system call -- I'm thinking of reading from a file, for example. Sure, I went implementing something slitghtly different to double

Re: [Haskell-cafe] Another point-free question (=, join, ap)

2009-02-13 Thread Edsko de Vries
Hey, Thanks for all the suggestions. I was hoping that there was some uniform pattern that would extend to n arguments (rather than having to use liftM2, litM3, etc. or have different 'application' operators in between the different arguments); perhaps not. Oh well :) Thanks again! Edsko

Re: [Haskell-cafe] How to deal with utf-8?

2009-02-13 Thread Duncan Coutts
On Fri, 2009-02-13 at 08:33 +0100, Krzysztof Skrzętnicki wrote: On Fri, Feb 13, 2009 at 08:06, Magicloud magicloud.magiclo...@gmail.com wrote: Hi, I am using Text.CSV to read and using gtk2hs to display csv files using utf-8 encode. Well, it displays broken strings, seems like it cannot

Re: [Haskell-cafe] Race condition possible?

2009-02-13 Thread Duncan Coutts
On Thu, 2009-02-12 at 22:58 -0500, David Menendez wrote: On Thu, Feb 12, 2009 at 6:26 PM, Don Stewart d...@galois.com wrote: bugfact: Consider the following code stamp v x = do t - getCurrentTime putMVar v (x,t) Is it possible - with GHC - that a thread switch happens after

[Haskell-cafe] Re: Haddock Markup

2009-02-13 Thread Heinrich Apfelmus
Jonathan Cast wrote: NB: This example is *precisely* why I will never adopt MathML as an authoring format. Bowing and scraping at the alter of W3C is not worth using such a terrible syntax, not ever. (Indented, that's math mrow msup mix/mi mn2/mn

[Haskell-cafe] parallelism or concurrency ? if they are different

2009-02-13 Thread Paolino
When I came to haskell, I arrived with a small and only evolutionary background in programming. First monad I met was MonadState StdGen m. Everything was in someway acceptable, I had no problem in explicitating the need for the generator. The lesson was referential transparency. To me referential

Re: [Haskell-cafe] Overloading functions based on arguments?

2009-02-13 Thread Eugene Kirpichov
class Foobar a b where foobar :: a - b - Int instance Foobar String Int where ... instance Foobar Int String where ... 2009/2/13 Daniel Kraft d...@domob.eu: Hi, I just came across a problem like this: Suppose I've got two related functions that do similar things, and I want to call them

Re: [Haskell-cafe] Overloading functions based on arguments?

2009-02-13 Thread Colin Adams
If you have two functions that do two different things, then they certainly OUGHT to have different names. You can of course put the two functions in different modules. Then they do have different (qualified) names. 2009/2/13 Daniel Kraft d...@domob.eu: Hi, I just came across a problem like

[Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Daniel Kraft
Colin Adams wrote: If you have two functions that do two different things, then they certainly OUGHT to have different names. Well, they do the same thing but for different arguments; it's like this: Table is a table of name-value pairs I want to substitute in a tree-like structure using:

Re: [Haskell-cafe] Overloading functions based on arguments?

2009-02-13 Thread Duncan Coutts
On Fri, 2009-02-13 at 13:25 +0300, Eugene Kirpichov wrote: class Foobar a b where foobar :: a - b - Int instance Foobar String Int where ... instance Foobar Int String where ... But we typically do not to this. It's ugly. Classes work nicely when there is some kind of parametrisation

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread minh thu
2009/2/13 Daniel Kraft d...@domob.eu: Colin Adams wrote: If you have two functions that do two different things, then they certainly OUGHT to have different names. Well, they do the same thing but for different arguments; it's like this: Table is a table of name-value pairs I want to

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Neil Mitchell
Hi Table is a table of name-value pairs I want to substitute in a tree-like structure using: substitute :: Table - Tree - Tree For substituting a single name-value pair I want to define this utitlity routine so I don't have to construct a Table all the time in the user code: substitute

Re: [Haskell-cafe] Race condition possible?

2009-02-13 Thread Peter Verswyvelen
Ah yes, then you're doing a double handshaking in a sense, of course. Not ideal if you just want to put something in the MVar and resume as quick as possible. However, in that case one could fork a dummy thread that only does readMVar I guess. But does it also work when you want multiple threads

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread George Pollard
On Fri, 2009-02-13 at 11:40 +0100, Daniel Kraft wrote: Colin Adams wrote: If you have two functions that do two different things, then they certainly OUGHT to have different names. Well, they do the same thing but for different arguments; it's like this: Table is a table of name-value

[Haskell-cafe] Overloading functions based on arguments?

2009-02-13 Thread Daniel Kraft
Hi, I just came across a problem like this: Suppose I've got two related functions that do similar things, and I want to call them the same... Like in: foobar :: String - Int - Int foobar :: Int - String - Int (Bad example, but I hope you got the point.) Is this kind of overloading

[Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Daniel Kraft
Daniel Kraft wrote: Is this kind of overloading (instead of the polymorphism based overloading) possible in Haskell? Namely to have two functions with the same name but different signatures so they could be distinguished by a call's parameters? I fear not... So I guess I have to name the

[Haskell-cafe] Help needed with apache config for hackage

2009-02-13 Thread Duncan Coutts
Hi folks, Does anyone have any experience with apache configuration, particularly mime types and handling browser quirks and would like to help us with an issue we have on hackage? http://hackage.haskell.org/trac/hackage/ticket/498 The problem is described in the ticket but basically IE6 gets

Re: [Haskell-cafe] Help needed with apache config for hackage

2009-02-13 Thread George Pollard
On Fri, 2009-02-13 at 10:58 +, Duncan Coutts wrote: Hi folks, Does anyone have any experience with apache configuration, particularly mime types and handling browser quirks and would like to help us with an issue we have on hackage? http://hackage.haskell.org/trac/hackage/ticket/498

Re: [Haskell-cafe] Help needed with apache config for hackage

2009-02-13 Thread Duncan Coutts
On Fri, 2009-02-13 at 22:39 +1100, George Pollard wrote: On Fri, 2009-02-13 at 10:58 +, Duncan Coutts wrote: Hi folks, Does anyone have any experience with apache configuration, particularly mime types and handling browser quirks and would like to help us with an issue we have on

[Haskell-cafe] Language popularity

2009-02-13 Thread Henk-Jan van Tuyl
Yesterday I saw Haskell mentioned for the first time in a magazine, Bits Chips. It is a magazine for professionals, about hardware and software; the article was about the domain specific language Cryptol from Galois. In the same issue of the magazine, there was an article saying that the

Re: [Haskell-cafe] Language popularity

2009-02-13 Thread Robin Green
On Fri, 13 Feb 2009 15:52:48 +0100 Henk-Jan van Tuyl hjgt...@chello.nl wrote: Yesterday I saw Haskell mentioned for the first time in a magazine, Bits Chips. It is a magazine for professionals, about hardware and software; the article was about the domain specific language Cryptol from

Re: [Haskell-cafe] Changing version numbering schemes for HackageDB packages?

2009-02-13 Thread Henning Thielemann
Corey O'Connor wrote: I released a new version of data-spacepart that resolved some of the issues with the previous release. One issue I had was the previous release used the version numbering scheme I use at work: [date].[release] Which does not appear to work as well as the traditional X.Y.Z

Re: [Haskell-cafe] Haskell.org GSoC

2009-02-13 Thread Henning Thielemann
Daniel Kraft wrote: Hi, I noticed last year Haskell.org was a mentoring organization for Google's Summer of Code, and I barely noticed some discussion about it applying again this year :) I participated for GCC in 2008 and would like to try again this year; while I'm still active for GCC

Re: [Haskell-cafe] Another point-free question (=, join, ap)

2009-02-13 Thread Conor McBride
Hi Edsko On 13 Feb 2009, at 09:14, Edsko de Vries wrote: Hey, Thanks for all the suggestions. I was hoping that there was some uniform pattern that would extend to n arguments (rather than having to use liftM2, litM3, etc. or have different 'application' operators in between the

[Haskell-cafe] Haskell.org GSoC - Haskell for Math type setting

2009-02-13 Thread Henning Thielemann
I think the recent discussion about advanced markup for Haddock documentation could yield a Summer of code project. I still like my suggestion to use Haskell code as description for math formulas and I like Wolfgang's idea to use an existing tool like Template Haskell for conversion from

Re: [Haskell-cafe] Overloading functions based on arguments?

2009-02-13 Thread Henning Thielemann
Daniel Kraft wrote: Hi, I just came across a problem like this: Suppose I've got two related functions that do similar things, and I want to call them the same... Like in: foobar :: String - Int - Int foobar :: Int - String - Int (Bad example, but I hope you got the point.)

Re: [Haskell-cafe] Re: Haddock Markup

2009-02-13 Thread Jonathan Cast
On Fri, 2009-02-13 at 11:08 +0100, Heinrich Apfelmus wrote: Jonathan Cast wrote: NB: This example is *precisely* why I will never adopt MathML as an authoring format. Bowing and scraping at the alter of W3C is not worth using such a terrible syntax, not ever. (Indented, that's

[Haskell-cafe] createProcess shutting file handles

2009-02-13 Thread Neil Mitchell
Hi, I want to run multiple programs and dump the stdout/stderr to a file, I've tried doing: h - openFile file WriteMode let c = CreateProcess (RawCommand file []) Nothing Nothing Inherit (UseHandle h) (UseHandle h) False (_,_,_,pid)

Re: [Haskell-cafe] Language popularity

2009-02-13 Thread Henning Thielemann
Robin Green wrote: I think we can fairly safely discount the commercial relevance of any language ranking which places LOGO so highly. It may be that a lot of people *know* LOGO (or claim to know it), but that does not mean that is used a lot for commercial programming. If we discuss here

[Haskell-cafe] Re: Haskell.org GSoC

2009-02-13 Thread Daniel Kraft
Hi, Henning Thielemann wrote: Daniel Kraft wrote: I noticed last year Haskell.org was a mentoring organization for Google's Summer of Code, and I barely noticed some discussion about it applying again this year :) I participated for GCC in 2008 and would like to try again this year; while

Re: [Haskell-cafe] Re: Haskell.org GSoC

2009-02-13 Thread Henning Thielemann
On Fri, 13 Feb 2009, Daniel Kraft wrote: Henning Thielemann wrote: DoCon? hm, I've only read a little on their webpage; what I was thinking of was to implement a very basic package just to do some symbolic integration or equation solving to be embedded in some other calculation, and

[Haskell-cafe] Possible bug?

2009-02-13 Thread Peter Verswyvelen
Could it be considered a bug when a function compiles fine without type signature, but when you add the type signature that GHCi reports with :type, it fails to compile? I am using functional dependencies, and I know these are not the best way to do it. Can all functional dependencies be

[Haskell-cafe] Re: Haddock Markup

2009-02-13 Thread Achim Schneider
What about making a SoC out of the problem? A mathematical markup language that is easily written as well as valid Haskell, executable within reason, compilable into mathML (think backticks) and would revolutionise the typeset quality of literate programming? -- (c) this sig last receiving data

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread John A. De Goes
Chances are the program you're using to write your e-mails was written in C++ (or at least C), so don't knock it. :-) In any case, no one has really addressed the original poster's question: No, name overloading is not possible in Haskell, and surprisingly, there are no blocking

Re: [Haskell-cafe] Another point-free question (=, join, ap)

2009-02-13 Thread Thomas Davie
Hey, Thanks for all the suggestions. I was hoping that there was some uniform pattern that would extend to n arguments (rather than having to use liftM2, litM3, etc. or have different 'application' operators in between the different arguments); perhaps not. Oh well :) Sure you can!

Re: [Haskell-cafe] Re: Haddock Markup

2009-02-13 Thread Henning Thielemann
On Fri, 13 Feb 2009, Achim Schneider wrote: What about making a SoC out of the problem? A mathematical markup language that is easily written as well as valid Haskell, executable within reason, compilable into mathML (think backticks) and would revolutionise the typeset quality of literate

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Henning Thielemann
On Fri, 13 Feb 2009, John A. De Goes wrote: In any case, no one has really addressed the original poster's question: No, name overloading is not possible in Haskell, and surprisingly, there are no blocking technical issues why this must be the case. Prefixing names with module names is good

[Haskell-cafe] Class Instances

2009-02-13 Thread Cetin Sert
Hi, class Processor a where ready :: (forall b c. a → [b → c]) {- instance Processor (b → c) where ready = repeat instance Processor [b → c] where ready = id-} doSth :: (Show p, Processor p) ⇒ p → IO () doSth p = print p --- Why can I not declare the above

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread John A. De Goes
The signal-to-noise ratio with fully qualified names/operators goes way down -- that's the need. Go take one of your programs and fully qualify every name and every operator. Doesn't look so pretty then, does it? And it wouldn't be easy to read, either. Regards, John A. De Goes

Re: [Haskell-cafe] Possible bug?

2009-02-13 Thread Martijn van Steenbergen
Peter Verswyvelen wrote: Could it be considered a bug when a function compiles fine without type signature, but when you add the type signature that GHCi reports with :type, it fails to compile? Can you share with us your function and the compiler error, or a small test case and the compiler

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Neil Mitchell
Hi Chances are the program you're using to write your e-mails was written in C++ (or at least C), so don't knock it. :-) Firefox (Javascript + C++) and Gmail (Python, so I think I read, no doubt with C underneath somewhere). However, I am sat writing C++ at the moment - which I think gives me

Re: [Haskell-cafe] Possible bug?

2009-02-13 Thread Tillmann Rendel
Peter Verswyvelen wrote: Could it be considered a bug when a function compiles fine without type signature, but when you add the type signature that GHCi reports with :type, it fails to compile? There are such cases where it is not a bug. For example, given import Data.Map (fromList) x

Re: [Haskell-cafe] Possible bug?

2009-02-13 Thread Peter Verswyvelen
Ouch, how silly of me, I did not make a backup and have been fiddling with the code and now it works. Next time I make sure I'll make backup, sorry about that. On Fri, Feb 13, 2009 at 5:45 PM, Martijn van Steenbergen mart...@van.steenbergen.nl wrote: Peter Verswyvelen wrote: Could it be

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread minh thu
Why do you say every name and operator ? Why do you say fully qualified ? When there is some clash, hiding the offending name or importing qualified as is quite satisfying imho. Thu 2009/2/13 John A. De Goes j...@n-brain.net: The signal-to-noise ratio with fully qualified names/operators goes

[Haskell-cafe] IO semantics and evaluation - summary

2009-02-13 Thread Gregg Reynolds
Many thanks to everybody who tried to set me straight on the thread about IO monad and evaluation semantics. I've begun summarizing the info, and I believe I've come up with a much better way of explaining IO; just flip the semantic perspective, and think in terms of interpretations instead of

Re: [Haskell-cafe] Possible bug?

2009-02-13 Thread Peter Verswyvelen
No the error I got was Could not deduce (Controller m v c) from the context (Controller m v c2) arising from a use of `MVC' at NM8\GUI\PanZoom.hs:126:32-65 Possible fix: add (Controller m v c) to the context of the constructor `MVC' In the expression: MVC m v (PZC s z

Re: [Haskell-cafe] createProcess shutting file handles

2009-02-13 Thread Jeremy Shaw
Hello, As far as I can tell, createProcess is closing the handle: createProcess :: CreateProcess - IO (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) createProcess cp = do r - runGenProcess_ runGenProcess cp Nothing Nothing maybeCloseStd (std_in cp) maybeCloseStd (std_out

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread John A. De Goes
I come from a mathematical background (in which it is quite common to overload function names and operators in particular), so from my point of view, the lack of name overloading is a wart on Haskell. That such a feature would complicate type inference is more a concern to an

Re: [Haskell-cafe] Language popularity

2009-02-13 Thread Ketil Malde
Henk-Jan van Tuyl hjgt...@chello.nl writes: My own research, using Google: Search Hits --- Java programming 20.400.000 LOGO programming 14.600.000 I get about that number of hits googling for logo programming (without quotes). However,

[Haskell-cafe] Re: Class Instances

2009-02-13 Thread Benedikt Huber
Cetin Sert schrieb: Hi, class Processor a where ready :: (forall b c. a → [b → c]) instance Processor (b → c) where ready = repeat ... --- Why can I not declare the above instances and always get: Hi Cetin, in your class declaration you state that a

[Haskell-cafe] Re: Language popularity

2009-02-13 Thread Achim Schneider
Ketil Malde ke...@malde.org wrote: Henk-Jan van Tuyl hjgt...@chello.nl writes: My own research, using Google: Search Hits --- Java programming 20.400.000 LOGO programming 14.600.000 I get about that number of hits googling for logo

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Jonathan Cast
On Fri, 2009-02-13 at 11:12 -0700, John A. De Goes wrote: I come from a mathematical background (in which it is quite common to overload function names and operators in particular) Usually `when no ambiguity can arise', no? Plenty of mathematical practice rests on imprecision and the

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread John A. De Goes
On Feb 13, 2009, at 11:23 AM, Jonathan Cast wrote: Usually `when no ambiguity can arise', no? Plenty of mathematical practice rests on imprecision and the expectation that the human reader will understand what you mean. Haskell has to be understandable by the machine (which is less

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Jonathan Cast
On Fri, 2009-02-13 at 11:29 -0700, John A. De Goes wrote: On Feb 13, 2009, at 11:23 AM, Jonathan Cast wrote: Usually `when no ambiguity can arise', no? Plenty of mathematical practice rests on imprecision and the expectation that the human reader will understand what you mean. Haskell

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread John A. De Goes
On Feb 13, 2009, at 11:32 AM, Jonathan Cast wrote: I believe the last time it was brought up, the proposal was that type inference should fail on certain typeable terms. That doesn't count. I'm referring to a rather conservative proposal wherein if there is one and exactly one definition

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Jonathan Cast
On Fri, 2009-02-13 at 11:45 -0700, John A. De Goes wrote: On Feb 13, 2009, at 11:32 AM, Jonathan Cast wrote: I believe the last time it was brought up, the proposal was that type inference should fail on certain typeable terms. That doesn't count. I'm referring to a rather conservative

[Haskell-cafe] Re: Class Instances

2009-02-13 Thread Cetin Sert
module Main where import Control.Monad import Control.Concurrent class Processor p where ready :: p b c → [b → c] instance Processor (→) where ready = repeat --instance Processor [b → c] where --ready = id newtype FunList b c = FunList [b → c] instance Processor FunList where ready

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Daniel Fischer
Am Freitag, 13. Februar 2009 19:49 schrieb Jonathan Cast: On Fri, 2009-02-13 at 11:45 -0700, John A. De Goes wrote: On Feb 13, 2009, at 11:32 AM, Jonathan Cast wrote: I believe the last time it was brought up, the proposal was that type inference should fail on certain typeable terms.

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread John A. De Goes
On Feb 13, 2009, at 11:49 AM, Jonathan Cast wrote: It breaks type inference. I explained this at the time. I can explain it again: import Data.List import Data.Set import Data.Map warmFuzzyThingFirstOperation = map This gives an error currently. Quite properly. But if *any* use of

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Jonathan Cast
On Fri, 2009-02-13 at 20:06 +0100, Daniel Fischer wrote: Am Freitag, 13. Februar 2009 19:49 schrieb Jonathan Cast: On Fri, 2009-02-13 at 11:45 -0700, John A. De Goes wrote: On Feb 13, 2009, at 11:32 AM, Jonathan Cast wrote: I believe the last time it was brought up, the proposal was that

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Jonathan Cast
On Fri, 2009-02-13 at 12:06 -0700, John A. De Goes wrote: On Feb 13, 2009, at 11:49 AM, Jonathan Cast wrote: It breaks type inference. I explained this at the time. I can explain it again: import Data.List import Data.Set import Data.Map warmFuzzyThingFirstOperation =

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Conal Elliott
Hi Daniel, A more functional approach might be: type Substitution = String - Maybe Value single :: String - Value - Substitution table :: Table - Substitution substitute :: Substitution - Tree - Tree For better performance and a lot more features, you could switch to type

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread John A. De Goes
On Feb 13, 2009, at 12:07 PM, Jonathan Cast wrote: Exactly! But if it fails, why on earth should any other use of map in the module succeed? Because more information is known about other usages of map. Such is the nature of type inference. If you wanted to go a step further, then I

[Haskell-cafe] Re: Class Instances

2009-02-13 Thread Benedikt Huber
Cetin Sert schrieb: Thank you for your answer! This comes close to solving the problem but in the last line of the above I want to be able to say: either print $ broadcast id [1..10] or print $ broadcast [ (x +) | x ← [1..10] ] [1..10] both need to be possible*. So is there

Re: [Haskell-cafe] IO semantics and evaluation - summary

2009-02-13 Thread Daryoush Mehrtash
I have been trying to figure out the distinction between value, function and computation. You raised a few points that I am not sure about. In Computation considered harmful. Value not so hot either. you said: I still don't like it; a lambda expression is not a computation, it's a formal

Re: [Haskell-cafe] IO semantics and evaluation - summary

2009-02-13 Thread Roman Cheplyaka
* Daryoush Mehrtash dmehrt...@gmail.com [2009-02-13 11:31:06-0800] Isn't the lambda expression a representation of something (potentially with recursion) that yields a value and not the value itself? The same terms may refer to different notions. If you think of values as mathematical

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Jonathan Cast
On Fri, 2009-02-13 at 12:15 -0700, John A. De Goes wrote: On Feb 13, 2009, at 12:07 PM, Jonathan Cast wrote: Exactly! But if it fails, why on earth should any other use of map in the module succeed? Because more information is known about other usages of map. Such is the nature of type

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread John A. De Goes
In your own subjective opinion, which is not shared by many other Haskellers, myself included. Regards, John A. De Goes N-BRAIN, Inc. The Evolution of Collaboration http://www.n-brain.net|877-376-2724 x 101 On Feb 13, 2009, at 1:08 PM, Jonathan Cast wrote: On Fri, 2009-02-13 at

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Daniel Fischer
Am Freitag, 13. Februar 2009 20:06 schrieb Jonathan Cast: On Fri, 2009-02-13 at 20:06 +0100, Daniel Fischer wrote: Am Freitag, 13. Februar 2009 19:49 schrieb Jonathan Cast: It breaks type inference. I explained this at the time. I can explain it again: import Data.List

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread David Menendez
On Fri, Feb 13, 2009 at 1:29 PM, John A. De Goes j...@n-brain.net wrote: On Feb 13, 2009, at 11:23 AM, Jonathan Cast wrote: Usually `when no ambiguity can arise', no? Plenty of mathematical practice rests on imprecision and the expectation that the human reader will understand what you mean.

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread John A. De Goes
On Feb 13, 2009, at 1:38 PM, Daniel Fischer wrote: ? Well, still easy, we must unify with (a - b) - c - [d], only one possibility, fine. Or is it? What if we have another 'take' in scope? Say take :: Int - Set a - Set a ? Oops. So, where draw the line? You draw the line exactly when you cannot

Re: [Haskell-cafe] createProcess shutting file handles

2009-02-13 Thread Duncan Coutts
On Fri, 2009-02-13 at 15:38 +, Neil Mitchell wrote: What have I done wrong? Did createProcess close the handle, and is there a way round this? The docs for runProcess says: Any Handles passed to runProcess are placed immediately in the closed state. but the equivalent

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Daniel Fischer
Am Freitag, 13. Februar 2009 21:08 schrieb Jonathan Cast: On Fri, 2009-02-13 at 12:15 -0700, John A. De Goes wrote: On Feb 13, 2009, at 12:07 PM, Jonathan Cast wrote: Exactly! But if it fails, why on earth should any other use of map in the module succeed? Because more information is

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Jonathan Cast
On Fri, 2009-02-13 at 21:57 +0100, Daniel Fischer wrote: Am Freitag, 13. Februar 2009 21:08 schrieb Jonathan Cast: On Fri, 2009-02-13 at 12:15 -0700, John A. De Goes wrote: On Feb 13, 2009, at 12:07 PM, Jonathan Cast wrote: Exactly! But if it fails, why on earth should any other use of

[Haskell-cafe] Re: Complex C99 type in Foreign

2009-02-13 Thread Aaron Denney
On 2009-02-03, Maurí­cio briqueabra...@yahoo.com wrote: Are there plans to include C99 'complex' type in Foreign, maybe as CFloatComplex, CDoubleComplex A separate library for new types to add to Foreign would be the easiest way forward. Just put the foreign-c99 package on Hackage? (...) I

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread John A. De Goes
On Feb 13, 2009, at 2:11 PM, Jonathan Cast wrote: The compiler should fail when you tell it two mutually contradictory things, and only when you tell it two mutually contradictory things. By definition, it's not a contradiction when the symbol is unambiguously typeable. Do you think math

Re: [Haskell-cafe] IO semantics and evaluation - summary

2009-02-13 Thread Gregg Reynolds
Hi Daryoush, 2009/2/13 Daryoush Mehrtash dmehrt...@gmail.com I have been trying to figure out the distinction between value, function and computation. You raised a few points that I am not sure about. In Computation considered harmful. Value not so hot either. you said: I still

Re: [Haskell-cafe] Help needed with apache config for hackage

2009-02-13 Thread George Pollard
On Fri, 2009-02-13 at 12:19 +, Duncan Coutts wrote: Can we do that just for one user agent? I don't think we want to use non-standard stuff in general. Apparently Content-Disposition is not in the official HTTP spec, but IE is known to follow it. It's not in the HTTP spec, but it's about

Re: [Haskell-cafe] IO semantics and evaluation - summary

2009-02-13 Thread roconnor
I also recommend reading http://www.haskell.org/haskellwiki/IO_Semantics (mostly because I wrote it). Feel free to improve upon it. -- Russell O'Connor http://r6.ca/ ``All talk about `theft,''' the general counsel of the American Graphophone Company wrote,

[Haskell-cafe] Infinite types should be optionally allowed

2009-02-13 Thread Job Vranish
There are good reasons against allowing infinite types by default (mostly, that a lot of things type check that are normally not what we want). An old haskell cafe conversation on the topic is here: http://www.nabble.com/There%27s-nothing-wrong-with-infinite-types!-td7713737.html However, I think

Re: [Haskell-cafe] Semantic web

2009-02-13 Thread Doug Burke
- Original Message From: Don Stewart d...@galois.com To: gregg reynolds d...@mobileink.com Cc: haskell-cafe@haskell.org Sent: Saturday, February 7, 2009 2:40:41 PM Subject: Re: [Haskell-cafe] Semantic web dev: Anybody implementing rdf or owl stuff in haskell? Seems like a

Re: [Haskell-cafe] Infinite types should be optionally allowed

2009-02-13 Thread Luke Palmer
On Fri, Feb 13, 2009 at 3:13 PM, Job Vranish jvran...@gmail.com wrote: There are good reasons against allowing infinite types by default (mostly, that a lot of things type check that are normally not what we want). An old haskell cafe conversation on the topic is here:

Re: [Haskell-cafe] Infinite types should be optionally allowed

2009-02-13 Thread Luke Palmer
On Fri, Feb 13, 2009 at 4:04 PM, Luke Palmer lrpal...@gmail.com wrote: On Fri, Feb 13, 2009 at 3:13 PM, Job Vranish jvran...@gmail.com wrote: There are good reasons against allowing infinite types by default (mostly, that a lot of things type check that are normally not what we want). An old

[Haskell-cafe] Re: Complex C99 type in Foreign

2009-02-13 Thread Maurí­cio
Are there plans to include C99 'complex' type in Foreign, maybe as CFloatComplex, CDoubleComplex A separate library for new types to add to Foreign would be the easiest way forward. Just put the foreign-c99 package on Hackage? (...) I could actually have some arbitrary sized parameter as

Re: [Haskell-cafe] Delimited continuations: please comment

2009-02-13 Thread Brandon S. Allbery KF8NH
On 2009 Feb 12, at 11:55, Cristiano Paris wrote: import Control.Monad.Trans -- why do I have to import this? liftIO is defined there, I believe. Many of the monad modules re- export it with their MonadTrans definitions, but apparently Control.Monad.CC doesn't so you need to go to the

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Krzysztof Skrzętnicki
On Fri, Feb 13, 2009 at 22:37, John A. De Goes j...@n-brain.net wrote: On Feb 13, 2009, at 2:11 PM, Jonathan Cast wrote: The compiler should fail when you tell it two mutually contradictory things, and only when you tell it two mutually contradictory things. By definition, it's not a

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Robert Greayer
-- John A. De Goes wrote: Adding information cannot remove a contradiction from the information set available to the compiler. But it can and often does, for example, for [] or 4. What's the type of either expression without more information? [] :: [a] 4 :: Num a = a Do I win something?

Re: [Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Ketil Malde
John A. De Goes j...@n-brain.net writes: I'm referring to a rather conservative proposal wherein if there is one and exactly one definition that allows an expression to type, then name overloading in the same scope is permitted. Perhaps this was discussed in the context of records and field