Skip to content
/ hmf Public

implementation of HMF type system, for higher rank types

License

Notifications You must be signed in to change notification settings

RemuLang/hmf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HMF

HMF for higher rank polymorphisms.

Use python repl.py to experiment with the interactive type inference.

The Problem of HRT By HMF

However, I finally think this might not be what I want, the annotation is verbose and weak.

The reason why: I have to write this:

check HMF> let f = fun (g: some a. forall b. b -> a -> a) -> fun (b: forall b.b) -> fun a -> g b a
in f
forall a0. (forall a1. (a1 -> (a0 -> a0)) -> (forall a2. a2 -> (a0 -> a0)))

Instead of only specifying annotation in top level:

check HMF> let f: forall a. (forall b. b -> a -> a) -> forall b. b -> a -> a = fun g -> fun a -> fun b -> g b a in f
> Exception: cannot unify types forall a0. (a0 -> (gen<a1 -> gen<a1)) (^a2 -> (^a3 -> ^a4))

About

implementation of HMF type system, for higher rank types

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published