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

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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment