2 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
4 \section[RnBinds]{Renaming and dependency analysis of bindings}
6 This module does renaming and dependency analysis on value bindings in
7 the abstract syntax. It does {\em not} do cycle-checks on class or
8 type-synonym declarations; those cannot be done at this stage because
9 they may be affected by renaming (which isn't fully worked out yet).
14 rnLocalBindsAndThen, rnValBindsAndThen, rnValBinds, trimWith,
15 rnMethodBinds, renameSigs, mkSigTvFn,
19 #include "HsVersions.h"
21 import {-# SOURCE #-} RnExpr( rnLExpr, rnStmts )
27 import RnTypes ( rnHsSigType, rnLHsType, rnHsTypeFVs,
28 rnLPat, rnPatsAndThen, patSigErr, checkPrecMatch )
29 import RnEnv ( bindLocatedLocalsRn, lookupLocatedBndrRn,
30 lookupLocatedInstDeclBndr, newIPNameRn,
31 lookupLocatedSigOccRn, bindPatSigTyVarsFV,
32 bindLocalFixities, bindSigTyVarsFV,
33 warnUnusedLocalBinds, mapFvRn, extendTyVarEnvFVRn,
35 import DynFlags ( DynFlag(..) )
39 import PrelNames ( isUnboundName )
40 import RdrName ( RdrName, rdrNameOcc )
41 import SrcLoc ( Located(..), unLoc )
42 import ListSetOps ( findDupsEq )
43 import BasicTypes ( RecFlag(..) )
44 import Digraph ( SCC(..), stronglyConnComp )
47 import Maybes ( orElse )
48 import Util ( filterOut )
49 import Monad ( foldM )
52 -- ToDo: Put the annotations into the monad, so that they arrive in the proper
53 -- place and can be used when complaining.
55 The code tree received by the function @rnBinds@ contains definitions
56 in where-clauses which are all apparently mutually recursive, but which may
57 not really depend upon each other. For example, in the top level program
62 the definitions of @a@ and @y@ do not depend on each other at all.
63 Unfortunately, the typechecker cannot always check such definitions.
64 \footnote{Mycroft, A. 1984. Polymorphic type schemes and recursive
65 definitions. In Proceedings of the International Symposium on Programming,
66 Toulouse, pp. 217-39. LNCS 167. Springer Verlag.}
67 However, the typechecker usually can check definitions in which only the
68 strongly connected components have been collected into recursive bindings.
69 This is precisely what the function @rnBinds@ does.
71 ToDo: deal with case where a single monobinds binds the same variable
74 The vertag tag is a unique @Int@; the tags only need to be unique
75 within one @MonoBinds@, so that unique-Int plumbing is done explicitly
76 (heavy monad machinery not needed).
79 %************************************************************************
81 %* naming conventions *
83 %************************************************************************
85 \subsection[name-conventions]{Name conventions}
87 The basic algorithm involves walking over the tree and returning a tuple
88 containing the new tree plus its free variables. Some functions, such
89 as those walking polymorphic bindings (HsBinds) and qualifier lists in
90 list comprehensions (@Quals@), return the variables bound in local
91 environments. These are then used to calculate the free variables of the
92 expression evaluated in these environments.
94 Conventions for variable names are as follows:
97 new code is given a prime to distinguish it from the old.
100 a set of variables defined in @Exp@ is written @dvExp@
103 a set of variables free in @Exp@ is written @fvExp@
106 %************************************************************************
108 %* analysing polymorphic bindings (HsBindGroup, HsBind)
110 %************************************************************************
112 \subsubsection[dep-HsBinds]{Polymorphic bindings}
114 Non-recursive expressions are reconstructed without any changes at top
115 level, although their component expressions may have to be altered.
116 However, non-recursive expressions are currently not expected as
117 \Haskell{} programs, and this code should not be executed.
119 Monomorphic bindings contain information that is returned in a tuple
120 (a @FlatMonoBinds@) containing:
124 a unique @Int@ that serves as the ``vertex tag'' for this binding.
127 the name of a function or the names in a pattern. These are a set
128 referred to as @dvLhs@, the defined variables of the left hand side.
131 the free variables of the body. These are referred to as @fvBody@.
134 the definition's actual code. This is referred to as just @code@.
137 The function @nonRecDvFv@ returns two sets of variables. The first is
138 the set of variables defined in the set of monomorphic bindings, while the
139 second is the set of free variables in those bindings.
141 The set of variables defined in a non-recursive binding is just the
142 union of all of them, as @union@ removes duplicates. However, the
143 free variables in each successive set of cumulative bindings is the
144 union of those in the previous set plus those of the newest binding after
145 the defined variables of the previous set have been removed.
147 @rnMethodBinds@ deals only with the declarations in class and
148 instance declarations. It expects only to see @FunMonoBind@s, and
149 it expects the global environment to contain bindings for the binders
150 (which are all class operations).
152 %************************************************************************
154 \subsubsection{ Top-level bindings}
156 %************************************************************************
158 @rnTopMonoBinds@ assumes that the environment already
159 contains bindings for the binders of this particular binding.
162 rnTopBinds :: HsValBinds RdrName -> RnM (HsValBinds Name, DefUses)
164 -- The binders of the binding are in scope already;
165 -- the top level scope resolution does that
168 = do { is_boot <- tcIsHsBoot
169 ; if is_boot then rnTopBindsBoot binds
170 else rnTopBindsSrc binds }
172 rnTopBindsBoot :: HsValBinds RdrName -> RnM (HsValBinds Name, DefUses)
173 -- A hs-boot file has no bindings.
174 -- Return a single HsBindGroup with empty binds and renamed signatures
175 rnTopBindsBoot (ValBindsIn mbinds sigs)
176 = do { checkErr (isEmptyLHsBinds mbinds) (bindsInHsBootFile mbinds)
177 ; sigs' <- renameSigs okHsBootSig sigs
178 ; return (ValBindsOut [] sigs', usesOnly (hsSigsFVs sigs')) }
180 rnTopBindsSrc :: HsValBinds RdrName -> RnM (HsValBinds Name, DefUses)
181 rnTopBindsSrc binds = rnValBinds noTrim binds
186 %*********************************************************
190 %*********************************************************
194 :: HsLocalBinds RdrName
195 -> (HsLocalBinds Name -> RnM (result, FreeVars))
196 -> RnM (result, FreeVars)
197 -- This version (a) assumes that the binding vars are not already in scope
198 -- (b) removes the binders from the free vars of the thing inside
199 -- The parser doesn't produce ThenBinds
200 rnLocalBindsAndThen EmptyLocalBinds thing_inside
201 = thing_inside EmptyLocalBinds
203 rnLocalBindsAndThen (HsValBinds val_binds) thing_inside
204 = rnValBindsAndThen val_binds $ \ val_binds' ->
205 thing_inside (HsValBinds val_binds')
207 rnLocalBindsAndThen (HsIPBinds binds) thing_inside
208 = rnIPBinds binds `thenM` \ (binds',fv_binds) ->
209 thing_inside (HsIPBinds binds') `thenM` \ (thing, fvs_thing) ->
210 returnM (thing, fvs_thing `plusFV` fv_binds)
213 rnIPBinds (IPBinds ip_binds _no_dict_binds)
214 = do { (ip_binds', fvs_s) <- mapAndUnzipM (wrapLocFstM rnIPBind) ip_binds
215 ; return (IPBinds ip_binds' emptyLHsBinds, plusFVs fvs_s) }
217 rnIPBind (IPBind n expr)
218 = newIPNameRn n `thenM` \ name ->
219 rnLExpr expr `thenM` \ (expr',fvExpr) ->
220 return (IPBind name expr', fvExpr)
224 %************************************************************************
228 %************************************************************************
231 rnValBindsAndThen :: HsValBinds RdrName
232 -> (HsValBinds Name -> RnM (result, FreeVars))
233 -> RnM (result, FreeVars)
235 rnValBindsAndThen binds@(ValBindsIn mbinds sigs) thing_inside
236 = -- Extract all the binders in this group, and extend the
237 -- current scope, inventing new names for the new binders
238 -- This also checks that the names form a set
239 bindLocatedLocalsRn doc mbinders_w_srclocs $ \ bndrs ->
241 -- Then install local fixity declarations
242 -- Notice that they scope over thing_inside too
243 bindLocalFixities [sig | L _ (FixSig sig) <- sigs ] $
246 rnValBinds (trimWith bndrs) binds `thenM` \ (binds, bind_dus) ->
248 -- Now do the "thing inside"
249 thing_inside binds `thenM` \ (result,result_fvs) ->
251 -- Final error checking
253 all_uses = duUses bind_dus `plusFV` result_fvs
254 -- duUses: It's important to return all the uses, not the 'real uses'
255 -- used for warning about unused bindings. Otherwise consider:
257 -- y = let p = x in 'x' -- NB: p not used
258 -- If we don't "see" the dependency of 'y' on 'x', we may put the
259 -- bindings in the wrong order, and the type checker will complain
260 -- that x isn't in scope
262 unused_bndrs = [ b | b <- bndrs, not (b `elemNameSet` all_uses)]
264 warnUnusedLocalBinds unused_bndrs `thenM_`
266 returnM (result, delListFromNameSet all_uses bndrs)
268 mbinders_w_srclocs = collectHsBindLocatedBinders mbinds
269 doc = text "In the binding group for:"
270 <+> pprWithCommas ppr (map unLoc mbinders_w_srclocs)
272 ---------------------
273 rnValBinds :: (FreeVars -> FreeVars)
274 -> HsValBinds RdrName
275 -> RnM (HsValBinds Name, DefUses)
276 -- Assumes the binders of the binding are in scope already
278 rnValBinds trim (ValBindsIn mbinds sigs)
279 = do { sigs' <- rename_sigs sigs
281 ; binds_w_dus <- mapBagM (rnBind (mkSigTvFn sigs') trim) mbinds
283 ; let (binds', bind_dus) = depAnalBinds binds_w_dus
285 -- We do the check-sigs after renaming the bindings,
286 -- so that we have convenient access to the binders
287 ; check_sigs (okBindSig (duDefs bind_dus)) sigs'
289 ; return (ValBindsOut binds' sigs',
290 usesOnly (hsSigsFVs sigs') `plusDU` bind_dus) }
293 ---------------------
294 depAnalBinds :: Bag (LHsBind Name, [Name], Uses)
295 -> ([(RecFlag, LHsBinds Name)], DefUses)
296 -- Dependency analysis; this is important so that
297 -- unused-binding reporting is accurate
298 depAnalBinds binds_w_dus
299 = (map get_binds sccs, map get_du sccs)
301 sccs = stronglyConnComp edges
303 keyd_nodes = bagToList binds_w_dus `zip` [0::Int ..]
305 edges = [ (node, key, [key | n <- nameSetToList uses,
306 Just key <- [lookupNameEnv key_map n] ])
307 | (node@(_,_,uses), key) <- keyd_nodes ]
309 key_map :: NameEnv Int -- Which binding it comes from
310 key_map = mkNameEnv [(bndr, key) | ((_, bndrs, _), key) <- keyd_nodes
313 get_binds (AcyclicSCC (bind, _, _)) = (NonRecursive, unitBag bind)
314 get_binds (CyclicSCC binds_w_dus) = (Recursive, listToBag [b | (b,d,u) <- binds_w_dus])
316 get_du (AcyclicSCC (_, bndrs, uses)) = (Just (mkNameSet bndrs), uses)
317 get_du (CyclicSCC binds_w_dus) = (Just defs, uses)
319 defs = mkNameSet [b | (_,bs,_) <- binds_w_dus, b <- bs]
320 uses = unionManyNameSets [u | (_,_,u) <- binds_w_dus]
323 ---------------------
324 -- Bind the top-level forall'd type variables in the sigs.
327 -- The 'a' scopes over the rhs
329 -- NB: there'll usually be just one (for a function binding)
330 -- but if there are many, one may shadow the rest; too bad!
331 -- e.g x :: [a] -> [a]
334 -- In e, 'a' will be in scope, and it'll be the one from 'y'!
336 mkSigTvFn :: [LSig Name] -> (Name -> [Name])
337 -- Return a lookup function that maps an Id Name to the names
338 -- of the type variables that should scope over its body..
340 = \n -> lookupNameEnv env n `orElse` []
342 env :: NameEnv [Name]
343 env = mkNameEnv [ (name, map hsLTyVarName ltvs)
344 | L _ (TypeSig (L _ name)
345 (L _ (HsForAllTy Explicit ltvs _ _))) <- sigs]
346 -- Note the pattern-match on "Explicit"; we only bind
347 -- type variables from signatures with an explicit top-level for-all
349 -- The trimming function trims the free vars we attach to a
350 -- binding so that it stays reasonably small
351 noTrim :: FreeVars -> FreeVars
352 noTrim fvs = fvs -- Used at top level
354 trimWith :: [Name] -> FreeVars -> FreeVars
355 -- Nested bindings; trim by intersection with the names bound here
356 trimWith bndrs = intersectNameSet (mkNameSet bndrs)
358 ---------------------
359 rnBind :: (Name -> [Name]) -- Signature tyvar function
360 -> (FreeVars -> FreeVars) -- Trimming function for rhs free vars
362 -> RnM (LHsBind Name, [Name], Uses)
363 rnBind sig_fn trim (L loc (PatBind { pat_lhs = pat, pat_rhs = grhss }))
365 do { (pat', pat_fvs) <- rnLPat pat
367 ; let bndrs = collectPatBinders pat'
369 ; (grhss', fvs) <- rnGRHSs PatBindRhs grhss
370 -- No scoped type variables for pattern bindings
372 ; return (L loc (PatBind { pat_lhs = pat', pat_rhs = grhss',
373 pat_rhs_ty = placeHolderType, bind_fvs = trim fvs }),
374 bndrs, pat_fvs `plusFV` fvs) }
376 rnBind sig_fn trim (L loc (FunBind { fun_id = name, fun_infix = inf, fun_matches = matches }))
378 do { new_name <- lookupLocatedBndrRn name
379 ; let plain_name = unLoc new_name
381 ; (matches', fvs) <- bindSigTyVarsFV (sig_fn plain_name) $
382 -- bindSigTyVars tests for Opt_ScopedTyVars
383 rnMatchGroup (FunRhs plain_name) matches
385 ; checkPrecMatch inf plain_name matches'
387 ; return (L loc (FunBind { fun_id = new_name, fun_infix = inf, fun_matches = matches',
388 bind_fvs = trim fvs, fun_co_fn = idHsWrapper, fun_tick = Nothing }),
394 @rnMethodBinds@ is used for the method bindings of a class and an instance
395 declaration. Like @rnBinds@ but without dependency analysis.
397 NOTA BENE: we record each {\em binder} of a method-bind group as a free variable.
398 That's crucial when dealing with an instance decl:
400 instance Foo (T a) where
403 This might be the {\em sole} occurrence of @op@ for an imported class @Foo@,
404 and unless @op@ occurs we won't treat the type signature of @op@ in the class
405 decl for @Foo@ as a source of instance-decl gates. But we should! Indeed,
406 in many ways the @op@ in an instance decl is just like an occurrence, not
410 rnMethodBinds :: Name -- Class name
411 -> (Name -> [Name]) -- Signature tyvar function
412 -> [Name] -- Names for generic type variables
414 -> RnM (LHsBinds Name, FreeVars)
416 rnMethodBinds cls sig_fn gen_tyvars binds
417 = foldM do_one (emptyBag,emptyFVs) (bagToList binds)
418 where do_one (binds,fvs) bind = do
419 (bind', fvs_bind) <- rnMethodBind cls sig_fn gen_tyvars bind
420 return (bind' `unionBags` binds, fvs_bind `plusFV` fvs)
422 rnMethodBind cls sig_fn gen_tyvars (L loc (FunBind { fun_id = name, fun_infix = inf,
423 fun_matches = MatchGroup matches _ }))
425 lookupLocatedInstDeclBndr cls name `thenM` \ sel_name ->
426 let plain_name = unLoc sel_name in
427 -- We use the selector name as the binder
429 bindSigTyVarsFV (sig_fn plain_name) $
430 mapFvRn (rn_match plain_name) matches `thenM` \ (new_matches, fvs) ->
432 new_group = MatchGroup new_matches placeHolderType
434 checkPrecMatch inf plain_name new_group `thenM_`
435 returnM (unitBag (L loc (FunBind {
436 fun_id = sel_name, fun_infix = inf,
437 fun_matches = new_group,
438 bind_fvs = fvs, fun_co_fn = idHsWrapper,
439 fun_tick = Nothing })),
440 fvs `addOneFV` plain_name)
441 -- The 'fvs' field isn't used for method binds
443 -- Truly gruesome; bring into scope the correct members of the generic
444 -- type variables. See comments in RnSource.rnSourceDecl(ClassDecl)
445 rn_match sel_name match@(L _ (Match (L _ (TypePat ty) : _) _ _))
446 = extendTyVarEnvFVRn gen_tvs $
447 rnMatch (FunRhs sel_name) match
449 tvs = map (rdrNameOcc.unLoc) (extractHsTyRdrTyVars ty)
450 gen_tvs = [tv | tv <- gen_tyvars, nameOccName tv `elem` tvs]
452 rn_match sel_name match = rnMatch (FunRhs sel_name) match
455 -- Can't handle method pattern-bindings which bind multiple methods.
456 rnMethodBind cls sig_fn gen_tyvars mbind@(L loc (PatBind other_pat _ _ _))
457 = addLocErr mbind methodBindErr `thenM_`
458 returnM (emptyBag, emptyFVs)
463 %************************************************************************
465 \subsubsection[dep-Sigs]{Signatures (and user-pragmas for values)}
467 %************************************************************************
469 @renameSigs@ checks for:
471 \item more than one sig for one thing;
472 \item signatures given for things not bound here;
473 \item with suitably flaggery, that all top-level things have type signatures.
476 At the moment we don't gather free-var info from the types in
477 signatures. We'd only need this if we wanted to report unused tyvars.
480 renameSigs :: (LSig Name -> Bool) -> [LSig RdrName] -> RnM [LSig Name]
481 -- Renames the signatures and performs error checks
482 renameSigs ok_sig sigs
483 = do { sigs' <- rename_sigs sigs
484 ; check_sigs ok_sig sigs'
487 ----------------------
488 rename_sigs :: [LSig RdrName] -> RnM [LSig Name]
489 rename_sigs sigs = mappM (wrapLocM renameSig)
490 (filter (not . isFixityLSig) sigs)
491 -- Remove fixity sigs which have been dealt with already
493 ----------------------
494 check_sigs :: (LSig Name -> Bool) -> [LSig Name] -> RnM ()
495 -- Used for class and instance decls, as well as regular bindings
496 check_sigs ok_sig sigs
497 -- Check for (a) duplicate signatures
498 -- (b) signatures for things not in this group
499 = do { mappM_ unknownSigErr (filter (not . ok_sig) sigs')
500 ; mappM_ dupSigDeclErr (findDupsEq eqHsSig sigs') }
502 -- Don't complain about an unbound name again
503 sigs' = filterOut bad_name sigs
504 bad_name sig = case sigName sig of
505 Just n -> isUnboundName n
508 -- We use lookupLocatedSigOccRn in the signatures, which is a little bit unsatisfactory
509 -- because this won't work for:
510 -- instance Foo T where
513 -- We'll just rename the INLINE prag to refer to whatever other 'op'
514 -- is in scope. (I'm assuming that Baz.op isn't in scope unqualified.)
515 -- Doesn't seem worth much trouble to sort this.
517 renameSig :: Sig RdrName -> RnM (Sig Name)
518 -- FixitSig is renamed elsewhere.
519 renameSig (TypeSig v ty)
520 = lookupLocatedSigOccRn v `thenM` \ new_v ->
521 rnHsSigType (quotes (ppr v)) ty `thenM` \ new_ty ->
522 returnM (TypeSig new_v new_ty)
524 renameSig (SpecInstSig ty)
525 = rnLHsType (text "A SPECIALISE instance pragma") ty `thenM` \ new_ty ->
526 returnM (SpecInstSig new_ty)
528 renameSig (SpecSig v ty inl)
529 = lookupLocatedSigOccRn v `thenM` \ new_v ->
530 rnHsSigType (quotes (ppr v)) ty `thenM` \ new_ty ->
531 returnM (SpecSig new_v new_ty inl)
533 renameSig (InlineSig v s)
534 = lookupLocatedSigOccRn v `thenM` \ new_v ->
535 returnM (InlineSig new_v s)
539 ************************************************************************
543 ************************************************************************
546 rnMatchGroup :: HsMatchContext Name -> MatchGroup RdrName -> RnM (MatchGroup Name, FreeVars)
547 rnMatchGroup ctxt (MatchGroup ms _)
548 = mapFvRn (rnMatch ctxt) ms `thenM` \ (new_ms, ms_fvs) ->
549 returnM (MatchGroup new_ms placeHolderType, ms_fvs)
551 rnMatch :: HsMatchContext Name -> LMatch RdrName -> RnM (LMatch Name, FreeVars)
552 rnMatch ctxt = wrapLocFstM (rnMatch' ctxt)
554 rnMatch' ctxt match@(Match pats maybe_rhs_sig grhss)
556 -- Deal with the rhs type signature
557 bindPatSigTyVarsFV rhs_sig_tys $
558 doptM Opt_GlasgowExts `thenM` \ opt_GlasgowExts ->
559 (case maybe_rhs_sig of
560 Nothing -> returnM (Nothing, emptyFVs)
561 Just ty | opt_GlasgowExts -> rnHsTypeFVs doc_sig ty `thenM` \ (ty', ty_fvs) ->
562 returnM (Just ty', ty_fvs)
563 | otherwise -> addLocErr ty patSigErr `thenM_`
564 returnM (Nothing, emptyFVs)
565 ) `thenM` \ (maybe_rhs_sig', ty_fvs) ->
567 -- Now the main event
568 rnPatsAndThen ctxt pats $ \ pats' ->
569 rnGRHSs ctxt grhss `thenM` \ (grhss', grhss_fvs) ->
571 returnM (Match pats' maybe_rhs_sig' grhss', grhss_fvs `plusFV` ty_fvs)
572 -- The bindPatSigTyVarsFV and rnPatsAndThen will remove the bound FVs
574 rhs_sig_tys = case maybe_rhs_sig of
577 doc_sig = text "In a result type-signature"
581 %************************************************************************
583 \subsubsection{Guarded right-hand sides (GRHSs)}
585 %************************************************************************
588 rnGRHSs :: HsMatchContext Name -> GRHSs RdrName -> RnM (GRHSs Name, FreeVars)
590 rnGRHSs ctxt (GRHSs grhss binds)
591 = rnLocalBindsAndThen binds $ \ binds' ->
592 mapFvRn (rnGRHS ctxt) grhss `thenM` \ (grhss', fvGRHSs) ->
593 returnM (GRHSs grhss' binds', fvGRHSs)
595 rnGRHS :: HsMatchContext Name -> LGRHS RdrName -> RnM (LGRHS Name, FreeVars)
596 rnGRHS ctxt = wrapLocFstM (rnGRHS' ctxt)
598 rnGRHS' ctxt (GRHS guards rhs)
599 = do { opt_GlasgowExts <- doptM Opt_GlasgowExts
600 ; ((guards', rhs'), fvs) <- rnStmts (PatGuard ctxt) guards $
603 ; checkM (opt_GlasgowExts || is_standard_guard guards')
604 (addWarn (nonStdGuardErr guards'))
606 ; return (GRHS guards' rhs', fvs) }
608 -- Standard Haskell 1.4 guards are just a single boolean
609 -- expression, rather than a list of qualifiers as in the
611 is_standard_guard [] = True
612 is_standard_guard [L _ (ExprStmt _ _ _)] = True
613 is_standard_guard other = False
616 %************************************************************************
618 \subsection{Error messages}
620 %************************************************************************
623 dupSigDeclErr sigs@(L loc sig : _)
625 vcat [ptext SLIT("Duplicate") <+> what_it_is <> colon,
626 nest 2 (vcat (map ppr_sig sigs))]
628 what_it_is = hsSigDoc sig
629 ppr_sig (L loc sig) = ppr loc <> colon <+> ppr sig
631 unknownSigErr (L loc sig)
632 = do { mod <- getModule
634 vcat [sep [ptext SLIT("Misplaced") <+> what_it_is <> colon, ppr sig],
635 extra_stuff mod sig] }
637 what_it_is = hsSigDoc sig
638 extra_stuff mod (TypeSig (L _ n) _)
639 | nameIsLocalOrFrom mod n
640 = ptext SLIT("The type signature must be given where")
641 <+> quotes (ppr n) <+> ptext SLIT("is declared")
643 = ptext SLIT("You cannot give a type signature for an imported value")
645 extra_stuff mod other = empty
648 = hang (ptext SLIT("Pattern bindings (except simple variables) not allowed in instance declarations"))
651 bindsInHsBootFile mbinds
652 = hang (ptext SLIT("Bindings in hs-boot files are not allowed"))
655 nonStdGuardErr guards
656 = hang (ptext SLIT("accepting non-standard pattern guards (-fglasgow-exts to suppress this message)"))
657 4 (interpp'SP guards)