Basics

Setting values

The easiest way to set a variant value is to use the V pattern synonym:

x,y :: V '[String,Int]
x = V "test"
y = V @Int 10

Note

For now the compiler cannot use the variant value type list to infer the
type of the variant value! In the previous example we have to specify the
Int type. Even if it's clear (for us) that it's the obvious unique
possibility, it is ambiguous for the compiler.