diff options
Diffstat (limited to 'compiler/GHC/Iface')
| -rw-r--r-- | compiler/GHC/Iface/Ext/Ast.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/GHC/Iface/Ext/Ast.hs b/compiler/GHC/Iface/Ext/Ast.hs index b123450b60..ffc9c0a742 100644 --- a/compiler/GHC/Iface/Ext/Ast.hs +++ b/compiler/GHC/Iface/Ext/Ast.hs @@ -785,6 +785,7 @@ class ( IsPass p , Data (HsTupArg (GhcPass p)) , Data (IPBind (GhcPass p)) , ToHie (Context (Located (IdGhcP p))) + , ToHie (Context (Located (XUnboundVar (GhcPass p)))) , ToHie (RFContext (Located (AmbiguousFieldOcc (GhcPass p)))) , ToHie (RFContext (Located (FieldOcc (GhcPass p)))) , ToHie (TScoped (LHsWcType (GhcPass (NoGhcTcPass p)))) @@ -799,6 +800,9 @@ instance HiePass 'Renamed where instance HiePass 'Typechecked where hiePass = HieTc +instance ToHie (Context (Located NoExtField)) where + toHie _ = pure [] + instance HiePass p => ToHie (BindContext (Located (HsBind (GhcPass p)))) where toHie (BC context scope b@(L span bind)) = concatM $ getTypeNode b : case bind of @@ -1042,8 +1046,8 @@ instance HiePass p => ToHie (Located (HsExpr (GhcPass p))) where [ toHie $ C Use (L mspan var) -- Patch up var location since typechecker removes it ] - HsUnboundVar _ _ -> - [] + HsUnboundVar var _ -> + [ toHie $ C Use (L mspan var) ] HsConLikeOut _ con -> [ toHie $ C Use $ L mspan $ conLikeName con ] |
