
| Together with Tom Schrijvers, Frank Piessens and Dominique Devriese, I | have been working on a proposal for adding *Partial Type Signatures* to | GHC. I'm all for this. Yes, if the design and implementation are solid, I'd be happy to add it to the main branch. Do focus on something with excellent power-to-weight ratio: that is, gives a lot of benefit for a small cost, rather than something that gives 10% more benefit for 200% more cost. I've annotated the wiki page with some "SLPJ" comments, which you may want to look at. I'd be happy to have a Skype conversation about the details in due course. Simon | -----Original Message----- | From: ghc-devs [mailto:ghc-devs-bounces@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 Type Signatures | | 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 now | contain wildcards, written as underscores. The types of these wildcards | or unknown types will be inferred by the type checker, e.g. | | foo :: _ -> Bool | foo x = not x | -- Inferred: Bool -> Boo | | The proposal also includes a form of generalisation which aligns with | the existing generalisation that GHC does. We have written down a | motivation (when and how might you use this) and details about the | design and implementation on the following wiki page: | | https://ghc.haskell.org/trac/ghc/wiki/PartialTypeSignatures | | We have a (work in progress) implementation [1] of the feature based on | GHC. It currently implements most of what we propose, but there are some | remaining important bugs mostly concerning the generalisation. We also | described our design and presented a formalisation based on the | OutsideIn(X) formalism in a paper [2] presented at PADL'14. | | What we are hoping to get from the people on this list is any of the | below: | * Read the design, play with the implementation and tell us any comments | you may have about the feature, its design and implementation. | * Opinions on whether this feature might be acceptable in GHC upstream | at some point (if not, we do not think it's worth developing the | implementation much further). | * Perhaps a code review or a discussion with someone more knowledgeable | about the internals of GHC's type checker about how we might fix the | remaining problems in our implementation (specifically, we could use | some help with implementing the generalisation of partial type | signatures). | * Feedback on the `Questions and issues' section on the wiki page. | | | Kind regards, | Thomas Winant | | [1]: https://github.com/mrBliss/ghc-head/ | [2]: https://lirias.kuleuven.be/bitstream/123456789/423475/3/paper.pdf | | | Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm | _______________________________________________ | ghc-devs mailing list | ghc-devs@haskell.org | http://www.haskell.org/mailman/listinfo/ghc-devs