summaryrefslogtreecommitdiff
path: root/compiler/deSugar/DsBinds.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-07-03 08:50:19 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2018-07-04 15:25:13 +0100
commit7ce6f642a2806c425ba21d48a077d997703cf25b (patch)
tree582250015241685f7fc775c81e20cdbe3474a49f /compiler/deSugar/DsBinds.hs
parent8f449955e0417ca7b2d3b324262aa8d1a87ad822 (diff)
downloadhaskell-7ce6f642a2806c425ba21d48a077d997703cf25b.tar.gz
Add comments on Typeable (n :: Nat)
See Note [Typeable for Nat and Symbol] in TcInteract, which I added after discussion on Trac #15322
Diffstat (limited to 'compiler/deSugar/DsBinds.hs')
-rw-r--r--compiler/deSugar/DsBinds.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/deSugar/DsBinds.hs b/compiler/deSugar/DsBinds.hs
index bec68b0f1c..db7acfd51c 100644
--- a/compiler/deSugar/DsBinds.hs
+++ b/compiler/deSugar/DsBinds.hs
@@ -1279,7 +1279,8 @@ ds_ev_typeable ty (EvTypeableTrFun ev1 ev2)
}
ds_ev_typeable ty (EvTypeableTyLit ev)
- = do { fun <- dsLookupGlobalId tr_fun
+ = -- See Note [Typeable for Nat and Symbol] in TcInteract
+ do { fun <- dsLookupGlobalId tr_fun
; dict <- dsEvTerm ev -- Of type KnownNat/KnownSym
; let proxy = mkTyApps (Var proxyHashId) [ty_kind, ty]
; return (mkApps (mkTyApps (Var fun) [ty]) [ dict, proxy ]) }