I'm no expert on type deduction, but it seems to me that GHC rejecting this
is perfectly reasonable.
Indeed GHC happy compiles it if you add an instance which can reduce like
so:
> type instance F a b = ()
But without that instance, that function is never callable. There could be
a whole raft of
This doesn't sound like the right explanation to me. Untouchable variables
don't have anything (necessarily) to do with existential quantification.
What they have to do with is GHC's (equality) constraint solving.
I don't completely understand the algorithm. However, from what I've read
and seen o
Am Sonntag, den 18.06.2017, 12:02 -0700 schrieb wren romano:
> > > {-# LANGUAGE Rank2Types, TypeFamilies #-}
> > >
> > > import GHC.Exts (Constraint)
> > >
> > > type family F a b :: Constraint
> > >
> > > data T b c = T
> > >
> > > f :: (forall b . F a b => T b c) -> a
> > > f _ = undefined
>
On Thu, May 4, 2017 at 10:20 AM, Wolfgang Jeltsch
wrote:
> Today I encountered for the first time the notion of an “untouchable”
> type variable. I have no clue what this is supposed to mean.
Fwiw, "untouchable" variables come from existential quantification
(since the variable must be held abstr