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

FCP: Use top level annotation instead? #12

Open
thautwarm opened this issue Jan 20, 2020 · 1 comment
Open

FCP: Use top level annotation instead? #12

thautwarm opened this issue Jan 20, 2020 · 1 comment

Comments

@thautwarm
Copy link

thautwarm commented Jan 20, 2020

I believe as when using types as documentations, top level annotations could be much more readable.
HMF implemented in this repo allows following notations:

let f = fun (f: some a. forall b. b -> a -> a) b a -> f b a

However, I wonder if this is valid is HMF:

let f: forall a. (forall b. b -> a -> a) -> 
                     forall b. b -> a -> a =
        fun g -> fun a -> fun b -> g b a

I believe annotating as the second way is more nice to have, but my re-implementation of FSP given in this repo shows that some complex top level annotations cannot pass type inference and checking.

Any workaround, or just some ideas?

@thautwarm
Copy link
Author

Even the propagate edition cannot work out

let f: forall a. (forall b. b -> a -> a) -> 
                     forall b. b -> a -> a =
        fun g -> fun a -> fun b -> g b a

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