summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Instance/Class.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Tc/Instance/Class.hs')
-rw-r--r--compiler/GHC/Tc/Instance/Class.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/GHC/Tc/Instance/Class.hs b/compiler/GHC/Tc/Instance/Class.hs
index f2f4065bc0..f0c6d17aaa 100644
--- a/compiler/GHC/Tc/Instance/Class.hs
+++ b/compiler/GHC/Tc/Instance/Class.hs
@@ -354,9 +354,7 @@ matchKnownNat :: DynFlags
-- See Note [Shortcut solving: overlap]
-> Class -> [Type] -> TcM ClsInstResult
matchKnownNat _ _ clas [ty] -- clas = KnownNat
- | Just n <- isNumLitTy ty = do
- et <- mkNaturalExpr n
- makeLitDict clas ty et
+ | Just n <- isNumLitTy ty = makeLitDict clas ty (mkNaturalExpr n)
matchKnownNat df sc clas tys = matchInstEnv df sc clas tys
-- See Note [Fabricating Evidence for Literals in Backpack] for why
-- this lookup into the instance environment is required.