diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2018-08-30 11:55:31 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2018-08-31 12:56:44 +0100 |
commit | fda2ea5830176236380a6976dfd0d5802395c6a9 (patch) | |
tree | da7d45f72ffec569a6d711a0baec90296d57417b | |
parent | 585188529d6a8b98f5e0f1985bce23a022dd8b7e (diff) | |
download | haskell-fda2ea5830176236380a6976dfd0d5802395c6a9.tar.gz |
Commets on flatten_args_tc
-rw-r--r-- | compiler/typecheck/TcFlatten.hs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/compiler/typecheck/TcFlatten.hs b/compiler/typecheck/TcFlatten.hs index 79ffc4da27..4129b87aaa 100644 --- a/compiler/typecheck/TcFlatten.hs +++ b/compiler/typecheck/TcFlatten.hs @@ -1129,10 +1129,17 @@ TODO: a step-by-step replay of the refactor to analyze the performance. -} {-# INLINE flatten_args_tc #-} -flatten_args_tc :: TyCon - -> [Role] - -> [Type] - -> FlatM ([Xi], [Coercion], CoercionN) +flatten_args_tc + :: TyCon -- T + -> [Role] -- Role r + -> [Type] -- Arg types [t1,..,tn] + -> FlatM ( [Xi] -- List of flattened args [x1,..,xn] + -- 1-1 corresp with [t1,..,tn] + , [Coercion] -- List of arg coercions [co1,..,con] + -- 1-1 corresp with [t1,..,tn] + -- coi :: xi ~r ti + , CoercionN) -- Result coercion, rco + -- rco : (T t1..tn) ~N (T (x1 |> co1) .. (xn |> con)) flatten_args_tc tc = flatten_args all_bndrs any_named_bndrs inner_ki emptyVarSet -- NB: TyCon kinds are always closed where |