Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Glasgow Haskell Compiler
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
Shayne Fletcher
Glasgow Haskell Compiler
Commits
69f8ed93
Commit
69f8ed93
authored
Oct 28, 2009
by
simonpj@microsoft.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove a redundant parameter for mkTupleTy (the arity)
parent
6582768f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
9 deletions
+8
-9
compiler/coreSyn/MkCore.lhs
compiler/coreSyn/MkCore.lhs
+1
-3
compiler/deSugar/DsUtils.lhs
compiler/deSugar/DsUtils.lhs
+1
-1
compiler/prelude/TysWiredIn.lhs
compiler/prelude/TysWiredIn.lhs
+5
-3
utils/genprimopcode/Main.hs
utils/genprimopcode/Main.hs
+1
-2
No files found.
compiler/coreSyn/MkCore.lhs
View file @
69f8ed93
...
...
@@ -348,9 +348,7 @@ mkCoreTup cs = mkConApp (tupleCon Boxed (length cs))
-- | Build the type of a small tuple that holds the specified type of thing
mkCoreTupTy :: [Type] -> Type
mkCoreTupTy [ty] = ty
mkCoreTupTy tys = mkTupleTy Boxed (length tys) tys
mkCoreTupTy tys = mkTupleTy Boxed tys
-- | Build a big tuple holding the specified variables
mkBigCoreVarTup :: [Id] -> CoreExpr
...
...
compiler/deSugar/DsUtils.lhs
View file @
69f8ed93
...
...
@@ -604,7 +604,7 @@ mkLHsVarPatTup bs = mkLHsPatTup (map nlVarPat bs)
mkVanillaTuplePat :: [OutPat Id] -> Boxity -> Pat Id
-- A vanilla tuple pattern simply gets its type from its sub-patterns
mkVanillaTuplePat pats box
= TuplePat pats box (mkTupleTy box (
length pats) (
map hsLPatType pats))
= TuplePat pats box (mkTupleTy box (map hsLPatType pats))
-- The Big equivalents for the source tuple expressions
mkBigLHsVarTup :: [Id] -> LHsExpr Id
...
...
compiler/prelude/TysWiredIn.lhs
View file @
69f8ed93
...
...
@@ -534,11 +534,13 @@ done by enumeration\srcloc{lib/prelude/InTup?.hs}.
\end{itemize}
\begin{code}
mkTupleTy :: Boxity -> Int -> [Type] -> Type
mkTupleTy boxity arity tys = mkTyConApp (tupleTyCon boxity arity) tys
mkTupleTy :: Boxity -> [Type] -> Type
-- Special case for *boxed* 1-tuples, which are represented by the type itself
mkTupleTy boxity [ty] | Boxed <- boxity = ty
mkTupleTy boxity tys = mkTyConApp (tupleTyCon boxity (length tys)) tys
unitTy :: Type
unitTy = mkTupleTy Boxed
0
[]
unitTy = mkTupleTy Boxed []
\end{code}
%************************************************************************
...
...
utils/genprimopcode/Main.hs
View file @
69f8ed93
...
...
@@ -662,8 +662,7 @@ ppType (TyApp "MVar#" [x,y]) = "mkMVarPrimTy " ++ ppType x
++
" "
++
ppType
y
ppType
(
TyApp
"TVar#"
[
x
,
y
])
=
"mkTVarPrimTy "
++
ppType
x
++
" "
++
ppType
y
ppType
(
TyUTup
ts
)
=
"(mkTupleTy Unboxed "
++
show
(
length
ts
)
++
" "
ppType
(
TyUTup
ts
)
=
"(mkTupleTy Unboxed "
++
listify
(
map
ppType
ts
)
++
")"
ppType
(
TyF
s
d
)
=
"(mkFunTy ("
++
ppType
s
++
") ("
++
ppType
d
++
"))"
...
...
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