Generic instances of unboxed arrays with higher-kinded element types
A while ago we added support for generic instances like gEq{|{#Int}|}. However, I can't find a good way to write an instance with a higher-kinded (but fully applied) element type (e.g. {#R Int} with R x = {x :: x}).
In this example program:
import StdEnv
import StdGeneric
import StdMaybe
generic gId a :: a -> a
:: R x = {x :: x}
gId{|{#R}|} x = x
Start = gId{|*|} {#{x=1}}
using gId{|{#R}|} x = x fails with no instance available of type {#R Int}, and using gId{|{#R Int|} x = x fails with type constructor expected, then crashes (no TypeCons, in get_type_cons in module parse).
Using :: T :== R Int and gId{|T|} x = x works, but should not be necessary.
CC @johnvg