As Vlad notes in [1], getting rid of FreeKiTyVars isn't as simple as it
would appear, as we still treat kinds and types differently in other
places, such as data type declarations. For instance:
data Proxy (a :: k) = Proxy -- k is brought into scope implicitly by
`extractDataDefnKindVars`
I
> Simon
>
> From: Ryan Scott
> Sent: 14 February 2019 18:31
> To: Simon Peyton Jones
> Cc: ghc-devs@haskell.org
> Subject: Re: scopedSort and kind variable left-biasing
>
> Ah, I somehow forgot all about FreeKiTyVars. It turns out that the
> `freeKiTyVa
| Cc: ghc-devs@haskell.org
| Subject: Re: scopedSort and kind variable left-biasing
|
|
|
| > On Feb 14, 2019, at 10:34 AM, Ryan Scott wrote:
| >
| > the answer [j,a,k,b]! Strictly speaking, this answer meets the
| specification of ScopedSort,
|
| I wish to point out that the spec
Of Ryan Scott
Sent: 14 February 2019 15:35
To: ghc-devs@haskell.org<mailto:ghc-devs@haskell.org>
Subject: scopedSort and kind variable left-biasing
Consider this function:
f :: Proxy (a :: j) -> Proxy (b :: k)
If you just collect the free type variables of `f`'s type in left-to
> On Feb 14, 2019, at 2:32 PM, Ryan Scott wrote:
>
> I can see the appeal behind dropping this exception, both from a
> specification and an implementation point of view. It'll require a massive
> breaking change, alas, but it just might be worth it.
The "breaking change" is just for
Ah, I read over this part [1] of the ScopedSort specification too quickly:
* If variable v at the cursor is depended on by any earlier variable w,
move v immediately before the leftmost such w.
I glossed over the "immediately" part, so I was under the impression that
as long as v
> On Feb 14, 2019, at 10:34 AM, Ryan Scott wrote:
>
> the answer [j,a,k,b]! Strictly speaking, this answer meets the specification
> of ScopedSort,
I wish to point out that the specification of ScopedSort is very tight: it says
exactly what we should get, given an input. This is important,
up with [j,a,k,b].
>
>
>
> Perhaps that’s an ergonomic reason for retaining the current rather
> cumbersome code. (Maybe it could be simplified.)
>
>
>
> Simon
>
>
>
> *From:* ghc-devs *On Behalf Of *Ryan Scott
> *Sent:* 14 February 2019 15:35
> *To:* ghc-d
Consider this function:
f :: Proxy (a :: j) -> Proxy (b :: k)
If you just collect the free type variables of `f`'s type in left-to-right
order, you'd be left with [a,j,b,k]. But the type of `f` is not `forall (a
:: j) j (b :: k) k. Proxy a -> Proxy b`, as that would be ill scoped. `j`
must