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
in listToFM shadowed
where
check (shadowed,pkgmap) pkg
| Just oldpkg <- lookupUFM pkgmap (packageConfigId pkg),
let
| Just oldpkg <- lookupUFM pkgmap (packageConfigId pkg)
, let
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
then ( (ipid_new, ShadowedBy ipid_old) : 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
return (L (mkSrcSpan loc end) (ITprimchar ch))
_other ->
return (L (mkSrcSpan loc end) (ITchar ch))
else do
else do
return (L (mkSrcSpan loc end) (ITchar ch))
lex_char :: Char -> AlexInput -> P Char
......
......@@ -985,9 +985,9 @@ mkImport :: CCallConv
-> P (HsDecl RdrName)
mkImport cconv safety (L loc entity, v, ty)
| cconv == PrimCallConv = do
let funcTarget = CFunction (StaticTarget entity)
importSpec = CImport PrimCallConv safety nilFS funcTarget
return (ForD (ForeignImport v ty importSpec))
let funcTarget = CFunction (StaticTarget entity)
importSpec = CImport PrimCallConv safety nilFS funcTarget
return (ForD (ForeignImport v ty importSpec))
| otherwise = do
case parseCImport cconv safety (mkExtName (unLoc v)) (unpackFS entity) of
Nothing -> parseError loc "Malformed entity string"
......
......@@ -217,9 +217,9 @@ dmdAnal sigs dmd (Lam var body)
(deferType lam_ty, Lam var' body')
dmdAnal sigs dmd (Case scrut case_bndr ty [alt@(DataAlt dc,bndrs,rhs)])
| let tycon = dataConTyCon dc,
isProductTyCon tycon,
not (isRecursiveTyCon tycon)
| let tycon = dataConTyCon dc
, isProductTyCon tycon
, not (isRecursiveTyCon tycon)
= let
sigs_alt = extendSigEnv NotTopLevel sigs case_bndr case_bndr_sig
(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