Commit 8e8068df authored by Ian Lynagh's avatar Ian Lynagh

Tweak layout for alternative layout rule

parent 3e18f8be
...@@ -556,12 +556,12 @@ shadowPackages pkgs preferred ...@@ -556,12 +556,12 @@ shadowPackages pkgs preferred
in listToFM shadowed in listToFM shadowed
where where
check (shadowed,pkgmap) pkg check (shadowed,pkgmap) pkg
| Just oldpkg <- lookupUFM pkgmap (packageConfigId pkg), | Just oldpkg <- lookupUFM pkgmap (packageConfigId pkg)
let , let
ipid_new = installedPackageId pkg ipid_new = installedPackageId pkg
ipid_old = installedPackageId oldpkg, ipid_old = installedPackageId oldpkg
-- --
ipid_old /= ipid_new , ipid_old /= ipid_new
= if ipid_old `elem` preferred = if ipid_old `elem` preferred
then ( (ipid_new, ShadowedBy ipid_old) : shadowed, pkgmap ) then ( (ipid_new, ShadowedBy ipid_old) : shadowed, pkgmap )
else ( (ipid_old, ShadowedBy ipid_new) : shadowed, pkgmap' ) else ( (ipid_old, ShadowedBy ipid_new) : shadowed, pkgmap' )
......
...@@ -1290,7 +1290,7 @@ finish_char_tok loc ch -- We've already seen the closing quote ...@@ -1290,7 +1290,7 @@ finish_char_tok loc ch -- We've already seen the closing quote
return (L (mkSrcSpan loc end) (ITprimchar ch)) return (L (mkSrcSpan loc end) (ITprimchar ch))
_other -> _other ->
return (L (mkSrcSpan loc end) (ITchar ch)) return (L (mkSrcSpan loc end) (ITchar ch))
else do else do
return (L (mkSrcSpan loc end) (ITchar ch)) return (L (mkSrcSpan loc end) (ITchar ch))
lex_char :: Char -> AlexInput -> P Char lex_char :: Char -> AlexInput -> P Char
......
...@@ -985,9 +985,9 @@ mkImport :: CCallConv ...@@ -985,9 +985,9 @@ mkImport :: CCallConv
-> P (HsDecl RdrName) -> P (HsDecl RdrName)
mkImport cconv safety (L loc entity, v, ty) mkImport cconv safety (L loc entity, v, ty)
| cconv == PrimCallConv = do | cconv == PrimCallConv = do
let funcTarget = CFunction (StaticTarget entity) let funcTarget = CFunction (StaticTarget entity)
importSpec = CImport PrimCallConv safety nilFS funcTarget importSpec = CImport PrimCallConv safety nilFS funcTarget
return (ForD (ForeignImport v ty importSpec)) return (ForD (ForeignImport v ty importSpec))
| otherwise = do | otherwise = do
case parseCImport cconv safety (mkExtName (unLoc v)) (unpackFS entity) of case parseCImport cconv safety (mkExtName (unLoc v)) (unpackFS entity) of
Nothing -> parseError loc "Malformed entity string" Nothing -> parseError loc "Malformed entity string"
......
...@@ -217,9 +217,9 @@ dmdAnal sigs dmd (Lam var body) ...@@ -217,9 +217,9 @@ dmdAnal sigs dmd (Lam var body)
(deferType lam_ty, Lam var' body') (deferType lam_ty, Lam var' body')
dmdAnal sigs dmd (Case scrut case_bndr ty [alt@(DataAlt dc,bndrs,rhs)]) dmdAnal sigs dmd (Case scrut case_bndr ty [alt@(DataAlt dc,bndrs,rhs)])
| let tycon = dataConTyCon dc, | let tycon = dataConTyCon dc
isProductTyCon tycon, , isProductTyCon tycon
not (isRecursiveTyCon tycon) , not (isRecursiveTyCon tycon)
= let = let
sigs_alt = extendSigEnv NotTopLevel sigs case_bndr case_bndr_sig sigs_alt = extendSigEnv NotTopLevel sigs case_bndr case_bndr_sig
(alt_ty, alt') = dmdAnalAlt sigs_alt dmd alt (alt_ty, alt') = dmdAnalAlt sigs_alt dmd alt
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment