Commit 83efb985 authored by rodlogic's avatar rodlogic Committed by Austin Seipp

Replace .lhs with .hs in compiler comments

Summary: It looks like during .lhs -> .hs switch the comments were not updated. So doing exactly that.

Reviewers: austin, jstolarek, hvr, goldfire

Reviewed By: austin, jstolarek

Subscribers: thomie, goldfire

Differential Revision: https://phabricator.haskell.org/D621

GHC Trac Issues: #9986
parent a741e69a
......@@ -449,7 +449,7 @@ instance Outputable Origin where
-}
-- | The semantics allowed for overlapping instances for a particular
-- instance. See Note [Safe Haskell isSafeOverlap] (in `InstEnv.lhs`) for a
-- instance. See Note [Safe Haskell isSafeOverlap] (in `InstEnv.hs`) for a
-- explanation of the `isSafeOverlap` field.
--
-- - 'ApiAnnotation.AnnKeywordId' :
......@@ -955,7 +955,7 @@ The main effects of CONLIKE are:
- A CoreUnfolding has a field that caches exprIsExpandable
- The rule matcher consults this field. See
Note [Expanding variables] in Rules.lhs.
Note [Expanding variables] in Rules.hs.
-}
isConLike :: RuleMatchInfo -> Bool
......
......@@ -413,7 +413,7 @@ data DataConRep
-- and *including* all evidence args
, dcr_stricts :: [StrictnessMark] -- 1-1 with dcr_arg_tys
-- See also Note [Data-con worker strictness] in MkId.lhs
-- See also Note [Data-con worker strictness] in MkId.hs
, dcr_bangs :: [HsImplBang] -- The actual decisions made (including failures)
-- about the original arguments; 1-1 with orig_arg_tys
......
......@@ -571,7 +571,7 @@ setIdDemandInfo id dmd = modifyIdInfo (`setDemandInfo` dmd) id
---------------------------------
-- SPECIALISATION
-- See Note [Specialisations and RULES in IdInfo] in IdInfo.lhs
-- See Note [Specialisations and RULES in IdInfo] in IdInfo.hs
idSpecialisation :: Id -> SpecInfo
idSpecialisation id = specInfo (idInfo id)
......@@ -681,7 +681,7 @@ isStateHackType ty
-- It would be better to spot that r was one-shot to start with, but
-- I don't want to rely on that.
--
-- Another good example is in fill_in in PrelPack.lhs. We should be able to
-- Another good example is in fill_in in PrelPack.hs. We should be able to
-- spot that fill_in has arity 2 (and when Keith is done, we will) but we can't yet.
......
......@@ -411,7 +411,7 @@ seqSpecInfo (SpecInfo rules fvs) = seqRules rules `seq` seqVarSet fvs
************************************************************************
-}
-- CafInfo is used to build Static Reference Tables (see simplStg/SRT.lhs).
-- CafInfo is used to build Static Reference Tables (see simplStg/SRT.hs).
-- | Records whether an 'Id' makes Constant Applicative Form references
data CafInfo
......
......@@ -1184,7 +1184,7 @@ a) Its second arg can have an unboxed type
b) Its fixity is set in LoadIface.ghcPrimIface
c) It has quite a bit of desugaring magic.
See DsUtils.lhs Note [Desugaring seq (1)] and (2) and (3)
See DsUtils.hs Note [Desugaring seq (1)] and (2) and (3)
d) There is some special rule handing: Note [User-defined RULES for seq]
......
......@@ -152,7 +152,7 @@ data NameSpace = VarName -- Variables, including "real" data constructors
{-! derive: Binary !-}
-- Note [Data Constructors]
-- see also: Note [Data Constructor Naming] in DataCon.lhs
-- see also: Note [Data Constructor Naming] in DataCon.hs
--
-- $real_vs_source_data_constructors
-- There are two forms of data constructor:
......
......@@ -337,7 +337,7 @@ idDetails (Id { id_details = details }) = details
idDetails other = pprPanic "idDetails" (ppr other)
-- The next three have a 'Var' suffix even though they always build
-- Ids, because Id.lhs uses 'mkGlobalId' etc with different types
-- Ids, because Id.hs uses 'mkGlobalId' etc with different types
mkGlobalVar :: IdDetails -> Name -> Type -> IdInfo -> Id
mkGlobalVar details name ty info
= mk_id name ty GlobalId details info
......
......@@ -198,7 +198,7 @@ buildSRT dflags topSRT cafs =
return (topSRT, sub_tbls, blockSRTs)
-- Construct an SRT bitmap.
-- Adapted from simpleStg/SRT.lhs, which expects Id's.
-- Adapted from simpleStg/SRT.hs, which expects Id's.
procpointSRT :: DynFlags -> CLabel -> Map CLabel Int -> [CLabel] ->
UniqSM (Maybe CmmDecl, C_SRT)
procpointSRT _ _ _ [] =
......
......@@ -741,7 +741,7 @@ closureDescription :: DynFlags
-> Name -- Id of closure binding
-> String
-- Not called for StgRhsCon which have global info tables built in
-- CgConTbls.lhs with a description generated from the data constructor
-- CgConTbls.hs with a description generated from the data constructor
closureDescription dflags mod_name name
= showSDocDump dflags (char '<' <>
(if isExternalName name
......
......@@ -701,7 +701,7 @@ cgIdApp fun_id args = do
--
-- Self-recursive tail calls can be optimized into a local jump in the same
-- way as let-no-escape bindings (see Note [What is a non-escaping let] in
-- stgSyn/CoreToStg.lhs). Consider this:
-- stgSyn/CoreToStg.hs). Consider this:
--
-- foo.info:
-- a = R1 // calling convention
......
......@@ -609,7 +609,7 @@ The (foo DInt) is floated out, and makes ineffective a RULE
One could go further and make exprIsCheap reply True to any
dictionary-typed expression, but that's more work.
See Note [Dictionary-like types] in TcType.lhs for why we use
See Note [Dictionary-like types] in TcType.hs for why we use
isDictLikeTy here rather than isDictTy
Note [Eta expanding thunks]
......
......@@ -291,7 +291,7 @@ idRuleRhsVars is_active id
get_fvs (Rule { ru_fn = fn, ru_bndrs = bndrs
, ru_rhs = rhs, ru_act = act })
| is_active act
-- See Note [Finding rule RHS free vars] in OccAnal.lhs
-- See Note [Finding rule RHS free vars] in OccAnal.hs
= delFromUFM fvs fn -- Note [Rule free var hack]
where
fvs = addBndrs bndrs (expr_fvs rhs) isLocalVar emptyVarSet
......@@ -390,7 +390,7 @@ delBinderFV :: Var -> VarSet -> VarSet
-- the free tyvars of the types of the binders, and include these in the
-- free vars of the group, attached to the top level of each RHS.
--
-- This actually happened in the defn of errorIO in IOBase.lhs:
-- This actually happened in the defn of errorIO in IOBase.hs:
-- errorIO (ST io) = case (errorIO# io) of
-- _ -> bottom
-- where
......
......@@ -108,7 +108,7 @@ The goal of this pass is to prepare for code generation.
We want curried definitions for all of these in case they
aren't inlined by some caller.
9. Replace (lazy e) by e. See Note [lazyId magic] in MkId.lhs
9. Replace (lazy e) by e. See Note [lazyId magic] in MkId.hs
10. Convert (LitInteger i t) into the core representation
for the Integer i. Normally this uses mkInteger, but if
......
......@@ -242,7 +242,7 @@ These data types are the heart of the compiler
-- * A coercion
-- If you edit this type, you may need to update the GHC formalism
-- See Note [GHC Formalism] in coreSyn/CoreLint.lhs
-- See Note [GHC Formalism] in coreSyn/CoreLint.hs
data Expr b
= Var Id
| Lit Literal
......@@ -265,13 +265,13 @@ type Arg b = Expr b
-- The default alternative is @(DEFAULT, [], rhs)@
-- If you edit this type, you may need to update the GHC formalism
-- See Note [GHC Formalism] in coreSyn/CoreLint.lhs
-- See Note [GHC Formalism] in coreSyn/CoreLint.hs
type Alt b = (AltCon, [b], Expr b)
-- | A case alternative constructor (i.e. pattern match)
-- If you edit this type, you may need to update the GHC formalism
-- See Note [GHC Formalism] in coreSyn/CoreLint.lhs
-- See Note [GHC Formalism] in coreSyn/CoreLint.hs
data AltCon
= DataAlt DataCon -- ^ A plain data constructor: @case e of { Foo x -> ... }@.
-- Invariant: the 'DataCon' is always from a @data@ type, and never from a @newtype@
......@@ -286,7 +286,7 @@ data AltCon
-- | Binding, used for top level bindings in a module and local bindings in a @let@.
-- If you edit this type, you may need to update the GHC formalism
-- See Note [GHC Formalism] in coreSyn/CoreLint.lhs
-- See Note [GHC Formalism] in coreSyn/CoreLint.hs
data Bind b = NonRec b (Expr b)
| Rec [(b, (Expr b))]
deriving (Data, Typeable)
......@@ -435,7 +435,7 @@ unboxed type.
-- | Allows attaching extra information to points in expressions
-- If you edit this type, you may need to update the GHC formalism
-- See Note [GHC Formalism] in coreSyn/CoreLint.lhs
-- See Note [GHC Formalism] in coreSyn/CoreLint.hs
data Tickish id =
-- | An @{-# SCC #-}@ profiling annotation, either automatically
-- added by the desugarer as a result of -auto-all, or added by
......@@ -761,7 +761,7 @@ data CoreRule
-- arguments, it simply discards them; the returned 'CoreExpr'
-- is just the rewrite of 'ru_fn' applied to the first 'ru_nargs' args
}
-- See Note [Extra args in rule matching] in Rules.lhs
-- See Note [Extra args in rule matching] in Rules.hs
type RuleFun = DynFlags -> InScopeEnv -> Id -> [CoreExpr] -> Maybe CoreExpr
type InScopeEnv = (InScopeSet, IdUnfoldingFun)
......@@ -918,7 +918,7 @@ data UnfoldingSource
| InlineCompulsory -- Something that *has* no binding, so you *must* inline it
-- Only a few primop-like things have this property
-- (see MkId.lhs, calls to mkCompulsoryUnfolding).
-- (see MkId.hs, calls to mkCompulsoryUnfolding).
-- Inline absolutely always, however boring the context.
......@@ -1097,7 +1097,7 @@ isExpandableUnfolding _ = False
expandUnfolding_maybe :: Unfolding -> Maybe CoreExpr
-- Expand an expandable unfolding; this is used in rule matching
-- See Note [Expanding variables] in Rules.lhs
-- See Note [Expanding variables] in Rules.hs
-- The key point here is that CONLIKE things can be expanded
expandUnfolding_maybe (CoreUnfolding { uf_expandable = True, uf_tmpl = rhs }) = Just rhs
expandUnfolding_maybe _ = Nothing
......@@ -1253,7 +1253,7 @@ a list of CoreBind
-}
-- If you edit this type, you may need to update the GHC formalism
-- See Note [GHC Formalism] in coreSyn/CoreLint.lhs
-- See Note [GHC Formalism] in coreSyn/CoreLint.hs
type CoreProgram = [CoreBind] -- See Note [CoreProgram]
-- | The common case for the type of binders and variables when
......@@ -1442,7 +1442,7 @@ varsToCoreExprs vs = map varToCoreExpr vs
-- | Extract every variable by this group
bindersOf :: Bind b -> [b]
-- If you edit this function, you may need to update the GHC formalism
-- See Note [GHC Formalism] in coreSyn/CoreLint.lhs
-- See Note [GHC Formalism] in coreSyn/CoreLint.hs
bindersOf (NonRec binder _) = [binder]
bindersOf (Rec pairs) = [binder | (binder, _) <- pairs]
......
......@@ -818,7 +818,7 @@ the moment we go for the slightly more aggressive version which treats
Note [exprIsCheap] See also Note [Interaction of exprIsCheap and lone variables]
~~~~~~~~~~~~~~~~~~ in CoreUnfold.lhs
~~~~~~~~~~~~~~~~~~ in CoreUnfold.hs
@exprIsCheap@ looks at a Core expression and returns \tr{True} if
it is obviously in weak head normal form, or is cheap to get to WHNF.
[Note that that's not the same as exprIsDupable; an expression might be
......
......@@ -53,7 +53,7 @@ The algorithm is based on the first technique, but there are some differences:
left-to-right
\end{itemize}
(By the way the second technique is really similar to the one used in
@Match.lhs@ to generate code)
@Match.hs@ to generate code)
This function takes the equations of a pattern and returns:
\begin{itemize}
......@@ -628,7 +628,7 @@ make_whole_con con | isInfixCon con = nlInfixConPat name
Tidying equations
------------------------------------------------------------------------
tidy_eqn does more or less the same thing as @tidy@ in @Match.lhs@;
tidy_eqn does more or less the same thing as @tidy@ in @Match.hs@;
that is, it removes syntactic sugar, reducing the number of cases that
must be handled by the main checking algorithm. One difference is
that here we can do *all* the tidying at once (recursively), rather
......
......@@ -481,14 +481,14 @@ For record construction we do this (assuming T has three arguments)
T { op2 = e }
==>
let err = /\a -> recConErr a
T (recConErr t1 "M.lhs/230/op1")
T (recConErr t1 "M.hs/230/op1")
e
(recConErr t1 "M.lhs/230/op3")
(recConErr t1 "M.hs/230/op3")
\end{verbatim}
@recConErr@ then converts its arugment string into a proper message
before printing it as
\begin{verbatim}
M.lhs, line 230: missing field op1 was evaluated
M.hs, line 230: missing field op1 was evaluated
\end{verbatim}
We also handle @C{}@ as valid construction syntax for an unlabelled
......@@ -533,7 +533,7 @@ Then we translate as follows:
case r of
T1 op1 _ op3 -> T1 op1 op2 op3
T2 op4 _ -> T2 op4 op2
other -> recUpdError "M.lhs/230"
other -> recUpdError "M.hs/230"
\end{verbatim}
It's important that we use the constructor Ids for @T1@, @T2@ etc on the
RHSs, and do not generate a Core constructor application directly, because the constructor
......
......@@ -670,7 +670,7 @@ foreignExportInitialiser hs_fn =
-- Initialise foreign exports by registering a stable pointer from an
-- __attribute__((constructor)) function.
-- The alternative is to do this from stginit functions generated in
-- codeGen/CodeGen.lhs; however, stginit functions have a negative impact
-- codeGen/CodeGen.hs; however, stginit functions have a negative impact
-- on binary sizes and link times because the static linker will think that
-- all modules that are imported directly or indirectly are actually used by
-- the program.
......
......@@ -1154,7 +1154,7 @@ maybe_is_tagToEnum_call app
isDataTyCon tyc
= map (getName . dataConWorkId) (tyConDataCons tyc)
-- NOTE: use the worker name, not the source name of
-- the DataCon. See DataCon.lhs for details.
-- the DataCon. See DataCon.hs for details.
| otherwise
= pprPanic "maybe_is_tagToEnum_call.extract_constr_Ids" (ppr ty)
......
......@@ -1105,7 +1105,7 @@ linkPackage dflags pkg
let hs_libs = Packages.hsLibraries pkg
-- The FFI GHCi import lib isn't needed as
-- compiler/ghci/Linker.lhs + rts/Linker.c link the
-- compiler/ghci/Linker.hs + rts/Linker.c link the
-- interpreted references to FFI to the compiled FFI.
-- We therefore filter it out so that we don't get
-- duplicate symbol errors.
......
......@@ -890,7 +890,7 @@ cvtLit (StringPrimL s) = do { let { s' = BS.pack s }
cvtLit _ = panic "Convert.cvtLit: Unexpected literal"
-- cvtLit should not be called on IntegerL, RationalL
-- That precondition is established right here in
-- Convert.lhs, hence panic
-- Convert.hs, hence panic
w8ToString :: [Word8] -> String
w8ToString ws = map (\w -> chr (fromIntegral w)) ws
......
......@@ -370,7 +370,7 @@ Default methods
- If there is a default method name at all, it's recorded in
the ClassOpSig (in HsBinds), in the DefMeth field.
(DefMeth is defined in Class.lhs)
(DefMeth is defined in Class.hs)
Source-code class decls and interface-code class decls are treated subtly
differently, which has given me a great deal of confusion over the years.
......
......@@ -464,7 +464,7 @@ pprUserIfaceForAll tvs
tv_has_kind_var (_,t) = not (isEmptyUniqSet (ifTyVarsOfType t))
-------------------
-- See equivalent function in TypeRep.lhs
-- See equivalent function in TypeRep.hs
pprIfaceTyList :: TyPrec -> IfaceType -> IfaceType -> SDoc
-- Given a type-level list (t1 ': t2), see if we can print
-- it in list notation [t1, ...].
......
......@@ -194,7 +194,7 @@ checkWiredInTyCon tc
when (mod /= nameModule tc_name)
(initIfaceTcRn (loadWiredInHomeIface tc_name))
-- Don't look for (non-existent) Float.hi when
-- compiling Float.lhs, which mentions Float of course
-- compiling Float.hs, which mentions Float of course
-- A bit yukky to call initIfaceTcRn here
}
where
......
......@@ -824,7 +824,7 @@ runPhase (RealPhase (Unlit sf)) input_fn dflags
-- Coverage.addTicksToBinds where we check that the filename in
-- a SrcLoc is the same as the source filenaame, the two will
-- look bogusly different. See test:
-- libraries/hpc/tests/function/subdir/tough2.lhs
-- libraries/hpc/tests/function/subdir/tough2.hs
escape ('\\':cs) = '\\':'\\': escape cs
escape ('\"':cs) = '\\':'\"': escape cs
escape ('\'':cs) = '\\':'\'': escape cs
......@@ -1690,7 +1690,7 @@ mkNoteObjsToLinkIntoBinary dflags dep_packages = do
-- ALL generated assembly must have this section to disable
-- executable stacks. See also
-- compiler/nativeGen/AsmCodeGen.lhs for another instance
-- compiler/nativeGen/AsmCodeGen.hs for another instance
-- where we need to do this.
(if platformHasGnuNonexecStack (targetPlatform dflags)
then text ".section .note.GNU-stack,\"\",@progbits\n"
......
......@@ -302,7 +302,7 @@ findPackageModule hsc_env mod = do
-- | Look up the interface file associated with module @mod@. This function
-- requires a few invariants to be upheld: (1) the 'Module' in question must
-- be the module identifier of the *original* implementation of a module,
-- not a reexport (this invariant is upheld by @Packages.lhs@) and (2)
-- not a reexport (this invariant is upheld by @Packages.hs@) and (2)
-- the 'PackageConfig' must be consistent with the package key in the 'Module'.
-- The redundancy is to avoid an extra lookup in the package state
-- for the appropriate config.
......
......@@ -1185,7 +1185,7 @@ getGRE = withSession $ \hsc_env-> return $ ic_rn_gbl_env (hsc_IC hsc_env)
-- -----------------------------------------------------------------------------
{- ToDo: Move the primary logic here to compiler/main/Packages.lhs
{- ToDo: Move the primary logic here to compiler/main/Packages.hs
-- | Return all /external/ modules available in the package database.
-- Modules from the current session (i.e., from the 'HomePackageTable') are
-- not included. This includes module names which are reexported by packages.
......
......@@ -1063,7 +1063,7 @@ data ModGuts
-- ^ Family instances declared in this module
mg_patsyns :: ![PatSyn], -- ^ Pattern synonyms declared in this module
mg_rules :: ![CoreRule], -- ^ Before the core pipeline starts, contains
-- See Note [Overall plumbing for rules] in Rules.lhs
-- See Note [Overall plumbing for rules] in Rules.hs
mg_binds :: !CoreProgram, -- ^ Bindings for this module
mg_foreign :: !ForeignStubs, -- ^ Foreign exports declared in this module
mg_warns :: !Warnings, -- ^ Warnings declared in the module
......@@ -2706,7 +2706,7 @@ data HsParsedModule = HsParsedModule {
* *
************************************************************************
This stuff is in here, rather than (say) in Linker.lhs, because the Linker.lhs
This stuff is in here, rather than (say) in Linker.hs, because the Linker.hs
stuff is the *dynamic* linker, and isn't present in a stage-1 compiler
-}
......
......@@ -1263,7 +1263,7 @@ tidyTopIdInfo dflags rhs_tidy_env name orig_rhs tidy_rhs idinfo show_unfold caf_
-- the function returns bottom
-- In this case, show_unfold will be false (we don't expose unfoldings
-- for bottoming functions), but we might still have a worker/wrapper
-- split (see Note [Worker-wrapper for bottoming functions] in WorkWrap.lhs
-- split (see Note [Worker-wrapper for bottoming functions] in WorkWrap.hs
--------- Arity ------------
-- Usually the Id will have an accurate arity on it, because
......
......@@ -745,7 +745,7 @@ initializePicBase_ppc _ _ _ _
-- call 1f
-- 1: popl %picReg
-- addl __GLOBAL_OFFSET_TABLE__+.-1b, %picReg
-- (See PprMach.lhs)
-- (See PprMach.hs)
initializePicBase_x86
:: Arch -> OS -> Reg
......
......@@ -890,7 +890,7 @@ genCCall'
But there are substantial differences:
* The number of registers used for parameter passing and the exact set of
nonvolatile registers differs (see MachRegs.lhs).
nonvolatile registers differs (see MachRegs.hs).
* On Darwin, stack space is always reserved for parameters, even if they are
passed in registers. The called routine may choose to save parameters from
registers to the corresponding space on the stack.
......
......@@ -70,7 +70,7 @@ accSqueeze count maxCount squeeze ufm = acc count (eltsUFM ufm)
~~~~~~~~~~~~~~~~~~~~
BL 2007/09
Doing a nice fold over the UniqSet makes trivColorable use
32% of total compile time and 42% of total alloc when compiling SHA1.lhs from darcs.
32% of total compile time and 42% of total alloc when compiling SHA1.hs from darcs.
Therefore the UniqFM is made non-abstract and we use custom fold.
MS 2010/04
......@@ -78,7 +78,7 @@ When converting UniqFM to use Data.IntMap, the fold cannot use UniqFM internal
representation any more. But it is imperative that the assSqueeze stops
the folding if the count gets greater or equal to maxCount. We thus convert
UniqFM to a (lazy) list, do the fold and stops if necessary, which was
the most efficient variant tried. Benchmark compiling 10-times SHA1.lhs follows.
the most efficient variant tried. Benchmark compiling 10-times SHA1.hs follows.
(original = previous implementation, folding = fold of the whole UFM,
lazyFold = the current implementation,
hackFold = using internal representation of Data.IntMap)
......
......@@ -1003,7 +1003,7 @@ builtinIntegerRules =
rule_unop "complementInteger" complementIntegerName complement,
rule_Int_binop "shiftLInteger" shiftLIntegerName shiftL,
rule_Int_binop "shiftRInteger" shiftRIntegerName shiftR,
-- See Note [Integer division constant folding] in libraries/base/GHC/Real.lhs
-- See Note [Integer division constant folding] in libraries/base/GHC/Real.hs
rule_divop_one "quotInteger" quotIntegerName quot,
rule_divop_one "remInteger" remIntegerName rem,
rule_divop_one "divInteger" divIntegerName div,
......@@ -1134,7 +1134,7 @@ match_inline (Type _ : e : _)
match_inline _ = Nothing
-- See Note [magicDictId magic] in `basicTypes/MkId.lhs`
-- See Note [magicDictId magic] in `basicTypes/MkId.hs`
-- for a description of what is going on here.
match_magicDict :: [Expr CoreBndr] -> Maybe (Expr CoreBndr)
match_magicDict [Type _, Var wrap `App` Type a `App` Type _ `App` f, x, y ]
......
......@@ -185,7 +185,7 @@ A @Word#@ is an unsigned @Int#@.
@decodeDouble#@ is given w/ Integer-stuff (it's similar).
Decoding of floating-point numbers is sorta Integer-related. Encoding
is done with plain ccalls now (see PrelNumExtra.lhs).
is done with plain ccalls now (see PrelNumExtra.hs).
A @Weak@ Pointer is created by the @mkWeak#@ primitive:
......@@ -483,7 +483,7 @@ primOpOkForSideEffects op
{-
Note [primOpIsCheap]
~~~~~~~~~~~~~~~~~~~~
@primOpIsCheap@, as used in \tr{SimplUtils.lhs}. For now (HACK
@primOpIsCheap@, as used in \tr{SimplUtils.hs}. For now (HACK
WARNING), we just borrow some other predicates for a
what-should-be-good-enough test. "Cheap" means willing to call it more
than once, and/or push it inside a lambda. The latter could change the
......
......@@ -330,7 +330,7 @@ constraintKindTyCon = mkKindTyCon constraintKindTyConName superKind
-- ... and now their names
-- If you edit these, you may need to update the GHC formalism
-- See Note [GHC Formalism] in coreSyn/CoreLint.lhs
-- See Note [GHC Formalism] in coreSyn/CoreLint.hs
superKindTyConName = mkPrimTyConName (fsLit "BOX") superKindTyConKey superKindTyCon
anyKindTyConName = mkPrimTyConName (fsLit "AnyK") anyKindTyConKey anyKindTyCon
liftedTypeKindTyConName = mkPrimTyConName (fsLit "*") liftedTypeKindTyConKey liftedTypeKindTyCon
......@@ -528,7 +528,7 @@ realWorldStatePrimTy = mkStatePrimTy realWorldTy -- State# RealWorld
{-
Note: the ``state-pairing'' types are not truly primitive, so they are
defined in \tr{TysWiredIn.lhs}, not here.
defined in \tr{TysWiredIn.hs}, not here.
************************************************************************
* *
......
......@@ -1398,7 +1398,7 @@ newLocalBndrRn :: Located RdrName -> RnM Name
newLocalBndrRn (L loc rdr_name)
| Just name <- isExact_maybe rdr_name
= return name -- This happens in code generated by Template Haskell
-- See Note [Binders in Template Haskell] in Convert.lhs
-- See Note [Binders in Template Haskell] in Convert.hs
| otherwise
= do { unless (isUnqual rdr_name)
(addErrAt loc (badQualBndrErr rdr_name))
......
......@@ -240,7 +240,7 @@ newPatName (LetMk is_top fix_env) rdr_name
-- however, this binding seems to work, and it only exists for
-- the duration of the patterns and the continuation;
-- then the top-level name is added to the global env
-- before going on to the RHSes (see RnSource.lhs).
-- before going on to the RHSes (see RnSource.hs).
{-
Note [View pattern usage]
......
......@@ -413,7 +413,7 @@ showSplice what before after =
-- | The splice data to be logged
--
-- duplicates code in TcSplice.lhs
-- duplicates code in TcSplice.hs
data SpliceInfo
= SpliceInfo
{ spliceIsDeclaration :: Bool
......@@ -426,7 +426,7 @@ data SpliceInfo
-- | outputs splice information for 2 flags which have different output formats:
-- `-ddump-splices` and `-dth-dec-file`
--
-- This duplicates code in TcSplice.lhs
-- This duplicates code in TcSplice.hs
traceSplice :: SpliceInfo -> TcM ()
traceSplice sd = do
loc <- case sd of
......
......@@ -83,7 +83,7 @@ The fix is
to let bind the algebraic case scrutinees (done, I think) and
the case alternatives (except the ones with an
unboxed type)(not done, I think). This is best done in the
SetLevels.lhs module, which tags things with their level numbers.
SetLevels.hs module, which tags things with their level numbers.
\item
do the full laziness pass (floating lets outwards).
\item
......
......@@ -283,7 +283,7 @@ But what is the graph? NOT the same graph as was used for Note
'f' that is *always* inlined if it is applicable. We do *not* disable
rules for loop-breakers. It's up to whoever makes the rules to make
sure that the rules themselves always terminate. See Note [Rules for
recursive functions] in Simplify.lhs
recursive functions] in Simplify.hs
Hence, if
f's RHS (or its INLINE template if it has one) mentions g, and
......
......@@ -827,7 +827,7 @@ lvlLamBndrs env lvl bndrs
is_major bndr = isId bndr && not (isProbablyOneShotLambda bndr)
-- The "probably" part says "don't float things out of a
-- probable one-shot lambda"
-- See Note [Computing one-shot info] in Demand.lhs
-- See Note [Computing one-shot info] in Demand.hs
lvlBndrs :: LevelEnv -> Level -> [CoreBndr] -> (LevelEnv, [LevelledBndr])
......@@ -1050,7 +1050,7 @@ newPolyBndrs dest_lvl
add_subst env (v, v') = extendIdSubst env v (mkVarApps (Var v') abs_vars)
add_id env (v, v') = extendVarEnv env v ((v':abs_vars), mkVarApps (Var v') abs_vars)
mk_poly_bndr bndr uniq = transferPolyIdInfo bndr abs_vars $ -- Note [transferPolyIdInfo] in Id.lhs
mk_poly_bndr bndr uniq = transferPolyIdInfo bndr abs_vars $ -- Note [transferPolyIdInfo] in Id.hs
mkSysLocal (mkFastString str) uniq poly_ty
where
str = "poly_" ++ occNameString (getOccName bndr)
......
......@@ -296,7 +296,7 @@ getCoreToDo dflags
simpl_phase 0 ["post-liberate-case"] max_iter
]), -- Run the simplifier after LiberateCase to vastly
-- reduce the possiblility of shadowing
-- Reason: see Note [Shadowing] in SpecConstr.lhs
-- Reason: see Note [Shadowing] in SpecConstr.hs
runWhen spec_constr CoreDoSpecConstr,
......@@ -631,7 +631,7 @@ simplifyPgmIO pass@(CoreDoSimplify max_iterations mode)
(pprCoreBindings tagged_binds);
-- Get any new rules, and extend the rule base
-- See Note [Overall plumbing for rules] in Rules.lhs
-- See Note [Overall plumbing for rules] in Rules.hs
-- We need to do this regularly, because simplification can
-- poke on IdInfo thunks, which in turn brings in new rules
-- behind the scenes. Otherwise there's a danger we'll simply
......
......@@ -1488,7 +1488,7 @@ abstractFloats main_tvs body_env body
= do { uniq <- getUniqueM
; let poly_name = setNameUnique (idName var) uniq -- Keep same name
poly_ty = mkForAllTys tvs_here (idType var) -- But new type of course
poly_id = transferPolyIdInfo var tvs_here $ -- Note [transferPolyIdInfo] in Id.lhs
poly_id = transferPolyIdInfo var tvs_here $ -- Note [transferPolyIdInfo] in Id.hs
mkLocalId poly_name poly_ty
; return (poly_id, mkTyApps (Var poly_id) (mkTyVarTys tvs_here)) }
-- In the olden days, it was crucial to copy the occInfo of the original var,
......@@ -1621,7 +1621,7 @@ alternative; this picks up the common cases
b) some branches equal to the DEFAULT (which occurs first)
The case where Combine Identical Alternatives transformation showed up
was like this (base/Foreign/C/Err/Error.lhs):
was like this (base/Foreign/C/Err/Error.hs):
x | p `is` 1 -> e1
| p `is` 2 -> e2
......
......@@ -52,7 +52,7 @@ import ErrUtils
{-
The guts of the simplifier is in this module, but the driver loop for
the simplifier is in SimplCore.lhs.
the simplifier is in SimplCore.hs.
-----------------------------------------
......@@ -2158,7 +2158,7 @@ simplAlt env scrut' _ case_bndr' cont' (DataAlt con, vs, rhs)
--
-- We really must record that b is already evaluated so that we don't
-- go and re-evaluate it when constructing the result.
-- See Note [Data-con worker strictness] in MkId.lhs
-- See Note [Data-con worker strictness] in MkId.hs
add_evals the_strs
= go vs the_strs
where
......@@ -2627,7 +2627,7 @@ Note [Small alternative rhs]
It is worth checking for a small RHS because otherwise we
get extra let bindings that may cause an extra iteration of the simplifier to
inline back in place. Quite often the rhs is just a variable or constructor.
The Ord instance of Maybe in PrelMaybe.lhs, for example, took several extra
The Ord instance of Maybe in PrelMaybe.hs, for example, took several extra
iterations because the version with the let bindings looked big, and so wasn't
inlined, but after the join points had been inlined it looked smaller, and so
was inlined.
......
......@@ -63,7 +63,7 @@ ubxTupleId0 = dataConWorkId (tupleCon UnboxedTuple 0)
unarise :: UniqSupply -> [StgBinding] -> [StgBinding]
unarise us binds = zipWith (\us -> unariseBinding us init_env) (listSplitUniqSupply us) binds
where -- See Note [Nullary unboxed tuple] in Type.lhs
where -- See Note [Nullary unboxed tuple] in Type.hs
init_env = unitVarEnv ubxTupleId0 [realWorldPrimId]
unariseBinding :: UniqSupply -> UnariseEnv -> StgBinding -> StgBinding
......
......@@ -1836,13 +1836,13 @@ argToPat env in_scope val_env (Tick _ arg) arg_occ
argToPat env in_scope val_env (Let _ arg) arg_occ
= argToPat env in_scope val_env arg arg_occ
-- See Note [Matching lets] in Rule.lhs
-- See Note [Matching lets] in Rule.hs
-- Look through let expressions
-- e.g. f (let v = rhs in (v,w))
-- Here we can specialise for f (v,w)
-- because the rule-matcher will look through the let.
{- Disabled; see Note [Matching cases] in Rule.lhs
{- Disabled; see Note [Matching cases] in Rule.hs
argToPat env in_scope val_env (Case scrut _ _ [(_, _, rhs)]) arg_occ
| exprOkForSpeculation scrut -- See Note [Matching cases] in Rule.hhs
= argToPat env in_scope val_env rhs arg_occ
......
......@@ -89,7 +89,7 @@ import Control.Monad (liftM, ap)
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
-- In this pass we also collect information on which CAFs are live for
-- constructing SRTs (see SRT.lhs).
-- constructing SRTs (see SRT.hs).
--
-- A top-level Id has CafInfo, which is
--
......@@ -441,7 +441,7 @@ coreToStgExpr (Case scrut bndr _ alts) = do
vars_alt (con, binders, rhs)
| DataAlt c <- con, c == unboxedUnitDataCon
= -- This case is a bit smelly.
-- See Note [Nullary unboxed tuple] in Type.lhs
-- See Note [Nullary unboxed tuple] in Type.hs
-- where a nullary tuple is mapped to (State# World#)
ASSERT( null binders )
do { (rhs2, rhs_fvs, rhs_escs) <- coreToStgExpr rhs
......
......@@ -1086,7 +1086,7 @@ extendSigsWithLam env id
= env
findBndrDmd :: AnalEnv -> Bool -> DmdType -> Id -> (DmdType, Demand)
-- See Note [Trimming a demand to a type] in Demand.lhs