The constraint solver can certainly simplify this to get b ~ y.   Perhaps all 
that is needed is to call it?

David: a small reproducer would be helpful.

Mathias, yell if you need help.

Simon

From: ghc-devs <[email protected]> On Behalf Of David Feuer
Sent: 07 June 2019 18:37
To: GHC users <[email protected]>; ghc-devs 
<[email protected]>
Subject: Typed hole improvements

I've been playing around with 8.6.3, and I've really been appreciating the 
improvements in typed hole messages. Both the information about constraints and 
the suggestions for filling the holes have proven valuable in heavily typish 
programming. Thanks! One thing that's still not where I'd like it to be is the 
equality constraint display. I recognize this is a Hard Problem. But digging 
through something like

  x ~ C y z
  x ~ C y1 z2
  D p b ~ q z y1

to get b ~ y gets tiresome. Is there room for improvement here? If not, are 
there any programs around using the GHC API to offer an interactive system for 
such calculations? It'd be quite helpful when seeing such constraints to be 
able to express special interest in a particular type variable, for example.
_______________________________________________
ghc-devs mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to