Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Alex D
GHC
Commits
ea59fd4d
Commit
ea59fd4d
authored
Sep 22, 2020
by
Hécate Moonlight
Committed by
Marge Bot
Oct 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lint the compiler for extraneous LANGUAGE pragmas
parent
5884fd32
Changes
145
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
145 changed files
with
781 additions
and
782 deletions
+781
-782
compiler/.hlint.yaml
compiler/.hlint.yaml
+7
-0
compiler/GHC/ByteCode/Asm.hs
compiler/GHC/ByteCode/Asm.hs
+3
-1
compiler/GHC/ByteCode/InfoTable.hs
compiler/GHC/ByteCode/InfoTable.hs
+2
-1
compiler/GHC/ByteCode/Instr.hs
compiler/GHC/ByteCode/Instr.hs
+1
-1
compiler/GHC/ByteCode/Linker.hs
compiler/GHC/ByteCode/Linker.hs
+3
-4
compiler/GHC/ByteCode/Types.hs
compiler/GHC/ByteCode/Types.hs
+2
-1
compiler/GHC/Cmm/CLabel.hs
compiler/GHC/Cmm/CLabel.hs
+3
-3
compiler/GHC/Cmm/Dataflow/Collections.hs
compiler/GHC/Cmm/Dataflow/Collections.hs
+1
-3
compiler/GHC/Cmm/Dataflow/Label.hs
compiler/GHC/Cmm/Dataflow/Label.hs
+2
-5
compiler/GHC/Cmm/Node.hs
compiler/GHC/Cmm/Node.hs
+1
-2
compiler/GHC/Cmm/Pipeline.hs
compiler/GHC/Cmm/Pipeline.hs
+0
-2
compiler/GHC/CmmToAsm/BlockLayout.hs
compiler/GHC/CmmToAsm/BlockLayout.hs
+6
-7
compiler/GHC/CmmToAsm/CFG.hs
compiler/GHC/CmmToAsm/CFG.hs
+6
-8
compiler/GHC/CmmToAsm/Reg/Graph/SpillCost.hs
compiler/GHC/CmmToAsm/Reg/Graph/SpillCost.hs
+3
-1
compiler/GHC/CmmToAsm/Reg/Linear/PPC.hs
compiler/GHC/CmmToAsm/Reg/Linear/PPC.hs
+0
-2
compiler/GHC/CmmToAsm/Reg/Linear/SPARC.hs
compiler/GHC/CmmToAsm/Reg/Linear/SPARC.hs
+0
-1
compiler/GHC/CmmToC.hs
compiler/GHC/CmmToC.hs
+4
-2
compiler/GHC/Core/Coercion.hs
compiler/GHC/Core/Coercion.hs
+5
-3
compiler/GHC/Core/Coercion/Axiom.hs
compiler/GHC/Core/Coercion/Axiom.hs
+8
-3
compiler/GHC/Core/FamInstEnv.hs
compiler/GHC/Core/FamInstEnv.hs
+7
-5
compiler/GHC/Core/Lint.hs
compiler/GHC/Core/Lint.hs
+9
-7
compiler/GHC/Core/Map.hs
compiler/GHC/Core/Map.hs
+8
-9
compiler/GHC/Core/Multiplicity.hs
compiler/GHC/Core/Multiplicity.hs
+1
-2
compiler/GHC/Core/Opt/Exitify.hs
compiler/GHC/Core/Opt/Exitify.hs
+0
-2
compiler/GHC/Core/Opt/OccurAnal.hs
compiler/GHC/Core/Opt/OccurAnal.hs
+6
-3
compiler/GHC/Core/Opt/SetLevels.hs
compiler/GHC/Core/Opt/SetLevels.hs
+7
-6
compiler/GHC/Core/Opt/Simplify/Utils.hs
compiler/GHC/Core/Opt/Simplify/Utils.hs
+1
-2
compiler/GHC/Core/Opt/Specialise.hs
compiler/GHC/Core/Opt/Specialise.hs
+4
-6
compiler/GHC/Core/Opt/StaticArgs.hs
compiler/GHC/Core/Opt/StaticArgs.hs
+2
-1
compiler/GHC/Core/Opt/WorkWrap/Utils.hs
compiler/GHC/Core/Opt/WorkWrap/Utils.hs
+2
-4
compiler/GHC/Core/Ppr.hs
compiler/GHC/Core/Ppr.hs
+3
-4
compiler/GHC/Core/TyCo/Rep.hs
compiler/GHC/Core/TyCo/Rep.hs
+5
-3
compiler/GHC/Core/TyCon.hs
compiler/GHC/Core/TyCon.hs
+4
-3
compiler/GHC/Core/Unfold.hs
compiler/GHC/Core/Unfold.hs
+1
-2
compiler/GHC/Core/UsageEnv.hs
compiler/GHC/Core/UsageEnv.hs
+15
-4
compiler/GHC/CoreToByteCode.hs
compiler/GHC/CoreToByteCode.hs
+5
-3
compiler/GHC/CoreToStg/Prep.hs
compiler/GHC/CoreToStg/Prep.hs
+5
-4
compiler/GHC/Data/BooleanFormula.hs
compiler/GHC/Data/BooleanFormula.hs
+2
-2
compiler/GHC/Data/TrieMap.hs
compiler/GHC/Data/TrieMap.hs
+6
-7
compiler/GHC/Driver/Backpack.hs
compiler/GHC/Driver/Backpack.hs
+2
-3
compiler/GHC/Driver/Main.hs
compiler/GHC/Driver/Main.hs
+3
-1
compiler/GHC/Driver/Pipeline/Monad.hs
compiler/GHC/Driver/Pipeline/Monad.hs
+0
-1
compiler/GHC/Driver/Types.hs
compiler/GHC/Driver/Types.hs
+10
-11
compiler/GHC/Hs/Binds.hs
compiler/GHC/Hs/Binds.hs
+14
-15
compiler/GHC/Hs/Decls.hs
compiler/GHC/Hs/Decls.hs
+13
-12
compiler/GHC/Hs/Doc.hs
compiler/GHC/Hs/Doc.hs
+0
-1
compiler/GHC/Hs/Expr.hs
compiler/GHC/Hs/Expr.hs
+17
-19
compiler/GHC/Hs/Extension.hs
compiler/GHC/Hs/Extension.hs
+17
-21
compiler/GHC/Hs/ImpExp.hs
compiler/GHC/Hs/ImpExp.hs
+6
-8
compiler/GHC/Hs/Lit.hs
compiler/GHC/Hs/Lit.hs
+9
-10
compiler/GHC/Hs/Pat.hs
compiler/GHC/Hs/Pat.hs
+13
-17
compiler/GHC/Hs/Stats.hs
compiler/GHC/Hs/Stats.hs
+3
-4
compiler/GHC/Hs/Type.hs
compiler/GHC/Hs/Type.hs
+11
-14
compiler/GHC/HsToCore.hs
compiler/GHC/HsToCore.hs
+5
-5
compiler/GHC/HsToCore/Arrows.hs
compiler/GHC/HsToCore/Arrows.hs
+5
-6
compiler/GHC/HsToCore/Binds.hs
compiler/GHC/HsToCore/Binds.hs
+6
-7
compiler/GHC/HsToCore/Coverage.hs
compiler/GHC/HsToCore/Coverage.hs
+6
-7
compiler/GHC/HsToCore/Expr.hs
compiler/GHC/HsToCore/Expr.hs
+6
-7
compiler/GHC/HsToCore/Foreign/Decl.hs
compiler/GHC/HsToCore/Foreign/Decl.hs
+6
-7
compiler/GHC/HsToCore/GuardedRHSs.hs
compiler/GHC/HsToCore/GuardedRHSs.hs
+2
-3
compiler/GHC/HsToCore/ListComp.hs
compiler/GHC/HsToCore/ListComp.hs
+3
-4
compiler/GHC/HsToCore/Match.hs
compiler/GHC/HsToCore/Match.hs
+8
-9
compiler/GHC/HsToCore/Match/Constructor.hs
compiler/GHC/HsToCore/Match/Constructor.hs
+5
-6
compiler/GHC/HsToCore/Match/Literal.hs
compiler/GHC/HsToCore/Match/Literal.hs
+5
-5
compiler/GHC/HsToCore/Monad.hs
compiler/GHC/HsToCore/Monad.hs
+7
-8
compiler/GHC/HsToCore/Pmc.hs
compiler/GHC/HsToCore/Pmc.hs
+4
-9
compiler/GHC/HsToCore/Pmc/Check.hs
compiler/GHC/HsToCore/Pmc/Check.hs
+4
-9
compiler/GHC/HsToCore/Pmc/Desugar.hs
compiler/GHC/HsToCore/Pmc/Desugar.hs
+4
-9
compiler/GHC/HsToCore/Pmc/Ppr.hs
compiler/GHC/HsToCore/Pmc/Ppr.hs
+1
-1
compiler/GHC/HsToCore/Pmc/Solver.hs
compiler/GHC/HsToCore/Pmc/Solver.hs
+6
-3
compiler/GHC/HsToCore/Pmc/Solver/Types.hs
compiler/GHC/HsToCore/Pmc/Solver/Types.hs
+2
-4
compiler/GHC/HsToCore/Pmc/Types.hs
compiler/GHC/HsToCore/Pmc/Types.hs
+5
-6
compiler/GHC/HsToCore/Pmc/Utils.hs
compiler/GHC/HsToCore/Pmc/Utils.hs
+2
-2
compiler/GHC/HsToCore/Quote.hs
compiler/GHC/HsToCore/Quote.hs
+10
-11
compiler/GHC/HsToCore/Usage.hs
compiler/GHC/HsToCore/Usage.hs
+0
-2
compiler/GHC/HsToCore/Utils.hs
compiler/GHC/HsToCore/Utils.hs
+5
-6
compiler/GHC/Iface/Ext/Ast.hs
compiler/GHC/Iface/Ext/Ast.hs
+16
-17
compiler/GHC/Iface/Ext/Debug.hs
compiler/GHC/Iface/Ext/Debug.hs
+3
-3
compiler/GHC/Iface/Ext/Types.hs
compiler/GHC/Iface/Ext/Types.hs
+8
-8
compiler/GHC/Iface/Make.hs
compiler/GHC/Iface/Make.hs
+3
-3
compiler/GHC/Iface/Rename.hs
compiler/GHC/Iface/Rename.hs
+0
-1
compiler/GHC/Iface/Tidy.hs
compiler/GHC/Iface/Tidy.hs
+5
-4
compiler/GHC/Iface/Tidy/StaticPtrTable.hs
compiler/GHC/Iface/Tidy/StaticPtrTable.hs
+2
-1
compiler/GHC/Llvm/MetaData.hs
compiler/GHC/Llvm/MetaData.hs
+0
-1
compiler/GHC/Llvm/Types.hs
compiler/GHC/Llvm/Types.hs
+1
-1
compiler/GHC/Parser/Header.hs
compiler/GHC/Parser/Header.hs
+1
-2
compiler/GHC/Parser/PostProcess.hs
compiler/GHC/Parser/PostProcess.hs
+10
-14
compiler/GHC/Parser/PostProcess/Haddock.hs
compiler/GHC/Parser/PostProcess/Haddock.hs
+9
-10
compiler/GHC/Rename/Doc.hs
compiler/GHC/Rename/Doc.hs
+23
-0
compiler/GHC/Rename/Env.hs
compiler/GHC/Rename/Env.hs
+3
-2
compiler/GHC/Rename/Expr.hs
compiler/GHC/Rename/Expr.hs
+9
-10
compiler/GHC/Rename/Fixity.hs
compiler/GHC/Rename/Fixity.hs
+2
-6
compiler/GHC/Rename/HsType.hs
compiler/GHC/Rename/HsType.hs
+4
-5
compiler/GHC/Rename/Module.hs
compiler/GHC/Rename/Module.hs
+8
-9
compiler/GHC/Rename/Pat.hs
compiler/GHC/Rename/Pat.hs
+13
-14
compiler/GHC/Rename/Splice.hs
compiler/GHC/Rename/Splice.hs
+1
-2
compiler/GHC/Rename/Utils.hs
compiler/GHC/Rename/Utils.hs
+4
-5
compiler/GHC/Runtime/Debugger.hs
compiler/GHC/Runtime/Debugger.hs
+0
-2
compiler/GHC/Runtime/Loader.hs
compiler/GHC/Runtime/Loader.hs
+1
-1
compiler/GHC/Stg/Lift/Analysis.hs
compiler/GHC/Stg/Lift/Analysis.hs
+0
-1
compiler/GHC/Stg/Lint.hs
compiler/GHC/Stg/Lint.hs
+2
-2
compiler/GHC/Stg/Syntax.hs
compiler/GHC/Stg/Syntax.hs
+9
-10
compiler/GHC/Stg/Unarise.hs
compiler/GHC/Stg/Unarise.hs
+4
-4
compiler/GHC/SysTools.hs
compiler/GHC/SysTools.hs
+3
-2
compiler/GHC/Tc/Deriv/Generics.hs
compiler/GHC/Tc/Deriv/Generics.hs
+7
-6
compiler/GHC/Tc/Deriv/Infer.hs
compiler/GHC/Tc/Deriv/Infer.hs
+1
-2
compiler/GHC/Tc/Deriv/Utils.hs
compiler/GHC/Tc/Deriv/Utils.hs
+3
-4
compiler/GHC/Tc/Errors.hs
compiler/GHC/Tc/Errors.hs
+2
-3
compiler/GHC/Tc/Gen/App.hs
compiler/GHC/Tc/Gen/App.hs
+12
-9
compiler/GHC/Tc/Gen/Arrow.hs
compiler/GHC/Tc/Gen/Arrow.hs
+5
-5
compiler/GHC/Tc/Gen/Bind.hs
compiler/GHC/Tc/Gen/Bind.hs
+6
-5
compiler/GHC/Tc/Gen/Export.hs
compiler/GHC/Tc/Gen/Export.hs
+3
-5
compiler/GHC/Tc/Gen/Expr.hs
compiler/GHC/Tc/Gen/Expr.hs
+10
-8
compiler/GHC/Tc/Gen/Head.hs
compiler/GHC/Tc/Gen/Head.hs
+13
-9
compiler/GHC/Tc/Gen/HsType.hs
compiler/GHC/Tc/Gen/HsType.hs
+10
-10
compiler/GHC/Tc/Gen/Match.hs
compiler/GHC/Tc/Gen/Match.hs
+9
-10
compiler/GHC/Tc/Gen/Pat.hs
compiler/GHC/Tc/Gen/Pat.hs
+6
-7
compiler/GHC/Tc/Gen/Rule.hs
compiler/GHC/Tc/Gen/Rule.hs
+2
-3
compiler/GHC/Tc/Gen/Splice.hs
compiler/GHC/Tc/Gen/Splice.hs
+15
-19
compiler/GHC/Tc/Module.hs
compiler/GHC/Tc/Module.hs
+6
-8
compiler/GHC/Tc/Solver.hs
compiler/GHC/Tc/Solver.hs
+1
-2
compiler/GHC/Tc/Solver/Flatten.hs
compiler/GHC/Tc/Solver/Flatten.hs
+3
-1
compiler/GHC/Tc/Solver/Interact.hs
compiler/GHC/Tc/Solver/Interact.hs
+10
-7
compiler/GHC/Tc/Solver/Monad.hs
compiler/GHC/Tc/Solver/Monad.hs
+1
-1
compiler/GHC/Tc/TyCl/PatSyn.hs
compiler/GHC/Tc/TyCl/PatSyn.hs
+6
-7
compiler/GHC/Tc/TyCl/Utils.hs
compiler/GHC/Tc/TyCl/Utils.hs
+6
-7
compiler/GHC/Tc/Types.hs
compiler/GHC/Tc/Types.hs
+5
-3
compiler/GHC/Tc/Utils/Backpack.hs
compiler/GHC/Tc/Utils/Backpack.hs
+3
-5
compiler/GHC/Tc/Utils/Instantiate.hs
compiler/GHC/Tc/Utils/Instantiate.hs
+6
-6
compiler/GHC/Tc/Utils/Monad.hs
compiler/GHC/Tc/Utils/Monad.hs
+9
-7
compiler/GHC/Tc/Utils/TcMType.hs
compiler/GHC/Tc/Utils/TcMType.hs
+5
-4
compiler/GHC/Tc/Utils/TcType.hs
compiler/GHC/Tc/Utils/TcType.hs
+6
-3
compiler/GHC/Tc/Utils/Unify.hs
compiler/GHC/Tc/Utils/Unify.hs
+8
-7
compiler/GHC/Tc/Utils/Zonk.hs
compiler/GHC/Tc/Utils/Zonk.hs
+6
-7
compiler/GHC/Tc/Validity.hs
compiler/GHC/Tc/Validity.hs
+5
-5
compiler/GHC/ThToHs.hs
compiler/GHC/ThToHs.hs
+13
-13
compiler/GHC/Types/Demand.hs
compiler/GHC/Types/Demand.hs
+5
-3
compiler/GHC/Types/FieldLabel.hs
compiler/GHC/Types/FieldLabel.hs
+4
-6
compiler/GHC/Types/Name.hs
compiler/GHC/Types/Name.hs
+4
-5
compiler/GHC/Types/SrcLoc.hs
compiler/GHC/Types/SrcLoc.hs
+2
-8
compiler/GHC/Unit.hs
compiler/GHC/Unit.hs
+0
-2
compiler/GHC/Unit/Module.hs
compiler/GHC/Unit/Module.hs
+5
-8
compiler/GHC/Utils/Error.hs
compiler/GHC/Utils/Error.hs
+5
-6
hadrian/src/Main.hs
hadrian/src/Main.hs
+3
-3
hadrian/src/Rules/Lint.hs
hadrian/src/Rules/Lint.hs
+31
-1
No files found.
compiler/.hlint.yaml
0 → 100644
View file @
ea59fd4d
# HLint configuration file
# https://github.com/ndmitchell/hlint
##########################
-
ignore
:
{}
-
warn
:
{
name
:
Unused LANGUAGE pragma
}
-
warn
:
{
name
:
Use fewer LANGUAGE pragmas
}
compiler/GHC/ByteCode/Asm.hs
View file @
ea59fd4d
{-# LANGUAGE BangPatterns, CPP, DeriveFunctor, MagicHash, RecordWildCards #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -optc-DNON_POSIX_SOURCE #-}
--
-- (c) The University of Glasgow 2002-2006
...
...
compiler/GHC/ByteCode/InfoTable.hs
View file @
ea59fd4d
{-# LANGUAGE CPP, MagicHash, ScopedTypeVariables #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -optc-DNON_POSIX_SOURCE #-}
--
-- (c) The University of Glasgow 2002-2006
...
...
compiler/GHC/ByteCode/Instr.hs
View file @
ea59fd4d
{-# LANGUAGE CPP
, MagicHash
#-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
--
-- (c) The University of Glasgow 2002-2006
...
...
compiler/GHC/ByteCode/Linker.hs
View file @
ea59fd4d
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -optc-DNON_POSIX_SOURCE #-}
--
...
...
compiler/GHC/ByteCode/Types.hs
View file @
ea59fd4d
{-# LANGUAGE MagicHash, RecordWildCards, GeneralizedNewtypeDeriving #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE RecordWildCards #-}
--
-- (c) The University of Glasgow 2002-2006
--
...
...
compiler/GHC/Cmm/CLabel.hs
View file @
ea59fd4d
...
...
@@ -1569,12 +1569,12 @@ T15155.a [InlPrag=NOINLINE] :: T15155.A
The emitted assembly is
####
INDIRECTEE
====
INDIRECTEE
a1_rXq_closure: -- module local haskell value
.quad GHC.Types.I#_con_info -- an Int
.quad 42
####
BEFORE
====
BEFORE
.globl T15155.a_closure -- exported newtype wrapped value
T15155.a_closure:
.quad stg_IND_STATIC_info -- the closure info
...
...
@@ -1582,7 +1582,7 @@ T15155.a_closure:
.quad 0
.quad 0
####
AFTER
====
AFTER
.globl T15155.a_closure -- exported newtype wrapped value
.equiv a1_rXq_closure,T15155.a_closure -- both are shared
...
...
compiler/GHC/Cmm/Dataflow/Collections.hs
View file @
ea59fd4d
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeFamilies #-}
module
GHC.Cmm.Dataflow.Collections
(
IsSet
(
..
)
...
...
compiler/GHC/Cmm/Dataflow/Label.hs
View file @
ea59fd4d
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE
TypeFamili
es #-}
{-# LANGUAGE
FlexibleInstanc
es #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
module
GHC.Cmm.Dataflow.Label
(
Label
...
...
compiler/GHC/Cmm/Node.hs
View file @
ea59fd4d
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
...
...
compiler/GHC/Cmm/Pipeline.hs
View file @
ea59fd4d
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TupleSections #-}
module
GHC.Cmm.Pipeline
(
-- | Converts C-- with an implicit stack and native C-- calls into
...
...
compiler/GHC/CmmToAsm/BlockLayout.hs
View file @
ea59fd4d
--
-- Copyright (c) 2018 Andreas Klebinger
--
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
--
-- Copyright (c) 2018 Andreas Klebinger
--
module
GHC.CmmToAsm.BlockLayout
(
sequenceTop
,
backendMaintainsCfg
)
...
...
compiler/GHC/CmmToAsm/CFG.hs
View file @
ea59fd4d
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
--
-- Copyright (c) 2018 Andreas Klebinger
--
{-# LANGUAGE TypeFamilies, ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DataKinds #-}
module
GHC.CmmToAsm.CFG
(
CFG
,
CfgEdge
(
..
),
EdgeInfo
(
..
),
EdgeWeight
(
..
)
,
TransitionSource
(
..
)
...
...
compiler/GHC/CmmToAsm/Reg/Graph/SpillCost.hs
View file @
ea59fd4d
{-# LANGUAGE ScopedTypeVariables, GADTs, BangPatterns #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
module
GHC.CmmToAsm.Reg.Graph.SpillCost
(
SpillCostRecord
,
plusSpillCostRecord
,
...
...
compiler/GHC/CmmToAsm/Reg/Linear/PPC.hs
View file @
ea59fd4d
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- | Free regs map for PowerPC
module
GHC.CmmToAsm.Reg.Linear.PPC
where
...
...
compiler/GHC/CmmToAsm/Reg/Linear/SPARC.hs
View file @
ea59fd4d
{-# LANGUAGE CPP #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- | Free regs map for SPARC
module
GHC.CmmToAsm.Reg.Linear.SPARC
where
...
...
compiler/GHC/CmmToC.hs
View file @
ea59fd4d
{-# LANGUAGE CPP, DeriveFunctor, GADTs, PatternSynonyms #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
-----------------------------------------------------------------------------
--
...
...
compiler/GHC/Core/Coercion.hs
View file @
ea59fd4d
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-
(c) The University of Glasgow 2006
-}
{-# LANGUAGE RankNTypes, CPP, MultiWayIf, FlexibleContexts, BangPatterns,
ScopedTypeVariables #-}
-- | Module for (a) type kinds and (b) type coercions,
-- as used in System FC. See 'GHC.Core.Expr' for
-- more on System FC and how coercions fit into it.
...
...
compiler/GHC/Core/Coercion/Axiom.hs
View file @
ea59fd4d
-- (c) The University of Glasgow 2012
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE RoleAnnotations #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE CPP, DataKinds, DeriveDataTypeable, GADTs, KindSignatures,
ScopedTypeVariables, StandaloneDeriving, RoleAnnotations #-}
-- (c) The University of Glasgow 2012
-- | Module for coercion axioms, used to represent type family instances
-- and newtypes
...
...
compiler/GHC/Core/FamInstEnv.hs
View file @
ea59fd4d
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
-- (c) The University of Glasgow 2006
--
-- FamInstEnv: Type checked family instance declarations
{-# LANGUAGE CPP, GADTs, ScopedTypeVariables, BangPatterns, TupleSections,
DeriveFunctor #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
module
GHC.Core.FamInstEnv
(
FamInst
(
..
),
FamFlavor
(
..
),
famInstAxiom
,
famInstTyCon
,
famInstRHS
,
famInstsRepTyCons
,
famInstRepTyCon_maybe
,
dataFamInstRepTyCon
,
...
...
compiler/GHC/Core/Lint.hs
View file @
ea59fd4d
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
...
...
@@ -7,9 +12,6 @@ A ``lint'' pass to check for Core correctness.
See Note [Core Lint guarantee].
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE ViewPatterns, ScopedTypeVariables, DeriveFunctor, MultiWayIf #-}
module
GHC.Core.Lint
(
lintCoreBindings
,
lintUnfolding
,
lintPassResult
,
lintInteractiveExpr
,
lintExpr
,
...
...
@@ -1864,14 +1866,14 @@ lintCoreRule fun fun_ty rule@(Rule { ru_name = name, ru_bndrs = bndrs
~~~~~~~~~~~~~~~~~~~~~~~
It's very bad if simplifying a rule means that one of the template
variables (ru_bndrs) that /is/ mentioned on the RHS becomes
not-mentioned in the LHS (ru_args). How can that happen? Well, in
#10602,
SpecConstr stupidly constructed a rule like
not-mentioned in the LHS (ru_args). How can that happen? Well, in
#10602,
SpecConstr stupidly constructed a rule like
forall x,c1,c2.
f (x |> c1 |> c2) = ....
But simplExpr collapses those coercions into one. (Indeed in
#10602,
it collapsed to the identity and was removed altogether.)
But simplExpr collapses those coercions into one. (Indeed in
#10602,
it collapsed to the identity and was removed altogether.)
We don't have a great story for what to do here, but at least
this check will nail it.
...
...
compiler/GHC/Core/Map.hs
View file @
ea59fd4d
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE
UndecidableInstanc
es #-}
{-# LANGUAGE
RankNTyp
es #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
module
GHC.Core.Map
(
-- * Maps over Core expressions
...
...
compiler/GHC/Core/Multiplicity.hs
View file @
ea59fd4d
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE PatternSynonyms, ViewPatterns #-}
{-# LANGUAGE PatternSynonyms #-}
{-|
This module defines the semi-ring of multiplicities, and associated functions.
...
...
compiler/GHC/Core/Opt/Exitify.hs
View file @
ea59fd4d
{-# LANGUAGE PatternSynonyms #-}
module
GHC.Core.Opt.Exitify
(
exitifyProgram
)
where
{-
...
...
compiler/GHC/Core/Opt/OccurAnal.hs
View file @
ea59fd4d
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
...
...
@@ -11,9 +17,6 @@ The occurrence analyser re-typechecks a core expression, returning a new
core expression with (hopefully) improved usage information.
-}
{-# LANGUAGE CPP, BangPatterns, MultiWayIf, ViewPatterns #-}
{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}
module
GHC.Core.Opt.OccurAnal
(
occurAnalysePgm
,
occurAnalyseExpr
)
where
#
include
"HsVersions.h"
...
...
compiler/GHC/Core/Opt/SetLevels.hs
View file @
ea59fd4d
{-# LANGUAGE CPP #-}
{-# LANGUAGE PatternSynonyms #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
...
...
@@ -60,9 +65,6 @@
identity.
-}
{-# LANGUAGE CPP, MultiWayIf, PatternSynonyms #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
module
GHC.Core.Opt.SetLevels
(
setLevels
,
...
...
@@ -882,9 +884,8 @@ float a boxed version
and replace the original (f x) with
case (case y of I# r -> r) of r -> blah
Being able to float unboxed expressions is sometimes important; see
#12603. I'm not sure how /often/ it is important, but it's
not hard to achieve.
Being able to float unboxed expressions is sometimes important; see #12603.
I'm not sure how /often/ it is important, but it's not hard to achieve.
We only do it for a fixed collection of types for which we have a
convenient boxing constructor (see boxingDataCon_maybe). In
...
...
compiler/GHC/Core/Opt/Simplify/Utils.hs
View file @
ea59fd4d
...
...
@@ -1207,8 +1207,7 @@ Here f occurs just once, in the RHS of fInt. But if we inline it there
it might make fInt look big, and we'll lose the opportunity to inline f
at each of fInt's call sites. The INLINE pragma will only inline when
the application is saturated for exactly this reason; and we don't
want PreInlineUnconditionally to second-guess it. A live example is
#3736.
want PreInlineUnconditionally to second-guess it. A live example is #3736.
c.f. Note [Stable unfoldings and postInlineUnconditionally]
NB: if the pragma is INLINEABLE, then we don't want to behave in
...
...
compiler/GHC/Core/Opt/Specialise.hs
View file @
ea59fd4d
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
{-
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
\section[Specialise]{Stamping out overloading, and (optionally) polymorphism}
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
module
GHC.Core.Opt.Specialise
(
specProgram
,
specUnfolding
)
where
#
include
"HsVersions.h"
...
...
compiler/GHC/Core/Opt/StaticArgs.hs
View file @
ea59fd4d
{-# LANGUAGE CPP #-}
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
...
...
@@ -48,7 +50,6 @@ The previous patch, to fix polymorphic floatout demand signatures, is
essential to make this work well!
-}
{-# LANGUAGE CPP, PatternSynonyms #-}
module
GHC.Core.Opt.StaticArgs
(
doStaticArgs
)
where
import
GHC.Prelude
...
...
compiler/GHC/Core/Opt/WorkWrap/Utils.hs
View file @
ea59fd4d
...
...
@@ -924,15 +924,13 @@ which can still be specialised by the type-class specialiser, something like
BUT if f is strict in the Ord dictionary, we might unpack it, to get
fw :: (a->a->Bool) -> [a] -> Int# -> a
and the type-class specialiser can't specialise that. An example is
#6056.
and the type-class specialiser can't specialise that. An example is #6056.
But in any other situation a dictionary is just an ordinary value,
and can be unpacked. So we track the INLINABLE pragma, and switch
off the unpacking in mkWWstr_one (see the isClassPred test).
Historical note: #14955 describes how I got this fix wrong
the first time.
Historical note: #14955 describes how I got this fix wrong the first time.
-}
-- | Context for a 'DataCon' application with a hole for every field, including
...
...
compiler/GHC/Core/Ppr.hs
View file @
ea59fd4d
{-# LANGUAGE LambdaCase #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-
(c) The University of Glasgow 2006
(c) The AQUA Project, Glasgow University, 1996-1998
...
...
@@ -6,10 +9,6 @@
Printing of Core syntax
-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE LambdaCase #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module
GHC.Core.Ppr
(
pprCoreExpr
,
pprParendExpr
,
pprCoreBinding
,
pprCoreBindings
,
pprCoreAlt
,
...
...
compiler/GHC/Core/TyCo/Rep.hs
View file @
ea59fd4d
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# OPTIONS_HADDOCK not-home #-}
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1998
...
...
@@ -18,9 +23,6 @@ Note [The Type-related module hierarchy]
-}
-- We expose the relevant stuff from this module via the Type module
{-# OPTIONS_HADDOCK not-home #-}
{-# LANGUAGE CPP, MultiWayIf, PatternSynonyms, BangPatterns, DeriveDataTypeable #-}
module
GHC.Core.TyCo.Rep
(
TyThing
(
..
),
tyThingCategory
,
pprTyThingCategory
,
pprShortTyThing
,
...
...
compiler/GHC/Core/TyCon.hs
View file @
ea59fd4d
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
...
...
@@ -6,9 +10,6 @@
The @TyCon@ datatype
-}
{-# LANGUAGE CPP, FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
module
GHC.Core.TyCon
(
-- * Main TyCon data types
TyCon
,
...
...
compiler/GHC/Core/Unfold.hs
View file @
ea59fd4d
...
...
@@ -713,8 +713,7 @@ Historical note 2: Much longer ago, Simon M tried a MUCH bigger
discount: (10 * (10 + n_val_args)), and said it was an "unambiguous
win", but its terribly dangerous because a function with many many
case branches, each finishing with a constructor, can have an
arbitrarily large discount. This led to terrible code bloat: see
#6099.
arbitrarily large discount. This led to terrible code bloat: see #6099.
Note [Unboxed tuple size and result discount]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
compiler/GHC/Core/UsageEnv.hs
View file @
ea59fd4d
{-# LANGUAGE ViewPatterns #-}
module
GHC.Core.UsageEnv
(
UsageEnv
,
addUsage
,
scaleUsage
,
zeroUE
,
lookupUE
,
scaleUE
,
deleteUE
,
addUE
,
Usage
(
..
),
unitUE
,
bottomUE
,
supUE
,
supUEs
)
where
module
GHC.Core.UsageEnv
(
Usage
(
..
)
,
UsageEnv
,
addUE
,
addUsage
,
bottomUE
,
deleteUE
,
lookupUE
,
scaleUE
,
scaleUsage
,
supUE
,
supUEs
,
unitUE
,
zeroUE
)
where
import
Data.Foldable
import
GHC.Prelude
...
...
compiler/GHC/CoreToByteCode.hs
View file @
ea59fd4d
{-# LANGUAGE CPP
, MagicHash, RecordWildCards, BangPatterns
#-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE CPP
#-}
{-# LANGUAGE DeriveFunctor
#-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fprof-auto-top #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
--
-- (c) The University of Glasgow 2002-2006
--
...
...
compiler/GHC/CoreToStg/Prep.hs
View file @
ea59fd4d
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
{-
(c) The University of Glasgow, 1994-2006
...
...
@@ -5,10 +10,6 @@
Core pass to saturate constructors and PrimOps
-}
{-# LANGUAGE BangPatterns, CPP, MultiWayIf #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
module
GHC.CoreToStg.Prep
(
corePrepPgm
,
corePrepExpr
...
...
compiler/GHC/Data/BooleanFormula.hs
View file @
ea59fd4d
{-# LANGUAGE DeriveDataTypeable
, DeriveFunctor, DeriveFoldable,
DeriveTraversable #-}
{-# LANGUAGE DeriveDataTypeable
#-}
{-# LANGUAGE
DeriveTraversable
#-}
--------------------------------------------------------------------------------
-- | Boolean formulas without quantifiers and without negation.
...