[Haskell-cafe] Fwd: How to best display type variables with the same name
Christopher Done
chrisdone at gmail.com
Thu Oct 27 09:43:35 UTC 2016
Hi all,
I posted the below to ghc-devs, but they suggested perhaps
Haskell-Cafe might be interested in the problem. For convenience,
here's the ghc-devs archive of that discussion:
https://mail.haskell.org/pipermail/ghc-devs/2016-October/013085.html
---------- Forwarded message ----------
From: Christopher Done <chrisdone at gmail.com>
Date: 19 October 2016 at 12:45
Subject: How to best display type variables with the same name
To: "ghc-devs at haskell.org" <ghc-devs at haskell.org>
We've encountered a problem in Intero which is that when inspecting
types of expressions and patterns, sometimes it happens that the type,
when pretty printing, yields variables of the same name but which have
different provenance.
Here's a summary of the issue:
https://github.com/commercialhaskell/intero/issues/280#issuecomment-254784904
And a strawman proposal of how it could be solved:
https://github.com/commercialhaskell/intero/issues/280#issuecomment-254787927
What do you think?
Also, if I were to implement the strawman proposal, is it possible to
recover from a `tyvar :: Type` its original quantification/its
"forall"? I've had a look through the API briefly and it looks like a
_maybe_.
Ciao!
More information about the Haskell-Cafe
mailing list