remove dependency on typetraits, typeinfo, add custom enum #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Due to the recent devel changes, which forbid
for x in MyEnum
ifMyEnum
is an enum with holes, our code broke, since we usedtypeinfo.AnyKind
as a convenient enum to store type information.Related upstream issue: nim-lang/Nim#14030
Instead of using the
AnyKind
enum, which is a holed enum, define ourown. Also don't need to workaround using a tmp variable of a dtype and
then use
toAny.kind
to get the correctAnyKind
. Just use custommacro to get name of type (which can extract it from generic T) and
parse to new enum.
Good to avoid the dependency on those two modules anyways, especially to get rid of that weird
tmp.toAny.kind
workaround.