How to check and pass around generic function implementation type?
type Fid[A] = proc(x: A): A {.noSideEffect.}
func id[T](x: T): T = x
echo id(42)
echo Fid[int]
echo id[int].type
echo id[int] is Fid[int] # why false?
Got answer on IRC: function types use closure call convention by default. It works by changing it to nimcall
type Fid[A] = proc(x: A): A {.noSideEffect, nimcall.}
seems that push and pop pragmas are not applied to function type declarations
{.push noSideEffect, nimcall.}
type Fid[A] = proc(x: A): A # {.noSideEffect, nimcall.} # decomment to get true
func id[T](x: T): T = x
echo id[int] is Fid[int]
{.pop.}