> I really don't understand what is going on here. ...
--------------------------------------------------------------------------------
> {-# LANGUAGE TypeFamilies #-}
> {-# LANGUAGE AllowAmbiguousTypes #-}
> {-
>
> src/Games/Ambiguous.hs:15:16: error: …
> • Couldn't match expected type ‘SubAmbi a0’
> with actual type ‘SubAmbi a’
> NB: ‘SubAmbi’ is a non-injective type family
> The type variable ‘a0’ is ambiguous
>
> -}
Hi Henry, both replies you've received are excellent, I won't expand on them.
I am interested in how you got into such a pickle in the first place:
Why set `AllowAmbiguousTypes`? Did you understand what that means?
Did you think it odd that despite having that set, you get error `type variable ... is ambiguous`?
There are ways to achieve what you want without `AllowAmbiguousTypes` nor `TypeApplications`, but that would need a rather different design. So what lead you into this design?
AntC