Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
25f0bf02
Commit
25f0bf02
authored
Nov 24, 2010
by
Ian Lynagh
Browse files
Don't mix implicit and explicit layout
parent
ada3dd22
Changes
2
Hide whitespace changes
Inline
Side-by-side
compiler/rename/RnEnv.lhs
View file @
25f0bf02
...
@@ -552,8 +552,8 @@ lookupBindGroupOcc :: Maybe NameSet -- See notes on the (Maybe NameSet)
...
@@ -552,8 +552,8 @@ lookupBindGroupOcc :: Maybe NameSet -- See notes on the (Maybe NameSet)
-- See Note [Looking up signature names]
-- See Note [Looking up signature names]
lookupBindGroupOcc mb_bound_names what rdr_name
lookupBindGroupOcc mb_bound_names what rdr_name
= do { local_env <- getLocalRdrEnv
= do { local_env <- getLocalRdrEnv
; case lookupLocalRdrEnv local_env rdr_name of
; case lookupLocalRdrEnv local_env rdr_name of
{
Just n -> check_local_name n
Just n -> check_local_name n
;
Nothing -> do -- Not defined in a nested scope
Nothing -> do -- Not defined in a nested scope
{ env <- getGlobalRdrEnv
{ env <- getGlobalRdrEnv
...
@@ -565,7 +565,7 @@ lookupBindGroupOcc mb_bound_names what rdr_name
...
@@ -565,7 +565,7 @@ lookupBindGroupOcc mb_bound_names what rdr_name
-- as a duplicate top-level binding for 'f'
-- as a duplicate top-level binding for 'f'
[] | null gres -> bale_out_with empty
[] | null gres -> bale_out_with empty
| otherwise -> bale_out_with import_msg
| otherwise -> bale_out_with import_msg
}}
}}
}
where
where
check_local_name name -- The name is in scope, and not imported
check_local_name name -- The name is in scope, and not imported
= case mb_bound_names of
= case mb_bound_names of
...
...
compiler/typecheck/TcSplice.lhs
View file @
25f0bf02
...
@@ -943,8 +943,8 @@ illegalBracket = ptext (sLit "Template Haskell brackets cannot be nested (withou
...
@@ -943,8 +943,8 @@ illegalBracket = ptext (sLit "Template Haskell brackets cannot be nested (withou
lookupClassInstances :: TH.Name -> [TH.Type] -> TcM [TH.Name]
lookupClassInstances :: TH.Name -> [TH.Type] -> TcM [TH.Name]
lookupClassInstances c ts
lookupClassInstances c ts
= do { loc <- getSrcSpanM
= do { loc <- getSrcSpanM
; case convertToHsPred loc (TH.ClassP c ts) of
; case convertToHsPred loc (TH.ClassP c ts) of
{
Left msg -> failWithTc msg
Left msg -> failWithTc msg
;
Right rdr_pred -> do
Right rdr_pred -> do
{ rn_pred <- rnLPred doc rdr_pred -- Rename
{ rn_pred <- rnLPred doc rdr_pred -- Rename
; kc_pred <- kcHsLPred rn_pred -- Kind check
; kc_pred <- kcHsLPred rn_pred -- Kind check
...
@@ -954,7 +954,7 @@ lookupClassInstances c ts
...
@@ -954,7 +954,7 @@ lookupClassInstances c ts
; inst_envs <- tcGetInstEnvs
; inst_envs <- tcGetInstEnvs
; let (matches, unifies) = lookupInstEnv inst_envs cls tys
; let (matches, unifies) = lookupInstEnv inst_envs cls tys
dfuns = map is_dfun (map fst matches ++ unifies)
dfuns = map is_dfun (map fst matches ++ unifies)
; return (map reifyName dfuns) } }
; return (map reifyName dfuns) } }
}
where
where
doc = ptext (sLit "TcSplice.classInstances")
doc = ptext (sLit "TcSplice.classInstances")
\end{code}
\end{code}
...
...
Write
Preview
Supports
Markdown
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