summaryrefslogtreecommitdiff
path: root/compiler/rename/RnNames.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2017-11-21 14:28:58 -0500
committerBen Gamari <ben@smart-cactus.org>2017-11-21 16:36:43 -0500
commit314bc31489f1f4cd69e913c3b1e33236b2bdf553 (patch)
treeb960f9b02ec06f9d61df019f53655b4e53847bd7 /compiler/rename/RnNames.hs
parent0b20d9c51d627febab34b826fccf522ca8bac323 (diff)
downloadhaskell-314bc31489f1f4cd69e913c3b1e33236b2bdf553.tar.gz
Revert "trees that grow" work
As documented in #14490, the Data instances currently blow up compilation time by too much to stomach. Alan will continue working on this in a branch and we will perhaps merge to 8.2 before 8.2.1 to avoid having to perform painful cherry-picks in 8.2 minor releases. Reverts haddock submodule. This reverts commit 47ad6578ea460999b53eb4293c3a3b3017a56d65. This reverts commit e3ec2e7ae94524ebd111963faf34b84d942265b4. This reverts commit 438dd1cbba13d35f3452b4dcef3f94ce9a216905. This reverts commit 0ff152c9e633accca48815e26e59d1af1fe44ceb.
Diffstat (limited to 'compiler/rename/RnNames.hs')
-rw-r--r--compiler/rename/RnNames.hs20
1 files changed, 8 insertions, 12 deletions
diff --git a/compiler/rename/RnNames.hs b/compiler/rename/RnNames.hs
index f4962d55ef..b1dc8877b5 100644
--- a/compiler/rename/RnNames.hs
+++ b/compiler/rename/RnNames.hs
@@ -604,7 +604,7 @@ getLocalNonValBinders fixity_env
; traceRn "getLocalNonValBinders 3" (vcat [ppr flds, ppr field_env])
; return (envs, new_bndrs) } }
where
- ValBinds _ _val_binds val_sigs = binds
+ ValBindsIn _val_binds val_sigs = binds
for_hs_bndrs :: [Located RdrName]
for_hs_bndrs = hsForeignDeclsBinders foreign_decls
@@ -652,13 +652,11 @@ getLocalNonValBinders fixity_env
where
(_tvs, _cxt, tau) = splitLHsSigmaTy res_ty
cdflds = case tau of
- L _ (HsFunTy _
- (L _ (HsAppsTy _
- [L _ (HsAppPrefix _ (L _ (HsRecTy _ flds)))]))
- _) -> flds
- L _ (HsFunTy _ (L _ (HsRecTy _ flds)) _)
- -> flds
- _ -> []
+ L _ (HsFunTy
+ (L _ (HsAppsTy
+ [L _ (HsAppPrefix (L _ (HsRecTy flds)))])) _) -> flds
+ L _ (HsFunTy (L _ (HsRecTy flds)) _) -> flds
+ _ -> []
find_con_flds _ = []
find_con_name rdr
@@ -666,11 +664,10 @@ getLocalNonValBinders fixity_env
find (\ n -> nameOccName n == rdrNameOcc rdr) names
find_con_decl_flds (L _ x)
= map find_con_decl_fld (cd_fld_names x)
- find_con_decl_fld (L _ (FieldOcc _ (L _ rdr)))
+ find_con_decl_fld (L _ (FieldOcc (L _ rdr) _))
= expectJust "getLocalNonValBinders/find_con_decl_fld" $
find (\ fl -> flLabel fl == lbl) flds
where lbl = occNameFS (rdrNameOcc rdr)
- find_con_decl_fld (L _ (XFieldOcc _)) = panic "getLocalNonValBinders"
new_assoc :: Bool -> LInstDecl GhcPs
-> RnM ([AvailInfo], [(Name, [FieldLabel])])
@@ -710,8 +707,7 @@ getLocalNonValBinders fixity_env
newRecordSelector :: Bool -> [Name] -> LFieldOcc GhcPs -> RnM FieldLabel
newRecordSelector _ [] _ = error "newRecordSelector: datatype has no constructors!"
-newRecordSelector _ _ (L _ (XFieldOcc _)) = panic "newRecordSelector"
-newRecordSelector overload_ok (dc:_) (L loc (FieldOcc _ (L _ fld)))
+newRecordSelector overload_ok (dc:_) (L loc (FieldOcc (L _ fld) _))
= do { selName <- newTopSrcBinder $ L loc $ field
; return $ qualFieldLbl { flSelector = selName } }
where