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

Typeable instances aren't found #5

Open
Warbo opened this issue Jan 26, 2016 · 3 comments
Open

Typeable instances aren't found #5

Warbo opened this issue Jan 26, 2016 · 3 comments

Comments

@Warbo
Copy link
Contributor

Warbo commented Jan 26, 2016

mkIfCxtInstances ''Typeable doesn't seem to find any instances of Typeable, which in turn means the cxtShowTypeable example doesn't work:

> :t typeRep
typeRep :: Typeable a => proxy a -> TypeRep
> typeRep [id :: Int -> Int]
Int -> Int
> cxtShowTypeable (id :: Int -> Int)
"<<unshowable>>"

Presumably this is due to Typeable's deriving-only property, which might be hard/impossible to work around. Either way, I think the example should be removed, since it gives the impression that ifcxt can look up Typeable, and caused me much head-scratching when I kept getting the else branch in my code.

@mikeizbicki
Copy link
Owner

Which version of ghc are you using? This was working for me on 7.10.2.

@endgame
Copy link

endgame commented Dec 23, 2019

This doesn't work for me on 8.6.5.

@mikeizbicki
Copy link
Owner

mikeizbicki commented Dec 23, 2019 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

3 participants