Re: [Haskell-cafe] Musings on type systems

2010-11-19 Thread wren ng thornton
On 11/19/10 10:05 PM, Ryan Ingram wrote: Not exactly; in the phantom type case, the two sets ARE disjoint in a way; there are no objects that are both Foo Int and Foo Bool (although there may be objects of type forall a. Foo a -- more on that later). Whereas the type keyword really creates two na

Re: [Haskell-cafe] Musings on type systems

2010-11-19 Thread wren ng thornton
On 11/19/10 10:05 PM, Ryan Ingram wrote: On Fri, Nov 19, 2010 at 1:05 PM, Andrew Coppin wrote: So is Either what is meant by a "sum type"? Similarly, (X, Y) [...] is this a "product type"? Yes and no. Unfortunately there's some discrepancy in the terminology depending on who you ask. In the f

[Haskell-cafe] ANNOUNCE: Multiplate 0.0.1

2010-11-19 Thread roconnor
Multiplate is a lightweight generic library for mutually recursive data types that won't make Conor lose his lunch. Multiplate is an alternative extension of the Uniplate/Compos core design to support mutually recursive datatypes in a way that is as powerful as Compos, almost as easy to use as

Re: [Haskell-cafe] Musings on type systems

2010-11-19 Thread Ryan Ingram
On Fri, Nov 19, 2010 at 1:05 PM, Andrew Coppin wrote: > So is Either what is meant by a "sum type"? > Similarly, (X, Y) [...] is this a "product type"? Yes, and yes, although more generally speaking data Test = A Int Bool | B Test | C [Test] is a recursive ADT composed of sums (A ...| B... | C.

Re: [Haskell-cafe] Musings on type systems

2010-11-19 Thread wren ng thornton
On 11/19/10 4:05 PM, Andrew Coppin wrote: So what would happen if some crazy person decided to make the kind system more like the type system? Or make the type system more like the value system? Do we end up with another layer to our cake? Is it possible to generalise it to an infinite number of

Re: [Haskell-cafe] Quasi quotation question

2010-11-19 Thread Sterling Clover
On Nov 19, 2010, at 6:00 PM, jean-christophe mincke wrote: > Hello, > > Is it possible for a quasi quoter to have access to information about haskell > identifiers declared before the quasi-quotation? Nope. There are staging restrictions in place, since you can't sanely use things that haven

Re: [Haskell-cafe] Musings on type systems

2010-11-19 Thread Sterling Clover
On Nov 19, 2010, at 6:22 PM, Aaron Gray wrote: > > IIRC It Does not deal Hindley-Milner type system at all. i.e. it does not > cover ML's type system. > > Its successor ATTAPL :- > > http://www.cis.upenn.edu/~bcpierce/attapl/index.html > > Handles an ML like type systems using constraints

Re: [Haskell-cafe] DPH and GHC 7.0.1

2010-11-19 Thread David Peixotto
There were some problems getting DPH to work well with the changes in GHC 7. There is more info in this mail: http://www.haskell.org/pipermail/cvs-ghc/2010-November/057574.html The short summary is that there will be a patch level release of GHC (7.0.2) that works well with DPH and the DPH pack

Re: [Haskell-cafe] DPH and GHC 7.0.1

2010-11-19 Thread Jake McArthur
On 11/19/2010 05:24 PM, Gregory Propf wrote: I was hoping to play around with Data.Parallel.Haskell (dph) but noticed that it seems to have been exiled from ghc 7.0.1 which I just installed. It also doesn't seem to be in cabal. Anybody know how to use dph with 7.0.1 or has it been abandoned or so

[Haskell-cafe] DPH and GHC 7.0.1

2010-11-19 Thread Gregory Propf
I was hoping to play around with Data.Parallel.Haskell (dph) but noticed that it seems to have been exiled from ghc 7.0.1 which I just installed.  It also doesn't seem to be in cabal.  Anybody know how to use dph with 7.0.1 or has it been abandoned or something?

Re: [Haskell-cafe] Musings on type systems

2010-11-19 Thread Aaron Gray
On 19 November 2010 22:14, Albert Y. C. Lai wrote: > On 10-11-19 04:39 PM, Matthew Steele wrote: > >> TAPL is also a great book for getting up to speed on type theory: >> >> http://www.cis.upenn.edu/~bcpierce/tapl/ >> >> I am no type theorist, and I nonetheless found it very approachable. >> > >

[Haskell-cafe] Quasi quotation question

2010-11-19 Thread jean-christophe mincke
Hello, Is it possible for a quasi quoter to have access to information about haskell identifiers declared before the quasi-quotation? I tried the 'reify' function but without success. Just as in the following exemple: a = 6 x = [$expr|a|] Where the generated haskell code is a= 6 x = a Thank

[Haskell-cafe] Codec.Crypto.RSA question

2010-11-19 Thread Charles-Pierre Astolfi
Hi -cafe, I have a question about Codec.Crypto.RSA: how to enforce that (informally) decrypt . encrypt = id Consider this code: encrypt2 :: String -> ByteString encrypt2 = fst . encrypt (mkStdGen n) pubKey encode decrypt2 :: ByteString -> String decrypt2 = toString . decrypt privKey Since decryp

Re: [Haskell-cafe] RegEx versus (Parsec, TagSoup, others...)

2010-11-19 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/13/10 09:19 , Brent Yorgey wrote: > On Fri, Nov 12, 2010 at 03:56:26PM -0800, Michael Litchard wrote: >> a Perl perspective. I let him into what I was doing, and he opined I >> should be using pcre. So now I'm second guessing my choices. Why do >

Re: [Haskell-cafe] Musings on type systems

2010-11-19 Thread Albert Y. C. Lai
On 10-11-19 04:39 PM, Matthew Steele wrote: TAPL is also a great book for getting up to speed on type theory: http://www.cis.upenn.edu/~bcpierce/tapl/ I am no type theorist, and I nonetheless found it very approachable. TAPL is surprisingly easy-going. It is long (many pages and many chapter

Re: [Haskell-cafe] Musings on type systems

2010-11-19 Thread Matthew Steele
TAPL is also a great book for getting up to speed on type theory: http://www.cis.upenn.edu/~bcpierce/tapl/ I am no type theorist, and I nonetheless found it very approachable. I've never read TTFP; I will have to check that out. (-: On Nov 19, 2010, at 4:31 PM, Daniel Peebles wrote: There'

Re: [Haskell-cafe] Musings on type systems

2010-11-19 Thread Daniel Peebles
There's a lot of interesting material on this stuff if you start poking around :) http://www.cs.kent.ac.uk/people/staff/sjt/TTFP/ might be a good introduction. I'd consider typeclasses to be "sets" of types, as you said, but more generally, a relation of types. In that view, an MPTC is just an n-a

[Haskell-cafe] Musings on type systems

2010-11-19 Thread Andrew Coppin
OK, so how do types actually work? Musing on this for a moment, it seems that declaring a variable to have a certain type constrains the possible values that the variable can have. You could say that a type is some sort of "set", and that by issuing a type declaration, the compiler statically

Re: [Haskell-cafe] GitIt

2010-11-19 Thread Andrew Coppin
On 19/11/2010 08:32 PM, Judah Jacobson wrote: Two possible fixes come to mind: 1) In the .cabal file for cautious-file, it says: Flag posix description: Use POSIX-specific features default: True Ah. I hadn't seen this bit. Yes, what's probably happened is that I altered the build d

Re: [Haskell-cafe] GitIt

2010-11-19 Thread Judah Jacobson
Two possible fixes come to mind: 1) In the .cabal file for cautious-file, it says: Flag posix description: Use POSIX-specific features default: True You can use "cabal install -fposix cautious-file" to explicitly turn on POSIX support, and "cabal install -f-posix cautious-file" to explic

Re: [Haskell-cafe] Impredicative Types

2010-11-19 Thread Gregory Crosswhite
On 11/19/10 12:22 PM, Andrew Coppin wrote: Use the Force I tried, but I'm not yet strong enough in the Force to read citations with my eyes closed. :-( (PS: Thanks for pointing me to the paper, Simon!) Cheers, Greg ___ Haskell-Cafe mailing list Ha

Re: [Haskell-cafe] Reply-To: Header in Mailinglists

2010-11-19 Thread Bastian Erdnüß
On Nov 19, 2010, at 13:54, Tillmann Rendel wrote: > Hi Bastian, > > Bastian Erdnüß wrote: >> It would make my life a little bit more easy if the mailing lists on >> haskell.org would add a Reply-To: header automatically to each >> message containing the address of the mailing list, the message w

Re: [Haskell-cafe] Impredicative Types

2010-11-19 Thread Andrew Coppin
On 19/11/2010 08:09 PM, Simon Peyton-Jones wrote: read the QML paper! that's the trick. simpler, but with a heavier annotation burden than the more sophisticated approaches Use the Force, read the... citation? Hmm, doesn't have quite the same ring, does it? Use the Force, read the symposium

[Haskell-cafe] GitIt

2010-11-19 Thread Andrew Coppin
The other day, I did a slightly foolish thing. I uttered the command cabal install gitit Actually, while I was "foolish", it actually worked better than you'd think. It wanted to install several thousand billion packages, but all of them compiled without issue. Well, all except one. You se

RE: [Haskell-cafe] Impredicative Types

2010-11-19 Thread Simon Peyton-Jones
read the QML paper! that's the trick. simpler, but with a heavier annotation burden than the more sophisticated approaches | -Original Message- | From: Gregory Crosswhite [mailto:gcr...@phys.washington.edu] | Sent: 19 November 2010 19:59 | To: Simon Peyton-Jones | Cc: Haskell Cafe;

Re: [Haskell-cafe] Impredicative Types

2010-11-19 Thread Gregory Crosswhite
Awesome, thank you. :-) One more question out of pure curiosity, if you have the time: What is allowing you to keep them in? I thought that the problem was that they made a mess that touched every party of the type checker rather than being centralized in one place. Was there a trick you d

RE: [Haskell-cafe] Impredicative Types

2010-11-19 Thread Simon Peyton-Jones
Yes, impredicative types are still in, but in a simpler form than before, along the lines of QML http://research.microsoft.com/en-us/um/people/crusso/qml/ I have been too busy with getting the new type checker working to describe or document it. Notably, I have not yet added syntax for QML's ri

[Haskell-cafe] Impredicative Types

2010-11-19 Thread Gregory Crosswhite
Hey everyone! I haven't had a chance to try out GHC 7 myself, but I saw in the documentation that Impredicative Types are still supported. Is this true? I thought that they were on their way out because they overcomplicated type checking; has this plan been changed? Cheers, Greg __

Re: [Haskell-cafe] Re: [Haskell] intent-typing

2010-11-19 Thread aditya siram
That was a great explanation of phantom types and type-families. I'm just getting started on understand type families and I was wondering why you didn't use data families in the truth table structure: type family Join a b type instance Join Safe Safe = Safe type instance Join Safe Unsafe = Unsafe

Re: [Haskell-cafe] About "Fun with type functions" example

2010-11-19 Thread Arnaud Bailly
Yes it helps, although I am no type wizard! Thanks a lot for these insights, it gives me some more ideas. Best regards Arnaud On Fri, Nov 19, 2010 at 5:55 PM, Daniel Peebles wrote: > The "obvious" way to write the result would be (stealing some syntax made up > by ski on #haskell): > fromInt ::

Re: [Haskell-cafe] Reply-To: Header in Mailinglists (was: About "Fun with type functions" example)

2010-11-19 Thread Jeremy Shaw
Reply-to munging has come up many times on this list (and others). See this page for information on why many people do not like Reply-to munging: http://marc.merlins.org/netrants/listreplyto.html - jeremy On Thu, Nov 18, 2010 at 9:55 PM, Bastian Erdnüß wrote: > Hi there, > > I just put an answ

Re: [Haskell-cafe] About "Fun with type functions" example

2010-11-19 Thread Daniel Peebles
The "obvious" way to write the result would be (stealing some syntax made up by ski on #haskell): fromInt :: Int -> (exists n. (Nat n) *> n) fromInt = ... meaning, "at compile time we don't know the type of the result of fromInt, because it depends on a runtime value, but we'll tell you it's _som

Re: [Haskell-cafe] Re: Reply-To: Header in Mailinglists (was: About "Fun with type functions" example)

2010-11-19 Thread Arnaud Bailly
I personnally use most of the time gmail, so I don't have access to a Reply-To-List feature (or do I?). I usually do Reply-to-all which I think is as I guess most mailers remove duplicate mails. Am I right? Arnaud On Fri, Nov 19, 2010 at 3:16 PM, Maciej Piechotka wrote: > On Fri, 2010-11-19 at 0

[Haskell-cafe] Re: Reply-To: Header in Mailinglists (was: About "Fun with type functions" example)

2010-11-19 Thread Maciej Piechotka
On Fri, 2010-11-19 at 04:55 +0100, Bastian Erdnüß wrote: > Hi there, > > I just put an answer two this in beginn...@haskell.org. It was not on > purpose to move the topic. It's just that questions I feel I can answer are > usually beginner level questions and so I'm not often writing in the ca

Re: [Haskell-cafe] About "Fun with type functions" example

2010-11-19 Thread Arnaud Bailly
Thanks a lot for the explanation. Summarizing: You can't calculate an exact type, but you don't care if the type of the continuation is properly set in order to "hide" the exact type of n? Am I right? Arnaud On Fri, Nov 19, 2010 at 9:24 AM, Miguel Mitrofanov wrote: >  A continuation. > > You can

[Haskell-cafe] Re: a simple question about types

2010-11-19 Thread JerzM
Thank you for these excellent explanations. Best regards, Jerz -- View this message in context: http://haskell.1045720.n5.nabble.com/a-simple-question-about-types-tp3269519p3272344.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

Re: [Haskell-cafe] Reply-To: Header in Mailinglists

2010-11-19 Thread Tillmann Rendel
Hi Bastian, Bastian Erdnüß wrote: It would make my life a little bit more easy if the mailing lists on haskell.org would add a Reply-To: header automatically to each message containing the address of the mailing list, the message was sent to. Usually that's the place where others would want to

[Haskell-cafe] Problem with linking HDBC-ODBC

2010-11-19 Thread hanjoosten
Hi Yesterday I upgraded to the new version of hdbc-odbc (2.2.3.1.). Then I rebuilt my own project, but the linker gives an error: . . . [88 of 90] Compiling CC ( CC.hs, C:\eclipseworkspace_fp1\ampersand\out\CC.o ) [89 of 90] Compiling Parser ( Parser.hs, C:\eclipseworkspa

[Haskell-cafe] Re: borked windows environment, want to start over

2010-11-19 Thread list+haskell
On 11/18/2010 5:02 PM, Michael Litchard wrote: > On Tue, Nov 16, 2010 at 4:39 PM, Michael Litchard wrote: >> I think I may have borked things good using cygwin. I want to remove >> it and do a clean install of haskell platform w/out cygwin. What do I >> need to do to make sure all configuration fi

Re: [Haskell-cafe] About "Fun with type functions" example

2010-11-19 Thread Miguel Mitrofanov
A continuation. You can't know, what type your "fromInt n" should be, but you're not going to just leave it anyway, you're gonna do some calculations with it, resulting in something of type r. So, your calculation is gonna be of type (forall n. Nat n => n -> r). So, if you imagine for a moment

Re: [Haskell-cafe] Reply-To: Header in Mailinglists (was: About "Fun with type functions" example)

2010-11-19 Thread Joachim Breitner
Hi Bastian, I generally observe the pattern that non-technical mailing lists tend to set this header to help the user, while technical mailing list assume (rightfully, IMHO) that the readers are fine without Reply-To. The reasons against setting that I recall at the moment are: * Mails meant to b