diff options
| author | Dr. ERDI Gergo <gergo@erdi.hu> | 2021-07-22 11:37:35 +0800 |
|---|---|---|
| committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-08-13 07:53:53 -0400 |
| commit | 7ad813a480c9ed383fe1fea11a57f90d4f6f9b71 (patch) | |
| tree | 97343b332943c3c5fb408d58cf1ff0bc339bc495 /compiler/GHC/Rename | |
| parent | 100ffe75f509a73f1b26e768237888646f522b6c (diff) | |
| download | haskell-7ad813a480c9ed383fe1fea11a57f90d4f6f9b71.tar.gz | |
Move `ol_witness` to `OverLitTc`
We also add a new `ol_from_fun` field to renamed (but not yet
typechecked) OverLits. This has the nice knock-on effect of making
total some typechecker functions that used to be partial.
Fixes #20151
Diffstat (limited to 'compiler/GHC/Rename')
| -rw-r--r-- | compiler/GHC/Rename/Pat.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/GHC/Rename/Pat.hs b/compiler/GHC/Rename/Pat.hs index ab9bf28564..534b03e602 100644 --- a/compiler/GHC/Rename/Pat.hs +++ b/compiler/GHC/Rename/Pat.hs @@ -5,6 +5,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} +{-# LANGUAGE DisambiguateRecordFields #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} {-# OPTIONS_GHC -Wno-incomplete-record-updates #-} @@ -992,8 +993,8 @@ rnOverLit origLit ; let std_name = hsOverLitName val ; (from_thing_name, fvs1) <- lookupSyntaxName std_name ; let rebindable = from_thing_name /= std_name - lit' = lit { ol_witness = nl_HsVar from_thing_name - , ol_ext = rebindable } + lit' = lit { ol_ext = OverLitRn { ol_rebindable = rebindable + , ol_from_fun = noLocA from_thing_name } } ; if isNegativeZeroOverLit lit' then do { (negate_name, fvs2) <- lookupSyntaxExpr negateName ; return ((lit' { ol_val = negateOverLitVal val }, Just negate_name) |
