diff options
| author | Ian Lynagh <igloo@earth.li> | 2010-11-24 23:15:14 +0000 |
|---|---|---|
| committer | Ian Lynagh <igloo@earth.li> | 2010-11-24 23:15:14 +0000 |
| commit | 25f0bf0245a59268fbfa8dc4ee4986b65c79ed16 (patch) | |
| tree | 5a53105f4d6a2b3b0c86f61c52d83a5b00da0bc7 /compiler | |
| parent | ada3dd2248d0308819fa9d3290f79a2a0d372db9 (diff) | |
| download | haskell-25f0bf0245a59268fbfa8dc4ee4986b65c79ed16.tar.gz | |
Don't mix implicit and explicit layout
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rename/RnEnv.lhs | 6 | ||||
| -rw-r--r-- | compiler/typecheck/TcSplice.lhs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rename/RnEnv.lhs b/compiler/rename/RnEnv.lhs index f1129155bb..825ed19fc2 100644 --- a/compiler/rename/RnEnv.lhs +++ b/compiler/rename/RnEnv.lhs @@ -552,8 +552,8 @@ lookupBindGroupOcc :: Maybe NameSet -- See notes on the (Maybe NameSet) -- See Note [Looking up signature names] lookupBindGroupOcc mb_bound_names what rdr_name = do { local_env <- getLocalRdrEnv - ; case lookupLocalRdrEnv local_env rdr_name of - Just n -> check_local_name n + ; case lookupLocalRdrEnv local_env rdr_name of { + Just n -> check_local_name n; Nothing -> do -- Not defined in a nested scope { env <- getGlobalRdrEnv @@ -565,7 +565,7 @@ lookupBindGroupOcc mb_bound_names what rdr_name -- as a duplicate top-level binding for 'f' [] | null gres -> bale_out_with empty | otherwise -> bale_out_with import_msg - }} + }}} where check_local_name name -- The name is in scope, and not imported = case mb_bound_names of diff --git a/compiler/typecheck/TcSplice.lhs b/compiler/typecheck/TcSplice.lhs index 0d7ba6ab91..cb4043e239 100644 --- a/compiler/typecheck/TcSplice.lhs +++ b/compiler/typecheck/TcSplice.lhs @@ -943,8 +943,8 @@ illegalBracket = ptext (sLit "Template Haskell brackets cannot be nested (withou lookupClassInstances :: TH.Name -> [TH.Type] -> TcM [TH.Name] lookupClassInstances c ts = do { loc <- getSrcSpanM - ; case convertToHsPred loc (TH.ClassP c ts) of - Left msg -> failWithTc msg + ; case convertToHsPred loc (TH.ClassP c ts) of { + Left msg -> failWithTc msg; Right rdr_pred -> do { rn_pred <- rnLPred doc rdr_pred -- Rename ; kc_pred <- kcHsLPred rn_pred -- Kind check @@ -954,7 +954,7 @@ lookupClassInstances c ts ; inst_envs <- tcGetInstEnvs ; let (matches, unifies) = lookupInstEnv inst_envs cls tys dfuns = map is_dfun (map fst matches ++ unifies) - ; return (map reifyName dfuns) } } + ; return (map reifyName dfuns) } } } where doc = ptext (sLit "TcSplice.classInstances") \end{code} |
