Re: Proposal: Partial Type Signatures - Status update

2014-06-19 Thread Richard Eisenberg
Great -- this agrees with the current proposal at the type level ((NEWCUSK) in the language of #9200.) Thanks for the quick response! Richard On Jun 19, 2014, at 6:00 PM, Simon Peyton Jones wrote: > > | So in general, if there is a partial type signature, the compiler > | tries to infer a typ

RE: Proposal: Partial Type Signatures - Status update

2014-06-19 Thread Simon Peyton Jones
| So in general, if there is a partial type signature, the compiler | tries to infer a type under the assumption that there is no | polymorphic recursion, similar to what it does when there is no | signature. Yes. The way to think of it (at both term and type level) is this. A full type signat

Re: Proposal: Partial Type Signatures - Status update

2014-06-19 Thread Dominique Devriese
Richard, Since Thomas is attending a summer school for the moment, I'll try to provide a response and Thomas can correct me later if needed... 2014-06-19 17:57 GMT+02:00 Richard Eisenberg : > Vigorous debate on #9200 (https://ghc.haskell.org/trac/ghc/ticket/9200) has > led me to think about poly

Re: Proposal: Partial Type Signatures - Status update

2014-06-19 Thread Richard Eisenberg
Hi Thomas, Vigorous debate on #9200 (https://ghc.haskell.org/trac/ghc/ticket/9200) has led me to think about polymorphic recursion in the presence of a partial type signature. For example, take the following silly but well-typed function: > foo :: (a -> Bool) -> a -> () > foo _ _ = foo not True

Re: Proposal: Partial Type Signatures - Status update

2014-04-22 Thread Thomas Winant
Hi, My apologies for the late reply. On 2014-04-10 17:43, Richard Eisenberg wrote: What's the next step from your point of view? Are there unimplemented bits of this? We do see some bits left to implement: * Partial pattern and expression signatures (see [1] for our view on this issue). * P

Re: Proposal: Partial Type Signatures - Status update

2014-04-10 Thread Richard Eisenberg
Yay! I have nothing else constructive to say, at the moment. What's the next step from your point of view? Are there unimplemented bits of this? Thanks for doing this! Richard On Apr 10, 2014, at 3:48 AM, Thomas Winant wrote: > Hi, > > I'm back with a status update. We implemented Austin's

Re: Proposal: Partial Type Signatures - Status update

2014-04-10 Thread Thomas Winant
Hi, I'm back with a status update. We implemented Austin's suggestion to make wildcards in partial type signatures behave like holes. Let's demonstrate the new behaviour with an example. The example program: module Example where foo :: (Show _a, _) => _a -> _ foo x = show (succ x) Compiled

Re: Proposal: Partial Type Signatures

2014-03-14 Thread Thomas Winant
On 03/13/2014 09:56 PM, Richard Eisenberg wrote: First of all: Yay! I've been wanting this for some time. I'm sorry I > missed your presentation at PADL about this. > > I, personally, rather like the design. There may be fine points of > discussion as it all becomes reality, but I think this

RE: Proposal: Partial Type Signatures

2014-03-14 Thread Simon Peyton Jones
thomas.win...@cs.kuleuven.be] | Sent: 13 March 2014 19:38 | To: Simon Peyton Jones; ghc-devs@haskell.org | Cc: Tom Schrijvers; Frank Piessens | Subject: Re: Proposal: Partial Type Signatures | | On 13-03-14 10:46, Simon Peyton Jones wrote: | > | Together with Tom Schrijvers, Frank Piessens and Dominique Devr

Re: Proposal: Partial Type Signatures

2014-03-13 Thread Carter Schonwald
i'd like to echo the echo of agreement :) On Thu, Mar 13, 2014 at 5:34 PM, Edward Kmett wrote: > I'd just like to echo that I really like Austin's suggestion as well, as > it very nicely unifies the two usecases, while simultaneously *not > *dramatically > increasing scope. > > -Edward > > >

Re: Proposal: Partial Type Signatures

2014-03-13 Thread Edward Kmett
I'd just like to echo that I really like Austin's suggestion as well, as it very nicely unifies the two usecases, while simultaneously *not *dramatically increasing scope. -Edward On Thu, Mar 13, 2014 at 4:56 PM, Richard Eisenberg wrote: > First of all: Yay! I've been wanting this for some time

Re: Proposal: Partial Type Signatures

2014-03-13 Thread Richard Eisenberg
First of all: Yay! I've been wanting this for some time. I'm sorry I missed your presentation at PADL about this. I, personally, rather like the design. There may be fine points of discussion as it all becomes reality, but I think this is a great approach -- much like what I've envisioned whene

Re: Proposal: Partial Type Signatures

2014-03-13 Thread Austin Seipp
On Thu, Mar 13, 2014 at 7:18 AM, Thomas Winant wrote: > However, we have the impression that no Hole should remain unfilled, > whereas using a partial type signature doesn't necessarily mean the > program is incomplete. A partial type signature can still be a > (stylistic) choice. Yes, this is th

Re: Proposal: Partial Type Signatures

2014-03-13 Thread Thomas Winant
Thomas | Winant | Sent: 12 March 2014 13:36 | To: ghc-devs@haskell.org | Cc: Tom Schrijvers; Frank Piessens | Subject: Proposal: Partial Type Signatures | | Dear GHC developers, | | Together with Tom Schrijvers, Frank Piessens and Dominique Devriese, I | have been working on a proposal for adding

Re: Proposal: Partial Type Signatures

2014-03-13 Thread David Luposchainsky
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 One useful thing to have would be a new flag that, similar to - -fwarn-missing-signatures, warns if there is a top-level definition with an incomplete type. However, this clashes a bit with the "Readability" section of the wiki entry, so it's up to de

Re: Proposal: Partial Type Signatures

2014-03-13 Thread Thomas Winant
On 03/12/2014 08:09 PM, Austin Seipp wrote: In any case, I believe the original formulation of Holes by Thijs > actually somewhat overlapped with the idea presented here. In > particular, it would have allowed us to say[4]: > > f :: Bool -> _ () > f = ... > > where _ is a 'hole' in the signatu

RE: Proposal: Partial Type Signatures

2014-03-13 Thread Simon Peyton Jones
ave a Skype conversation about the details in due course. Simon | -Original Message- | From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Thomas | Winant | Sent: 12 March 2014 13:36 | To: ghc-devs@haskell.org | Cc: Tom Schrijvers; Frank Piessens | Subject: Proposal: Partial

Re: Proposal: Partial Type Signatures

2014-03-12 Thread Gabor Greif
Jones > | Cc: Malcolm Wallace; ghc-devs > | Subject: Re: Proposal: Partial Type Signatures > | > | Just a reminder that the new jargon is TypedHoles, so maybe the page > | should be renamed to reflect that (an possibly combed for the old > | spelling). > | > | Cheers, >

Re: Proposal: Partial Type Signatures

2014-03-12 Thread Dan Frumin
Aha!, that is exactly why TypeHoles were renamed to TypedHoles :) In the TypedHoles extension underscores are used on the term level. On March 12, 2014 at 10:18:40 PM, Malcolm Wallace (malcolm.wall...@me.com) wrote: Since I never used them, I have honestly been under the impression that the

RE: Proposal: Partial Type Signatures

2014-03-12 Thread Simon Peyton Jones
Indeed, you are right. It's a wiki, so do go ahead. Simon | -Original Message- | From: Gabor Greif [mailto:ggr...@gmail.com] | Sent: 12 March 2014 18:55 | To: Simon Peyton Jones | Cc: Malcolm Wallace; ghc-devs | Subject: Re: Proposal: Partial Type Signatures | | Just a reminder

Re: Proposal: Partial Type Signatures

2014-03-12 Thread Austin Seipp
ton Jones wrote: >> http://www.haskell.org/haskellwiki/GHC/TypeHoles >> >> | -Original Message- >> | From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Malcolm >> | Wallace >> | Sent: 12 March 2014 18:19 >> | To: ghc-devs >> |

Re: Proposal: Partial Type Signatures

2014-03-12 Thread Gabor Greif
> | From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Malcolm > | Wallace > | Sent: 12 March 2014 18:19 > | To: ghc-devs > | Subject: Re: Proposal: Partial Type Signatures > | > | Since I never used them, I have honestly been under the impression that > |

Re: Proposal: Partial Type Signatures

2014-03-12 Thread Gabor Greif
Hi all, this proposal looks very interesting. When writing functions that consume/produce values of proper GADT type, signatures are mandatory. So just spelling out the GADTs and leaving the rest to type inference looks like a clear win. I can only second the in-development-no-signatures argument

RE: Proposal: Partial Type Signatures

2014-03-12 Thread Simon Peyton Jones
http://www.haskell.org/haskellwiki/GHC/TypeHoles | -Original Message- | From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Malcolm | Wallace | Sent: 12 March 2014 18:19 | To: ghc-devs | Subject: Re: Proposal: Partial Type Signatures | | Since I never used them, I have

Re: Proposal: Partial Type Signatures

2014-03-12 Thread Malcolm Wallace
Since I never used them, I have honestly been under the impression that the TypeHoles language extension named exactly this partial type signatures thing. I have loved the idea of underspecifying the type signature, ever since it was first mooted many years ago. So what does TypeHoles do, if n

Re: Proposal: Partial Type Signatures

2014-03-12 Thread Edward Kmett
Clearly given that term-level holes are called TypeHoles, the extension to enable these should be called KindHoles. =) Er.. I'll show myself out. -Edward On Wed, Mar 12, 2014 at 9:35 AM, Thomas Winant wrote: > Dear GHC developers, > > Together with Tom Schrijvers, Frank Piessens and Dominique

Proposal: Partial Type Signatures

2014-03-12 Thread Thomas Winant
Dear GHC developers, Together with Tom Schrijvers, Frank Piessens and Dominique Devriese, I have been working on a proposal for adding *Partial Type Signatures* to GHC. In a partial type signature, annotated types can be mixed with inferred types. A type signature is written like before, but can