summaryrefslogtreecommitdiff
path: root/compiler/hieFile/HieAst.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/hieFile/HieAst.hs')
-rw-r--r--compiler/hieFile/HieAst.hs18
1 files changed, 17 insertions, 1 deletions
diff --git a/compiler/hieFile/HieAst.hs b/compiler/hieFile/HieAst.hs
index a1253de735..52f8c59a4d 100644
--- a/compiler/hieFile/HieAst.hs
+++ b/compiler/hieFile/HieAst.hs
@@ -1254,8 +1254,13 @@ instance ( a ~ GhcPass p
XCmd _ -> []
instance ToHie (TyClGroup GhcRn) where
- toHie (TyClGroup _ classes roles instances) = concatM
+ toHie TyClGroup{ group_tyclds = classes
+ , group_roles = roles
+ , group_kisigs = sigs
+ , group_instds = instances } =
+ concatM
[ toHie classes
+ , toHie sigs
, toHie roles
, toHie instances
]
@@ -1466,6 +1471,17 @@ instance ( HasLoc thing
where span = loc a
toHie (TS _ (XHsWildCardBndrs _)) = pure []
+instance ToHie (LStandaloneKindSig GhcRn) where
+ toHie (L sp sig) = concatM [makeNode sig sp, toHie sig]
+
+instance ToHie (StandaloneKindSig GhcRn) where
+ toHie sig = concatM $ case sig of
+ StandaloneKindSig _ name typ ->
+ [ toHie $ C TyDecl name
+ , toHie $ TS (ResolvedScopes []) typ
+ ]
+ XStandaloneKindSig _ -> []
+
instance ToHie (SigContext (LSig GhcRn)) where
toHie (SC (SI styp msp) (L sp sig)) = concatM $ makeNode sig sp : case sig of
TypeSig _ names typ ->