mlutze / fcwg

Other
6 stars 3 forks source link

Handle generics #6

Open mlutze opened 2 years ago

mlutze commented 2 years ago

(Can Flix even handle generics?)

mlutze commented 2 years ago

Wrap with phantom types? Then fold/unfold in generated functions.

opaque type Generic1[t, a1] = t
opaque type Generic2[t, a1, a2] = t
...

May require fcwg-interface installable package or something.

mlutze commented 2 years ago

Wrap with phantom types? Then fold/unfold in generated functions.

opaque type Generic1[t, a1] = t
opaque type Generic2[t, a1, a2] = t
...

May require fcwg-interface installable package or something.

Downside: probably can't define typeclasses for these types?