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

Need a better error message for absence PrimBytes (DataFrame t ds) instance #9

Closed
achirkin opened this issue Aug 7, 2018 · 1 comment

Comments

@achirkin
Copy link
Owner

achirkin commented Aug 7, 2018

When a code requires PrimBytes (DataFrame t ds), GHC uses a
deriving instance PrimBytes (Array t ds) => PrimBytes (DataFrame t ds),
which, in turn, requires PrimBytes (Array t ds).
Array t ds is a type family; only individual members of the type family have the instance.
To make things worse, there are other instances of PrimBytes defined in easytensor-vulkan.
And GHC starts to panic (Overlapping instances for PrimBytes).

Need to try to reconsider a combination of TypeError and OverlappingInstances to improve this.

The issue comes from a comment #4 (comment).

@achirkin
Copy link
Owner Author

achirkin commented Jun 7, 2019

Since version 2 of easytensor, there is at most one incoherent instance of every class - the one that depends on KnownBackend. That solves the issue.

@achirkin achirkin closed this as completed Jun 7, 2019
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

No branches or pull requests

1 participant