Following along this blog post about heterogeneous lists.
In the end there is an example where the author creates a Key Value pair and uses Type application to create an getter function:
extensibleRow :: HList '[KV "item" String, KV "quantity" Int, KV "price" Float, KV "date" String]
extensibleRow = V "Apple" %: V 10 %: V 0.5 %: V "2018/1/1" %: HNil
...
> select @"item" extensibleRow
"Apple"
I tried the following:
> let item = "item"
> select (someSymbolVal "item")
But the compiler complains with:
Couldn't match expected type: HList xs0 with SomeSymbol
Is it possible to do this sort of matching?