diff options
author | Hécate <hecate+gitlab@glitchbra.in> | 2020-10-10 21:15:36 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-11-01 01:11:09 -0400 |
commit | dfd27445308d1ed2df8826c2a045130e918e8192 (patch) | |
tree | 99fc01edeebc2924ddb7533864e0d4ca18cfe800 /compiler/GHC/ThToHs.hs | |
parent | bd4abdc953427e084e7ecba89db64860f6859822 (diff) | |
download | haskell-dfd27445308d1ed2df8826c2a045130e918e8192.tar.gz |
Add the proper HLint rules and remove redundant keywords from compiler
Diffstat (limited to 'compiler/GHC/ThToHs.hs')
-rw-r--r-- | compiler/GHC/ThToHs.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/GHC/ThToHs.hs b/compiler/GHC/ThToHs.hs index 0130989940..26325cf7bc 100644 --- a/compiler/GHC/ThToHs.hs +++ b/compiler/GHC/ThToHs.hs @@ -1019,7 +1019,7 @@ cvtl e = wrapL (cvt e) -- constructor names - see #14627. { s' <- vcName s ; return $ HsVar noExtField (noLoc s') } - cvt (LabelE s) = do { return $ HsOverLabel noExtField Nothing (fsLit s) } + cvt (LabelE s) = return $ HsOverLabel noExtField Nothing (fsLit s) cvt (ImplicitParamVarE n) = do { n' <- ipName n; return $ HsIPVar noExtField n' } {- | #16895 Ensure an infix expression's operator is a variable/constructor. @@ -1497,7 +1497,7 @@ cvtTypeKind ty_str ty tys' ListT | Just normals <- m_normals - , [x'] <- normals -> do + , [x'] <- normals -> returnL (HsListTy noExtField x') | otherwise -> mk_apps @@ -1584,8 +1584,7 @@ cvtTypeKind ty_str ty -- in Language.Haskell.TH.Syntax | Just normals <- m_normals , [ty1, L _ (HsExplicitListTy _ ip tys2)] <- normals - -> do - returnL (HsExplicitListTy noExtField ip (ty1:tys2)) + -> returnL (HsExplicitListTy noExtField ip (ty1:tys2)) | otherwise -> mk_apps (HsTyVar noExtField IsPromoted (noLoc (getRdrName consDataCon))) |