Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove dependency on typetraits, typeinfo, add custom enum #34

Merged
merged 3 commits into from
Apr 20, 2020

Conversation

Vindaar
Copy link
Owner

@Vindaar Vindaar commented Apr 20, 2020

Due to the recent devel changes, which forbid for x in MyEnum if MyEnum is an enum with holes, our code broke, since we used typeinfo.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 our
own. Also don't need to workaround using a tmp variable of a dtype and
then use toAny.kind to get the correct AnyKind. Just use custom
macro 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.

Vindaar added 3 commits April 20, 2020 14:58
Instead of using the `AnyKind` enum, which is a holed enum, define our
own. Also don't need to workaround using a tmp variable of a dtype and
then use `toAny.kind` to get the correct `AnyKind`. Just use custom
macro to get name of type (which can extract it from generic T) and
parse to new enum.
@Vindaar Vindaar merged commit 0c9c5b1 into master Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant