- = bindPatSigTyVars (collectSigTysFromHsBinds (bagToList mbinds)) $ \ _ ->
- -- Hmm; by analogy with Ids, this doesn't look right
- -- Top-level bound type vars should really scope over
- -- everything, but we only scope them over the other bindings
-
- rnBinds TopLevel mbinds sigs
+ = do { is_boot <- tcIsHsBoot
+ ; if is_boot then
+ rnHsBoot mbinds sigs
+ else bindPatSigTyVars (collectSigTysFromHsBinds (bagToList mbinds)) $ \ _ ->
+ -- Hmm; by analogy with Ids, this doesn't look right
+ -- Top-level bound type vars should really scope over
+ -- everything, but we only scope them over the other bindings
+ rnBinds TopLevel mbinds sigs }
+
+rnHsBoot :: LHsBinds RdrName
+ -> [LSig RdrName]
+ -> RnM ([HsBindGroup Name], DefUses)
+-- A hs-boot file has no bindings.
+-- Return a single HsBindGroup with empty binds and renamed signatures
+rnHsBoot mbinds sigs
+ = do { checkErr (isEmptyLHsBinds mbinds) (bindsInHsBootFile mbinds)
+ ; sigs' <- renameSigs sigs
+ ; return ([HsBindGroup emptyLHsBinds sigs' NonRecursive],
+ usesOnly (hsSigsFVs sigs')) }