[Haskell-cafe] Confused about type seen in the wild

Brandon Allbery allbery.b at gmail.com
Thu Apr 10 18:03:58 UTC 2014


On Thu, Apr 10, 2014 at 1:59 PM, Felipe Lessa <felipe.lessa at gmail.com>wrote:

> Em 10-04-2014 14:45, Brandon Allbery escreveu:
> > It "should be" but I suspect actually treating it as one is rather
> > difficult now that it's possible for `a` there to be a Constraint or
> > etc., in which case it is on the correct side of the =>.
>
> What you're saying is that it would be difficult to ban this on the
> parser level.  However, somewhere inside GHC this `a` that was used as a
> constraint got promoted to being an argument.  This is where it should
> have been stopped on its track.
>

Actually, what I'm saying is that it might be difficult to reliably catch
it at that point; consider that the parse leading to that interpretation
may not exist within ghc at that point, only an AST that may have been
rearranged by uses of ConstraintKinds so as to lose its direct relationship
to the parse that initially led to it.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140410/2334f4f8/attachment.html>


More information about the Haskell-Cafe mailing list