I am trying to represent a finite ring ℤ/nℤ with the characteristic being a type-level integer specified at runtime.
Would it be possible to have something similar to shapeless.Nat
to represent a type-level integer, but without it needing to be a compile-time constant, i.e. only having to specify the value (and generate the corresponding type) at runtime? Could it be perhaps done with the help of macro paradise? What would I require to do so?
I would need to be able to retrieve the value from the type at the runtime as well, but I don't necessarily need to perform any arithmetic on the type level (i.e. add the type-level integers, increment, etc.)
Thank you.