Proposal: Partial Type Signatures

Austin Seipp austin at well-typed.com
Thu Mar 13 20:22:43 UTC 2014


On Thu, Mar 13, 2014 at 7:18 AM, Thomas Winant
<thomas.winant at cs.kuleuven.be> 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 the main hold up I was thinking of. Thinking about it a
little more, one way to resolve it perhaps would be to do something
similar to we did to typed holes at the term level: make 'holes' at
the type level an error by default, which when encountered spit out
the error containing the type each hole was instantiated to, and what
the partial type signatures would be inferred as. Then, if you enable
-XPartialTypeSignatures, these would cease to be errors providing the
compiler can infer the types sensibly (and it wouldn't alert you in
that case).

That might be a half baked idea (I just sat here for about 5 minutes),
but either way I say again I do support -XPartialTypeSignatures
anyway, and it sounds like a step in the right direction. :)

-- 
Regards,

Austin Seipp, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com/


More information about the ghc-devs mailing list