Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
e1c9eb13
Commit
e1c9eb13
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-06-05 21:04:15 by sof]
extra arg to dsBinds
parent
15d05cf3
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ghc/compiler/deSugar/DsExpr.lhs
+8
-4
8 additions, 4 deletions
ghc/compiler/deSugar/DsExpr.lhs
ghc/compiler/deSugar/DsGRHSs.lhs
+8
-2
8 additions, 2 deletions
ghc/compiler/deSugar/DsGRHSs.lhs
ghc/compiler/deSugar/DsListComp.lhs
+7
-2
7 additions, 2 deletions
ghc/compiler/deSugar/DsListComp.lhs
with
23 additions
and
8 deletions
ghc/compiler/deSugar/DsExpr.lhs
+
8
−
4
View file @
e1c9eb13
...
...
@@ -9,7 +9,11 @@
module DsExpr ( dsExpr ) where
IMP_Ubiq()
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 201
IMPORT_DELOOPER(DsLoop) -- partly to get dsBinds, partly to chk dsExpr
#else
import {-# SOURCE #-} DsBinds (dsBinds )
#endif
import HsSyn ( failureFreePat,
HsExpr(..), OutPat(..), HsLit(..), ArithSeqInfo(..),
...
...
@@ -262,8 +266,8 @@ dsExpr expr@(HsCase discrim matches src_loc)
returnDs ( mkCoLetAny (NonRec discrim_var core_discrim) matching_code )
dsExpr (HsLet binds expr)
= dsBinds binds
`thenDs` \ core_binds ->
dsExpr expr `thenDs` \ core_expr ->
= dsBinds
Nothing
binds
`thenDs` \ core_binds ->
dsExpr expr
`thenDs` \ core_expr ->
returnDs ( mkCoLetsAny core_binds core_expr )
dsExpr (HsDoOut do_or_lc stmts return_id then_id zero_id result_ty src_loc)
...
...
@@ -650,8 +654,8 @@ dsDo do_or_lc stmts return_id then_id zero_id result_ty
VarArg (mkValLam [ignored_result_id] rest)]
go (LetStmt binds : stmts )
= dsBinds binds
`thenDs` \ binds2 ->
go stmts `thenDs` \ rest ->
= dsBinds
Nothing
binds
`thenDs` \ binds2 ->
go stmts
`thenDs` \ rest ->
returnDs (mkCoLetsAny binds2 rest)
go (BindStmt pat expr locn : stmts)
...
...
This diff is collapsed.
Click to expand it.
ghc/compiler/deSugar/DsGRHSs.lhs
+
8
−
2
View file @
e1c9eb13
...
...
@@ -9,7 +9,13 @@
module DsGRHSs ( dsGuarded, dsGRHSs ) where
IMP_Ubiq()
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 201
IMPORT_DELOOPER(DsLoop) -- break dsExpr/dsBinds-ish loop
#else
import {-# SOURCE #-} DsExpr ( dsExpr )
import {-# SOURCE #-} DsBinds ( dsBinds )
import {-# SOURCE #-} Match ( match )
#endif
import HsSyn ( GRHSsAndBinds(..), GRHS(..),
HsExpr(..), HsBinds, Stmt(..),
...
...
@@ -53,7 +59,7 @@ dsGuarded :: TypecheckedGRHSsAndBinds
-> DsM CoreExpr
dsGuarded (GRHSsAndBindsOut grhss binds err_ty)
= dsBinds binds
`thenDs` \ core_binds ->
= dsBinds
Nothing
binds `thenDs` \ core_binds ->
dsGRHSs err_ty PatBindMatch [] grhss `thenDs` \ (MatchResult can_it_fail _ core_grhss_fn _) ->
case can_it_fail of
CantFail -> returnDs (mkCoLetsAny core_binds (core_grhss_fn (panic "It can't fail")))
...
...
@@ -133,7 +139,7 @@ matchGuard (GuardStmt expr _ : stmts) body_result
matchGuard (LetStmt binds : stmts) body_result
= matchGuard stmts body_result `thenDs` \ match_result ->
dsBinds binds
`thenDs` \ core_binds ->
dsBinds
Nothing
binds `thenDs` \ core_binds ->
returnDs (mkCoLetsMatchResult core_binds match_result)
matchGuard (BindStmt pat rhs _ : stmts) body_result
...
...
This diff is collapsed.
Click to expand it.
ghc/compiler/deSugar/DsListComp.lhs
+
7
−
2
View file @
e1c9eb13
...
...
@@ -9,7 +9,12 @@
module DsListComp ( dsListComp ) where
IMP_Ubiq()
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 201
IMPORT_DELOOPER(DsLoop) -- break dsExpr-ish loop
#else
import {-# SOURCE #-} DsExpr ( dsExpr )
import {-# SOURCE #-} DsBinds ( dsBinds )
#endif
import HsSyn ( Stmt(..), HsExpr, HsBinds )
import TcHsSyn ( SYN_IE(TypecheckedStmt), SYN_IE(TypecheckedHsExpr) , SYN_IE(TypecheckedHsBinds) )
...
...
@@ -127,7 +132,7 @@ deListComp (GuardStmt guard locn : quals) list -- rule B above
-- [e | let B, qs] = let B in [e | qs]
deListComp (LetStmt binds : quals) list
= dsBinds binds
`thenDs` \ core_binds ->
= dsBinds
Nothing
binds `thenDs` \ core_binds ->
deListComp quals list `thenDs` \ core_rest ->
returnDs (mkCoLetsAny core_binds core_rest)
...
...
@@ -195,7 +200,7 @@ dfListComp c_ty c_id n_ty n_id (GuardStmt guard locn : quals)
dfListComp c_ty c_id n_ty n_id (LetStmt binds : quals)
-- new in 1.3, local bindings
= dsBinds
binds
`thenDs` \ core_binds ->
= dsBinds
Nothing binds
`thenDs` \ core_binds ->
dfListComp c_ty c_id n_ty n_id quals `thenDs` \ core_rest ->
returnDs (mkCoLetsAny core_binds core_rest)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment