Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
6a9800a5
Commit
6a9800a5
authored
Nov 26, 2011
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only call deSugar from one place
parent
db91c0de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
compiler/main/HscMain.hs
compiler/main/HscMain.hs
+6
-7
No files found.
compiler/main/HscMain.hs
View file @
6a9800a5
...
@@ -404,14 +404,14 @@ hscTypecheckRename hsc_env mod_summary rdr_module = runHsc hsc_env $ do
...
@@ -404,14 +404,14 @@ hscTypecheckRename hsc_env mod_summary rdr_module = runHsc hsc_env $ do
-- | Convert a typechecked module to Core
-- | Convert a typechecked module to Core
hscDesugar
::
HscEnv
->
ModSummary
->
TcGblEnv
->
IO
ModGuts
hscDesugar
::
HscEnv
->
ModSummary
->
TcGblEnv
->
IO
ModGuts
hscDesugar
hsc_env
mod_summary
tc_result
=
hscDesugar
hsc_env
mod_summary
tc_result
=
runHsc
hsc_env
$
hscDesugar'
mod_summary
tc_result
runHsc
hsc_env
$
hscDesugar'
(
ms_location
mod_summary
)
tc_result
hscDesugar'
::
Mod
Summary
->
TcGblEnv
->
Hsc
ModGuts
hscDesugar'
::
Mod
Location
->
TcGblEnv
->
Hsc
ModGuts
hscDesugar'
mod_
summary
tc_result
=
do
hscDesugar'
mod_
location
tc_result
=
do
hsc_env
<-
getHscEnv
hsc_env
<-
getHscEnv
r
<-
ioMsgMaybe
$
r
<-
ioMsgMaybe
$
{-# SCC "deSugar" #-}
{-# SCC "deSugar" #-}
deSugar
hsc_env
(
ms_location
mod_summary
)
tc_result
deSugar
hsc_env
mod_location
tc_result
-- always check -Werror after desugaring, this is the last opportunity for
-- always check -Werror after desugaring, this is the last opportunity for
-- warnings to arise before the backend.
-- warnings to arise before the backend.
...
@@ -616,7 +616,7 @@ genericHscBackend compiler tc_result mod_summary mb_old_hash
...
@@ -616,7 +616,7 @@ genericHscBackend compiler tc_result mod_summary mb_old_hash
|
HsBootFile
<-
ms_hsc_src
mod_summary
=
|
HsBootFile
<-
ms_hsc_src
mod_summary
=
hscGenBootOutput
compiler
tc_result
mod_summary
mb_old_hash
hscGenBootOutput
compiler
tc_result
mod_summary
mb_old_hash
|
otherwise
=
do
|
otherwise
=
do
guts
<-
hscDesugar'
mod_summary
tc_result
guts
<-
hscDesugar'
(
ms_location
mod_summary
)
tc_result
hscGenOutput
compiler
guts
mod_summary
mb_old_hash
hscGenOutput
compiler
guts
mod_summary
mb_old_hash
compilerBackend
::
HsCompiler
a
->
TcGblEnv
->
Compiler
a
compilerBackend
::
HsCompiler
a
->
TcGblEnv
->
Compiler
a
...
@@ -1423,8 +1423,7 @@ hscDeclsWithLocation hsc_env str source linenumber = runHsc hsc_env $ do
...
@@ -1423,8 +1423,7 @@ hscDeclsWithLocation hsc_env str source linenumber = runHsc hsc_env $ do
let
iNTERACTIVELoc
=
ModLocation
{
ml_hs_file
=
Nothing
,
let
iNTERACTIVELoc
=
ModLocation
{
ml_hs_file
=
Nothing
,
ml_hi_file
=
undefined
,
ml_hi_file
=
undefined
,
ml_obj_file
=
undefined
}
ml_obj_file
=
undefined
}
ds_result
<-
ioMsgMaybe
$
deSugar
hsc_env
iNTERACTIVELoc
tc_gblenv
ds_result
<-
hscDesugar'
iNTERACTIVELoc
tc_gblenv
handleWarnings
{- Simplify -}
{- Simplify -}
simpl_mg
<-
liftIO
$
hscSimplify
hsc_env
ds_result
simpl_mg
<-
liftIO
$
hscSimplify
hsc_env
ds_result
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment