Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Ketil Malde
[EMAIL PROTECTED] writes: I suggest that you read something on 'quantum computing'. I guess I should disclaim the rest of my post right away: I don't know much about quantum anything, beyond what I read in the newspapers. Sorry. But: Concerning quanta, the simulation of quantum processes on

Re: [Haskell-cafe] An interesting monad: Prompt

2007-12-30 Thread Ryan Ingram
Currently, yes; I was experimenting with type families. But it's pretty simple to get it to compile on 6.6.1: - remove the {-# LANGUAGE #-} pragma and replace with {-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-} - change the class declaration for MonadPrompter from class Monad

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Miguel Mitrofanov
If I understand correctly, a quantum computer might solve problems in NP in polynomial time, which is assumed not to be possible for deterministic computers. No! Moreover, there is a hypothesis that the only problems quantum computer can solve in polynomial time are those that the usual

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Ryan Ingram
On 12/30/07, Miguel Mitrofanov [EMAIL PROTECTED] wrote: If I understand correctly, a quantum computer might solve problems in NP in polynomial time, which is assumed not to be possible for deterministic computers. No! Moreover, there is a hypothesis that the only problems quantum

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread ajb
G'day all. I think it was Ketil Malde who said: If I understand correctly, a quantum computer might solve problems in NP in polynomial time, which is assumed not to be possible for deterministic computers. Quoting Miguel Mitrofanov [EMAIL PROTECTED]: No! Moreover, there is a hypothesis

Re: [Haskell-cafe] Specializing classes with classes

2007-12-30 Thread Stuart Cook
On Dec 30, 2007 2:43 PM, Jake McArthur [EMAIL PROTECTED] wrote: Really? This code doesn't even really make any sense to me. In order to be an instance of Bar, t has to already be an instance of Foo, implying that the function hi is already defined for t. What would the function in this example

[Haskell-cafe] Quanta. Was: Wikipedia on first-class object

2007-12-30 Thread jerzy . karczmarczuk
Ketil Malde writes: I guess I should disclaim the rest of my post right away: I don't know much about quantum anything, beyond what I read in the newspapers. I answer here, but there were other contributions, of Ryan Ingram, Miguel Mitrofanov, and Andrew Bromage, which I acknowledge. People,

[Haskell-cafe] Type-system fun: a type-safe embedding of System F Lambda Calculus into Haskell

2007-12-30 Thread Ryan Ingram
(The full code used for this message is available at http://ryani.freeshell.org/haskell/systemf.hs) System F is the polymorphically typed lambda calculus. It is strongly typed but allows polymorphic functions like id. id is represented as follows: eId = EGamma A (ELam x TVar EVar) which

[Haskell-cafe] easy cabal tasks

2007-12-30 Thread Duncan Coutts
People are often unsure about where they can help out with Cabal. One thing we can do to make that easier is to point out smaller simpler tasks that people might like to have a go at. We have a list of tasks that are marked as easy or very easy: http://hackage.haskell.org/trac/hackage/report/13

[Haskell-cafe] Basic question concerning data constructors

2007-12-30 Thread Joost Behrends
Hello, perhaps i will make a wishlist of topics not dealt in the tutorials. Here is something i miss in each of them: notes at the semantics of data constructors. We read data Pair a b = Pair a b in YetAnotherHaskellTutorial. And that is all ! If we omit data here, this would be a silly

Re: [Haskell-cafe] Basic question concerning data constructors

2007-12-30 Thread Bulat Ziganshin
Hello Joost, Sunday, December 30, 2007, 5:24:59 PM, you wrote: data ClockTime = TOD Integer Integer it declares type with name ClockTime (which you may use on type signatures, other type declarations and so on) with one constructor TOD accepting two Integer values. the only way to construct

Re: [Haskell-cafe] Basic question concerning data constructors

2007-12-30 Thread Jake McArthur
On Dec 30, 2007, at 8:24 AM, Joost Behrends wrote: For adapting hws (one of the reasons for me to be here, not many languages have a native web server) to Windows i must work on time. In System.Time i found data ClockTime = TOD Integer Integer 2 questions arise here: Does this define TOD

RE: [Haskell-cafe] Quanta. Was: Wikipedia on first-class object

2007-12-30 Thread Peter Verswyvelen
That's why I like this group so much, very interesting stuff to read, even if it isn't about Haskell. The problem is that I understand only 1% of it, even if it is about Haskell ;-) Regarding this the universe is a turing machine: until a couple of years ago, I also was someone that believed

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Cristian Baboi
On Sat, 29 Dec 2007 21:12:21 +0200, Achim Schneider [EMAIL PROTECTED] wrote: Try writing a program that makes me say hello world as many times as you press my nose. Be careful what you wish for. :-) ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Cristian Baboi
On Sat, 29 Dec 2007 21:49:16 +0200, Jonathan Cast [EMAIL PROTECTED] wrote: On 29 Dec 2007, at 5:01 AM, Cristian Baboi wrote: By portable I mean: works on the same machine, with the same OS, but with different Haskell implementation. Ah, you can't. But, again, what are you trying to do?

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Daniel Fischer
Am Sonntag, 30. Dezember 2007 17:14 schrieb Cristian Baboi: On Sat, 29 Dec 2007 21:49:16 +0200, Jonathan Cast [EMAIL PROTECTED] wrote: On 29 Dec 2007, at 5:01 AM, Cristian Baboi wrote: By portable I mean: works on the same machine, with the same OS, but with different Haskell

[Haskell-cafe] Re: Quanta. Was: Wikipedia on first-class object

2007-12-30 Thread Achim Schneider
Peter Verswyvelen [EMAIL PROTECTED] wrote: Regarding this the universe is a turing machine: until a couple of years ago, I also was someone that believed that (A) the universe (and life) could be simulated by a computer, Yesss. Nice. A bit of Escher here: Imagine an instance of eval

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Jonathan Cast
On 30 Dec 2007, at 10:14 AM, Cristian Baboi wrote: On Sat, 29 Dec 2007 21:49:16 +0200, Jonathan Cast [EMAIL PROTECTED] wrote: On 29 Dec 2007, at 5:01 AM, Cristian Baboi wrote: By portable I mean: works on the same machine, with the same OS, but with different Haskell implementation.

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Cristian Baboi
On Sun, 30 Dec 2007 18:39:51 +0200, Jonathan Cast [EMAIL PROTECTED] wrote: On 30 Dec 2007, at 10:14 AM, Cristian Baboi wrote: On Sat, 29 Dec 2007 21:49:16 +0200, Jonathan Cast [EMAIL PROTECTED] wrote: On 29 Dec 2007, at 5:01 AM, Cristian Baboi wrote: By portable I mean: works on the

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Cristian Baboi
On Sun, 30 Dec 2007 18:34:08 +0200, Daniel Fischer [EMAIL PROTECTED] wrote: True, but again, what are you trying to do? I've already did what I was trying to do. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Jonathan Cast
On 30 Dec 2007, at 10:54 AM, Cristian Baboi wrote: On Sun, 30 Dec 2007 18:39:51 +0200, Jonathan Cast [EMAIL PROTECTED] wrote: On 30 Dec 2007, at 10:14 AM, Cristian Baboi wrote: On Sat, 29 Dec 2007 21:49:16 +0200, Jonathan Cast [EMAIL PROTECTED] wrote: On 29 Dec 2007, at 5:01 AM,

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Daniel Fischer
Am Sonntag, 30. Dezember 2007 17:55 schrieb Cristian Baboi: On Sun, 30 Dec 2007 18:34:08 +0200, Daniel Fischer [EMAIL PROTECTED] wrote: True, but again, what are you trying to do? I've already did what I was trying to do. Congrats. How? ___

[Haskell-cafe] The semantics of constructor patterns

2007-12-30 Thread Cristian Baboi
In section 4.3.3., chapter 4: Structured types and the semantics of pattern-matching, by S.Peyton Jones and Philip Wadler, there is this equation: Eval[[\(s p1 p2 ... pt).E]] (s a1 a2 ...at) = Eval[[\p1 ... \pt.E]] a1 ... at The text say: To apply \(s p1 ... pt).E to an argument A we

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Cristian Baboi
On Sun, 30 Dec 2007 19:10:44 +0200, Daniel Fischer [EMAIL PROTECTED] wrote: Am Sonntag, 30. Dezember 2007 17:55 schrieb Cristian Baboi: On Sun, 30 Dec 2007 18:34:08 +0200, Daniel Fischer [EMAIL PROTECTED] wrote: True, but again, what are you trying to do? I've already did what I was

Re: [Haskell-cafe] The semantics of constructor patterns

2007-12-30 Thread Jonathan Cast
On 30 Dec 2007, at 11:10 AM, Cristian Baboi wrote: In section 4.3.3., chapter 4: Structured types and the semantics of pattern-matching, by S.Peyton Jones and Philip Wadler, there is this equation: Eval[[\(s p1 p2 ... pt).E]] (s a1 a2 ...at) = Eval[[\p1 ... \pt.E]] a1 ... at The text

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Jonathan Cast
On 30 Dec 2007, at 11:12 AM, Cristian Baboi wrote: On Sun, 30 Dec 2007 19:10:44 +0200, Daniel Fischer [EMAIL PROTECTED] wrote: Am Sonntag, 30. Dezember 2007 17:55 schrieb Cristian Baboi: On Sun, 30 Dec 2007 18:34:08 +0200, Daniel Fischer [EMAIL PROTECTED] wrote: True, but again, what are

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Cristian Baboi
On Sun, 30 Dec 2007 19:02:11 +0200, Jonathan Cast [EMAIL PROTECTED] wrote: On 30 Dec 2007, at 10:54 AM, Cristian Baboi wrote: On Sun, 30 Dec 2007 18:39:51 +0200, Jonathan Cast [EMAIL PROTECTED] wrote: On 30 Dec 2007, at 10:14 AM, Cristian Baboi wrote: On Sat, 29 Dec 2007 21:49:16

Re: [Haskell-cafe] The semantics of constructor patterns

2007-12-30 Thread Cristian Baboi
On Sun, 30 Dec 2007 19:13:47 +0200, Jonathan Cast [EMAIL PROTECTED] wrote: On 30 Dec 2007, at 11:10 AM, Cristian Baboi wrote: In section 4.3.3., chapter 4: Structured types and the semantics of pattern-matching, by S.Peyton Jones and Philip Wadler, there is this equation: Eval[[\(s p1

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Jonathan Cast
On 30 Dec 2007, at 11:16 AM, Cristian Baboi wrote: On Sun, 30 Dec 2007 19:02:11 +0200, Jonathan Cast [EMAIL PROTECTED] wrote: On 30 Dec 2007, at 10:54 AM, Cristian Baboi wrote: On Sun, 30 Dec 2007 18:39:51 +0200, Jonathan Cast [EMAIL PROTECTED] wrote: On 30 Dec 2007, at 10:14 AM,

Re: [Haskell-cafe] The semantics of constructor patterns

2007-12-30 Thread Benja Fallenstein
Hi Cristian, On Dec 30, 2007 6:10 PM, Cristian Baboi [EMAIL PROTECTED] wrote: What I don't get it : (s a1 a2 ... at) must be the value of A in the semantic domain. Let call that value a. Then how can one know if a was built with (s a1 a2 ... at) and not with (egg b1 b2) ? Because the

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Cristian Baboi
On Sun, 30 Dec 2007 19:16:04 +0200, Jonathan Cast [EMAIL PROTECTED] wrote: If you want help, you would have an easier time getting it if you came here with /programming/ problems. Most of us enjoy programming quite a bit, and are eager to help with such, but this sort of thing is more of

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Cristian Baboi
On Sun, 30 Dec 2007 19:19:11 +0200, Jonathan Cast [EMAIL PROTECTED] wrote: When you can convince me that continuing this discussion will be of use /to the Haskell community/, I will until then, goodbye. I won't even try to do that. Goodbye. ___

Re: [Haskell-cafe] The semantics of constructor patterns

2007-12-30 Thread Cristian Baboi
Thank you. The thing is that when talking about the semantic of Prolog, one can choose any set as the semantic domain to start, and then a reason is given for choosing the Herbrand universe. On Sun, 30 Dec 2007 19:23:00 +0200, Benja Fallenstein [EMAIL PROTECTED] wrote: Hi Cristian, On

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Daniel Fischer
Am Sonntag, 30. Dezember 2007 18:16 schrieb Cristian Baboi: A simple question: Can you write the value of x to a file where x = (1:x) ? Not in finite time and space :) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Cristian Baboi
On Sun, 30 Dec 2007 20:00:05 +0200, Daniel Fischer [EMAIL PROTECTED] wrote: Am Sonntag, 30. Dezember 2007 18:16 schrieb Cristian Baboi: A simple question: Can you write the value of x to a file where x = (1:x) ? Not in finite time and space :) I used the word 'value' by mistake. A

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Daniel Fischer
Am Sonntag, 30. Dezember 2007 19:04 schrieb Cristian Baboi: On Sun, 30 Dec 2007 20:00:05 +0200, Daniel Fischer [EMAIL PROTECTED] wrote: Am Sonntag, 30. Dezember 2007 18:16 schrieb Cristian Baboi: A simple question: Can you write the value of x to a file where x = (1:x) ? Not in

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Cristian Baboi
On Sun, 30 Dec 2007 20:24:23 +0200, Daniel Fischer [EMAIL PROTECTED] wrote: Am Sonntag, 30. Dezember 2007 19:04 schrieb Cristian Baboi: On Sun, 30 Dec 2007 20:00:05 +0200, Daniel Fischer [EMAIL PROTECTED] wrote: Am Sonntag, 30. Dezember 2007 18:16 schrieb Cristian Baboi: A simple

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Daniel Fischer
Am Sonntag, 30. Dezember 2007 19:31 schrieb Cristian Baboi: On Sun, 30 Dec 2007 20:24:23 +0200, Daniel Fischer [EMAIL PROTECTED] wrote: Am Sonntag, 30. Dezember 2007 19:04 schrieb Cristian Baboi: On Sun, 30 Dec 2007 20:00:05 +0200, Daniel Fischer [EMAIL PROTECTED] wrote: Am Sonntag,

[Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Achim Schneider
Cristian Baboi [EMAIL PROTECTED] wrote: On Sun, 30 Dec 2007 20:00:05 +0200, Daniel Fischer [EMAIL PROTECTED] wrote: Am Sonntag, 30. Dezember 2007 18:16 schrieb Cristian Baboi: A simple question: Can you write the value of x to a file where x = (1:x) ? Not in finite time and

[Haskell-cafe] ReRe: Basic question concerning data constructors

2007-12-30 Thread Joost Behrends
Thanks to both fast answers. there remain problems with Jakes mail for me. This: When you define datatypes, you are essentially defining a type-level constructors on the left hand side and (value-level) constructors on the right hand side. is very useful for me. data defines TWO

Re: [Haskell-cafe] Basic question concerning data constructors

2007-12-30 Thread David Menendez
On Dec 30, 2007 9:24 AM, Joost Behrends [EMAIL PROTECTED] wrote: A similar point: The tutorials teach, that = has a similar meaning than = in mathematics. But there is a big difference: it is not reflexive. The the right side is the definition of the left. Thus x=y has still some kind of

[Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Achim Schneider
Cristian Baboi [EMAIL PROTECTED] wrote: module Module where a= let x=1:x in x main = do something to write a (a notation for a) to file The function must work if one change a to let x=2:x in x, let x=1:2:3:x and variations on the same theme. import GHC? you can even load it directly

Re: [Haskell-cafe] ReRe: Basic question concerning data constructors

2007-12-30 Thread Chaddaï Fouché
2007/12/30, Joost Behrends [EMAIL PROTECTED]: . Now, let's say we had tried defining ClockTime with parameters as you suggested. ClockTime' :: Integer - Integer - * Do you see the problem? In order to use the ClockTime type constructor, we would have to use Integer values.

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Chaddaï Fouché
2007/12/30, Cristian Baboi [EMAIL PROTECTED]: A simple question: Can you write the value of x to a file where x = (1:x) ? Yes, but you'll have to write it yourself, because Haskell can't decide by itself that this value is infinite and try to print it with a recursive definition, if it could

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Chaddaï Fouché
2007/12/30, Chaddaï Fouché [EMAIL PROTECTED]: 2007/12/30, Cristian Baboi [EMAIL PROTECTED]: A simple question: Can you write the value of x to a file where x = (1:x) ? Yes, but you'll have to write it yourself, because Haskell can't decide by itself that this value is infinite and try to

Re: [Haskell-cafe] Getting links to Haddock documentation in Hackage

2007-12-30 Thread Henning Thielemann
On Sat, 29 Dec 2007, Adam Langley wrote: Some packages[1] have links on their Hackage pages to the haddock generated documentation for each exported module[2]. However, many[3] don't. What's the secret to getting this generated documentation to work with Hackage? Even packages for which

Re: [Haskell-cafe] ReRe: Basic question concerning data constructors

2007-12-30 Thread Jake McArthur
On Dec 30, 2007, at 12:32 PM, Joost Behrends wrote: Thanks to both fast answers. there remain problems with Jakes mail for me. This: When you define datatypes, you are essentially defining a type-level constructors on the left hand side and (value-level) constructors on the right hand side.

[Haskell-cafe] Web server (Was: Basic question concerning data constructors)

2007-12-30 Thread Henning Thielemann
On Sun, 30 Dec 2007, Joost Behrends wrote: A similar point: The tutorials teach, that = has a similar meaning than = in mathematics. But there is a big difference: it is not reflexive. The the right side is the definition of the left. Thus x=y has still some kind of temporality, which

[Haskell-cafe] A commutative diagram conjecture about applicative functors

2007-12-30 Thread Robin Green
I am proving various statements relating to applicative functors, using the Coq proof assistant (I am considering only Coq terms, which always terminate so you don't have to worry about _|_). However, I'm not sure how to go about proving a certain conjecture, which, translated back into Haskell

[Haskell-cafe] Re: Web server (Was: Basic question concerning data constructors)

2007-12-30 Thread Joost Behrends
Thanks for that info: Several people have adapted and further developed HWS: http://www.haskell.org/haskellwiki/Applications_and_libraries/Web_programming#Web_servers http://darcs.haskell.org/hws/ http://www.informatik.uni-freiburg.de/~thiemann/WASH/ (WSP) There is also a mailing

Re: [Haskell-cafe] A commutative diagram conjecture about applicative functors

2007-12-30 Thread Twan van Laarhoven
Robin Green wrote: I am proving various statements relating to applicative functors, using the Coq proof assistant (I am considering only Coq terms, which always terminate so you don't have to worry about _|_). However, I'm not sure how to go about proving a certain conjecture, which,

[Haskell-cafe] Re: Re: Re: Re[2]: Wikipedia on first-class object

2007-12-30 Thread Ben Franksen
Bulat Ziganshin wrote: Hello Ben, Saturday, December 29, 2007, 7:14:47 PM, you wrote: for a computer is superfluous here. people are not smarter than computers and can't do anything that's impossible for computers I don't think my computer can be sorry, but I know I can be. i've about

[Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Aaron Denney
On 2007-12-28, ChrisK [EMAIL PROTECTED] wrote: Other note: An imperative language, such as C++ or Java, specified the binary output of any instance of the compiler. Class methods will have very specific names and addresses. In C++ you can even get the member-function pointer values and

Re: [Haskell-cafe] Missing join and split

2007-12-30 Thread Sterling Clover
So a simple thing occured to me today. Rather than worry about the correct behavior for a join/split pair, we should just add unintercalate to the library. A bit verbose as a name, but at least there's no ambiguity. --s On Dec 29, 2007, at 2:18 PM, David Roundy wrote: On Fri, Dec 28,

Re: [Haskell-cafe] Missing join and split

2007-12-30 Thread Evan Laforge
Parser combinators basically provide generalized regexes, and they all take lists of arbitrary tokens rather than just Chars. I've written a simple combinator library before that dispenses with all the monadic goodness in favor of a group combinator and returning [Either [tok] [tok]],

Re: [Haskell-cafe] Re: Re: Re: Re[2]: Wikipedia on first-class object

2007-12-30 Thread Donn Cave
On Dec 30, 2007, at 7:18 PM, Ben Franksen wrote: You seem to be content to be cheated. You even seem to believe that there /is no/ cheating involved, even if I program the computer so that you just /think/ it has emotions. Remember the chinese room! Urgh, I was going to stay out of this,

Re: [Haskell-cafe] Basic question concerning data constructors

2007-12-30 Thread ajb
G'day all. Quoting David Menendez [EMAIL PROTECTED]: data A = B means that B constructs a value of type A. The = acts more like the ::= in a BNF grammar. And, indeed, that was the syntax for it in Miranda. It is *not* a claim that A equals B, since A is a type and B is a data

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Cristian Baboi
On Sun, 30 Dec 2007 21:07:44 +0200, Daniel Fischer [EMAIL PROTECTED] wrote: Am Sonntag, 30. Dezember 2007 19:31 schrieb Cristian Baboi: I mean this: module Module where a= let x=1:x in x main = do something to write a (a notation for a) to file The function must work if one change a

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Cristian Baboi
Thank you. data Something = This | S Something ppp :: Something - String ppp This = ppp (S x) = 'S':(ppp x) How can I prevent one to pass 'let x = S x in x' to ppp ? On Sun, 30 Dec 2007 23:25:19 +0200, Chaddaï Fouché [EMAIL PROTECTED] wrote: 2007/12/30, Chaddaï Fouché [EMAIL

Re: [Haskell-cafe] Re: Wikipedia on first-class object

2007-12-30 Thread Cristian Baboi
How about a :: Something a = let x = x in x ppp a On Mon, 31 Dec 2007 09:11:12 +0200, Cristian Baboi [EMAIL PROTECTED] wrote: Thank you. data Something = This | S Something ppp :: Something - String ppp This = ppp (S x) = 'S':(ppp x) How can I prevent one to pass 'let x = S x in