Commit 206413ef authored by Simon Peyton Jones's avatar Simon Peyton Jones Committed by Ian Lynagh
Browse files

Wibble to "Fix a long-standing bug in HsUtils.hsTyClDeclBinders"

parent 4dac67eb
......@@ -591,8 +591,9 @@ get_local_binders gbl_env (HsGroup {hs_valds = ValBindsIn _ val_sigs,
; return (AvailTC main_name names) }
new_ti local_tc_env ti_decl -- ONLY for type/data instances
= do { let tc_rdr = tcdName (unLoc ti_decl)
; main_name <- case lookupOccEnv local_tc_env (rdrNameOcc tc_rdr) of
= do { let L loc tc_rdr = tcdLName (unLoc ti_decl)
; main_name <- setSrcSpan loc $
case lookupOccEnv local_tc_env (rdrNameOcc tc_rdr) of
Nothing -> lookupGlobalOccRn tc_rdr
Just n -> return n
-- See Note [Looking up family names in family instances]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment