ct-gradual-typing / Papers

The Combination of Dynamic and Static Typing from a Categorical Perspective
10 stars 0 forks source link

Free Variables Function #24

Closed michaelto20 closed 7 years ago

michaelto20 commented 7 years ago

I know you showed me an example of the syntax for using the free variables functions found in Unbound-LocallyNameless. Its type: fv :: (Rep a, Alpha t, Collection f) => t -> f (Name a) Is a bit confusing for me. I know the Collection f piece is to basically tell fv what type of collection to return. Can you post an example?

heades commented 7 years ago

Sure, you can redefine the free variables function as:

get_fv :: Term -> [Vnm] get_fv t = fv t :: [Vnm]