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

Rank-N arguments not supported #24

Open
3noch opened this issue May 23, 2019 · 3 comments
Open

Rank-N arguments not supported #24

3noch opened this issue May 23, 2019 · 3 comments

Comments

@3noch
Copy link

3noch commented May 23, 2019

{-# LANGUAGE LiberalTypeSynonyms #-}

test :: "arg" :! (forall a. f a -> g a) -> f b -> g b
test x = x

complains with

    • Illegal polymorphic type: forall a. f a -> g a
      GHC doesn't yet support impredicative polymorphism
    • In the type signature:
        test :: "arg" :! (forall a. f a -> g a) -> f b -> g b
   |
   | test :: "arg" :! (forall a. f a -> g a) -> f b -> g b
@int-index
Copy link
Contributor

Alas, I don't think named (or any other library) can work around this GHC restriction.

@3noch
Copy link
Author

3noch commented May 23, 2019

Perhaps this should be in the docs?

@3noch
Copy link
Author

3noch commented May 24, 2019

The workaround, I suppose, being that you must define a type for your argument.

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