mirror of
https://github.com/github/semantic.git
synced 2024-12-01 09:15:01 +03:00
Rename type variables to TVar.
Co-Authored-By: Patrick Thomson <patrick.william.thomson@gmail.com>
This commit is contained in:
parent
10cf048dfc
commit
3200ce88a7
@ -105,7 +105,7 @@ runFunctionValue alloc assign = go
|
||||
data Type
|
||||
= Type :-> Type
|
||||
| Product [Type]
|
||||
| Var Int
|
||||
| TVar Int
|
||||
deriving (Eq, Ord, Show)
|
||||
|
||||
runFunctionType :: forall m location effects a function
|
||||
@ -132,7 +132,7 @@ runFunctionType alloc assign = go
|
||||
Lambda params _ body -> go (do
|
||||
(bindings, tvars) <- foldr (\ name rest -> do
|
||||
a <- alloc name
|
||||
tvar <- Var <$> fresh
|
||||
tvar <- TVar <$> fresh
|
||||
assign a tvar
|
||||
bimap (Map.insert name a) (tvar :) <$> rest) (pure (Map.empty, [])) params
|
||||
(Product tvars :->) <$> local (Map.unionWith const bindings) body) >>= yield
|
||||
|
Loading…
Reference in New Issue
Block a user