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

Error when trying to derive Arrow (Kleisli m) #6

Open
koflerdavid opened this issue Jun 6, 2018 · 1 comment
Open

Error when trying to derive Arrow (Kleisli m) #6

koflerdavid opened this issue Jun 6, 2018 · 1 comment

Comments

@koflerdavid
Copy link

Hello,

today I played around with Djinn a bit, and noticed what I am pretty sure is a bug:
I added a definition for an Arrow typeclass, and the Kleisli wrapper for a Monad.
Then, I tried to derive an instance Arrow (Kleisli m).

Input:

Djinn> class Arrow arr where id :: arr a a; (.) :: arr b c -> arr a b -> arr a c; toArr :: (b -> c) -> arr b c; first :: arr b c -> arr (b, d) (c, d)
Djinn> data Kleisli m a b = MkKleisli (a -> m b)
Djinn> ?instance Arrow (Kleisli m)

Expected result: an instance Arrow (Kleisli m) or a message that this is not possible.
Actual result: an error:

Djinn> ?instance Arrow (Kleisli m)
instance Arrow (Kleisli m) where
djinn: IntMap.!: key 3 is not an element of the map
CallStack (from HasCallStack):
error, called at libraries/containers/Data/IntMap/Internal.hs:569:17 in containers-0.5.10.2:Data.IntMap.Internal

I'll try to shrink the example, but so far this is all I have.

Best regards,
David Kofler

@augustss
Copy link
Owner

augustss commented Jun 7, 2018 via email

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

2 participants