All hints

All files

Report generated by HLint v2.1.11 - a tool to suggest improvements to your Haskell code.

./hs/src/HelVM/HelPS/BLC/Builtin.hs:295:24: Suggestion: Use fromMaybe
Found
case lookup v builtins of
    Just e -> e
    Nothing -> (SVar v)
Perhaps
fromMaybe (SVar v) (lookup v builtins)
./hs/src/HelVM/HelPS/BLC/Builtin.hs:295:24: Suggestion: Redundant bracket
Found
case lookup v builtins of
    Just e -> e
    Nothing -> (SVar v)
Perhaps
case lookup v builtins of
    Just e -> e
    Nothing -> SVar v
./hs/src/HelVM/HelPS/BLC/Compiler.hs:16:29: Warning: Use concatMap
Found
concat (map bindings bgs)
Perhaps
concatMap bindings bgs
./hs/src/HelVM/HelPS/BLC/Compiler.hs:24:26: Suggestion: Redundant bracket
Found
(ESign (expandCon e) sc)
Perhaps
ESign (expandCon e) sc
./hs/src/HelVM/HelPS/BLC/Compiler.hs:49:19: Suggestion: Redundant bracket
Found
case (abstract i e') of
    SVar "K" `SAp` _ -> e'
    e'' -> e'' `SAp` removeSelfRec i v
Perhaps
case abstract i e' of
    SVar "K" `SAp` _ -> e'
    e'' -> e'' `SAp` removeSelfRec i v
./hs/src/HelVM/HelPS/BLC/Compiler.hs:70:17: Suggestion: Use section
Found
(flip refers e)
Perhaps
(`refers` e)
./hs/src/HelVM/HelPS/BLC/Compiler.hs:75:11: Suggestion: Use foldr
Found
mklist [] = SVar "nil"
mklist (x : xs) = SVar "cons" `SAp` x `SAp` mklist xs
Perhaps
mklist xs
  = foldr (\ x -> SAp (SVar "cons" `SAp` x)) (SVar "nil") xs
Lexer.x:19:1: Suggestion: Use hierarchical imports
Found
import Char (ord)
Perhaps
import Data.Char (ord)
templates/wrappers.hs:65:13: Suggestion: Redundant bracket
Found
(p, c, (b : bs), s)
Perhaps
(p, c, b : bs, s)
templates/wrappers.hs:67:13: Suggestion: Redundant bracket
Found
(p, _, [], (c : s))
Perhaps
(p, _, [], c : s)
templates/wrappers.hs:389:27: Suggestion: Redundant bracket
Found
((AlexPn _ line column), _, _, _)
Perhaps
(AlexPn _ line column, _, _, _)
templates/wrappers.hs:389:92: Suggestion: Redundant bracket
Found
(show line) ++ " line, " ++ (show column) ++ " column"
Perhaps
show line ++ " line, " ++ (show column) ++ " column"
templates/wrappers.hs:389:120: Suggestion: Redundant bracket
Found
(show column) ++ " column"
Perhaps
show column ++ " column"
templates/wrappers.hs:416:1: Suggestion: Use camelCase
Found
alex_base = ...
Perhaps
alexBase = ...
templates/wrappers.hs:419:1: Suggestion: Use camelCase
Found
alex_table = ...
Perhaps
alexTable = ...
templates/wrappers.hs:422:1: Suggestion: Use camelCase
Found
alex_check = ...
Perhaps
alexCheck = ...
templates/wrappers.hs:425:1: Suggestion: Use camelCase
Found
alex_deflt = ...
Perhaps
alexDeflt = ...
templates/wrappers.hs:427:1: Suggestion: Use camelCase
Found
alex_accept = ...
Perhaps
alexAccept = ...
templates/wrappers.hs:427:186: Warning: Redundant bracket
Found
(AlexAccSkip)
Perhaps
AlexAccSkip
templates/wrappers.hs:427:202: Warning: Redundant bracket
Found
(AlexAccSkip)
Perhaps
AlexAccSkip
templates/wrappers.hs:427:218: Warning: Redundant bracket
Found
(AlexAccSkip)
Perhaps
AlexAccSkip
templates/wrappers.hs:427:233: Suggestion: Redundant bracket
Found
[(AlexAcc (alex_action_3))]
Perhaps
[AlexAcc (alex_action_3)]
templates/wrappers.hs:427:243: Warning: Redundant bracket
Found
(alex_action_3)
Perhaps
alex_action_3
templates/wrappers.hs:427:261: Suggestion: Redundant bracket
Found
[(AlexAcc (alex_action_3))]
Perhaps
[AlexAcc (alex_action_3)]
templates/wrappers.hs:427:271: Warning: Redundant bracket
Found
(alex_action_3)
Perhaps
alex_action_3
templates/wrappers.hs:427:289: Suggestion: Redundant bracket
Found
[(AlexAcc (alex_action_4))]
Perhaps
[AlexAcc (alex_action_4)]
templates/wrappers.hs:427:299: Warning: Redundant bracket
Found
(alex_action_4)
Perhaps
alex_action_4
templates/wrappers.hs:427:317: Suggestion: Redundant bracket
Found
[(AlexAcc (alex_action_4))]
Perhaps
[AlexAcc (alex_action_4)]
templates/wrappers.hs:427:327: Warning: Redundant bracket
Found
(alex_action_4)
Perhaps
alex_action_4
templates/wrappers.hs:427:345: Suggestion: Redundant bracket
Found
[(AlexAcc (alex_action_5))]
Perhaps
[AlexAcc (alex_action_5)]
templates/wrappers.hs:427:355: Warning: Redundant bracket
Found
(alex_action_5)
Perhaps
alex_action_5
templates/wrappers.hs:427:373: Suggestion: Redundant bracket
Found
[(AlexAcc (alex_action_6))]
Perhaps
[AlexAcc (alex_action_6)]
templates/wrappers.hs:427:383: Warning: Redundant bracket
Found
(alex_action_6)
Perhaps
alex_action_6
templates/wrappers.hs:427:401: Suggestion: Redundant bracket
Found
[(AlexAcc (alex_action_7))]
Perhaps
[AlexAcc (alex_action_7)]
templates/wrappers.hs:427:411: Warning: Redundant bracket
Found
(alex_action_7)
Perhaps
alex_action_7
templates/wrappers.hs:427:429: Suggestion: Redundant bracket
Found
[(AlexAcc (alex_action_8))]
Perhaps
[AlexAcc (alex_action_8)]
templates/wrappers.hs:427:439: Warning: Redundant bracket
Found
(alex_action_8)
Perhaps
alex_action_8
templates/wrappers.hs:427:457: Suggestion: Redundant bracket
Found
[(AlexAcc (alex_action_9))]
Perhaps
[AlexAcc (alex_action_9)]
templates/wrappers.hs:427:467: Warning: Redundant bracket
Found
(alex_action_9)
Perhaps
alex_action_9
templates/wrappers.hs:427:485: Suggestion: Redundant bracket
Found
[(AlexAcc (alex_action_10))]
Perhaps
[AlexAcc (alex_action_10)]
templates/wrappers.hs:427:495: Warning: Redundant bracket
Found
(alex_action_10)
Perhaps
alex_action_10
templates/wrappers.hs:427:514: Suggestion: Redundant bracket
Found
[(AlexAcc (alex_action_10))]
Perhaps
[AlexAcc (alex_action_10)]
templates/wrappers.hs:427:524: Warning: Redundant bracket
Found
(alex_action_10)
Perhaps
alex_action_10
Lexer.x:157:1: Warning: Eta reduce
Found
annotate tps = annotate2 0 tps
Perhaps
annotate = annotate2 0
Lexer.x:164:28: Suggestion: Redundant bracket
Found
(next tok) ln
Perhaps
next tok ln
templates/GenericTemplate.hs:113:16: Warning: Redundant bracket
Found
(sc)
Perhaps
sc
templates/GenericTemplate.hs:114:34: Warning: Redundant bracket
Found
(sc)
Perhaps
sc
templates/GenericTemplate.hs:116:25: Warning: Redundant bracket
Found
(sc)
Perhaps
sc
templates/GenericTemplate.hs:117:35: Warning: Redundant bracket
Found
(0)
Perhaps
0
templates/GenericTemplate.hs:147:1: Suggestion: Use camelCase
Found
alex_scan_tkn user orig_input len input s last_acc = ...
Perhaps
alexScanTkn user orig_input len input s last_acc = ...
templates/GenericTemplate.hs:149:3: Suggestion: Redundant bracket
Found
let new_acc = (check_accs (alex_accept `quickIndex` (s))) in
  new_acc `seq`
    case alexGetByte input of
        Nothing -> (new_acc, input)
        Just (c, new_input) -> let (base)
                                     = alexIndexInt32OffAddr alex_base s
                                   ((ord_c)) = fromIntegral c
                                   (offset) = (base + ord_c)
                                   (check) = alexIndexInt16OffAddr alex_check offset
                                   (new_s)
                                     = if (offset >= (0)) && (check == ord_c) then
                                         alexIndexInt16OffAddr alex_table offset else
                                         alexIndexInt16OffAddr alex_deflt s
                                 in
                                 case new_s of
                                     (-1) -> (new_acc, input)
                                     _ -> alex_scan_tkn user orig_input
                                            (if c < 128 || c >= 192 then (len + (1)) else len)
                                            new_input
                                            new_s
                                            new_acc
Perhaps
let new_acc = check_accs (alex_accept `quickIndex` (s)) in
  new_acc `seq`
    case alexGetByte input of
        Nothing -> (new_acc, input)
        Just (c, new_input) -> let (base)
                                     = alexIndexInt32OffAddr alex_base s
                                   ((ord_c)) = fromIntegral c
                                   (offset) = (base + ord_c)
                                   (check) = alexIndexInt16OffAddr alex_check offset
                                   (new_s)
                                     = if (offset >= (0)) && (check == ord_c) then
                                         alexIndexInt16OffAddr alex_table offset else
                                         alexIndexInt16OffAddr alex_deflt s
                                 in
                                 case new_s of
                                     (-1) -> (new_acc, input)
                                     _ -> alex_scan_tkn user orig_input
                                            (if c < 128 || c >= 192 then (len + (1)) else len)
                                            new_input
                                            new_s
                                            new_acc
templates/GenericTemplate.hs:150:57: Warning: Redundant bracket
Found
(s)
Perhaps
s
templates/GenericTemplate.hs:160:17: Warning: Redundant bracket
Found
(base)
Perhaps
base
templates/GenericTemplate.hs:161:17: Warning: Redundant bracket
Found
((ord_c))
Perhaps
ord_c
templates/GenericTemplate.hs:162:17: Warning: Redundant bracket
Found
(offset)
Perhaps
offset
templates/GenericTemplate.hs:163:17: Warning: Redundant bracket
Found
(check)
Perhaps
check
templates/GenericTemplate.hs:165:17: Warning: Redundant bracket
Found
(new_s)
Perhaps
new_s
templates/GenericTemplate.hs:165:41: Warning: Redundant bracket
Found
(0)
Perhaps
0
templates/GenericTemplate.hs:173:49: Suggestion: Redundant bracket
Found
if c < 128 || c >= 192 then (len + (1)) else len
Perhaps
if c < 128 || c >= 192 then len + (1) else len
templates/GenericTemplate.hs:173:86: Warning: Redundant bracket
Found
(1)
Perhaps
1
templates/GenericTemplate.hs:179:58: Warning: Redundant bracket
Found
(len)
Perhaps
len
templates/GenericTemplate.hs:180:61: Warning: Redundant bracket
Found
(len)
Perhaps
len
templates/GenericTemplate.hs:182:36: Warning: Redundant bracket
Found
(len)
Perhaps
len
templates/GenericTemplate.hs:183:34: Warning: Redundant bracket
Found
(len)
Perhaps
len
templates/GenericTemplate.hs:185:36: Warning: Redundant bracket
Found
(len)
Perhaps
len
templates/GenericTemplate.hs:186:33: Warning: Redundant bracket
Found
(len)
Perhaps
len
templates/GenericTemplate.hs:222:18: Warning: Redundant bracket
Found
(sc)
Perhaps
sc
templates/GenericTemplate.hs:223:36: Warning: Redundant bracket
Found
(0)
Perhaps
0
templates/GenericTemplate.hs:231:8: Warning: Redundant bracket
Found
(i)
Perhaps
i
./hs/src/HelVM/HelPS/BLC/Main.hs:17:22: Suggestion: Redundant bracket
Found
P.Decl (P.VarDecl ("@main", [], P.Rhs (P.Var "main") [])) :
  (P.parse (L.lexer "argf" s))
Perhaps
P.Decl (P.VarDecl ("@main", [], P.Rhs (P.Var "main") [])) :
  P.parse (L.lexer "argf" s)
./hs/src/HelVM/HelPS/BLC/Main.hs:32:15: Warning: Redundant do
Found
do putStrLn (show e)
Perhaps
putStrLn (show e)
./hs/src/HelVM/HelPS/BLC/Main.hs:34:18: Warning: Use print
Found
putStrLn (show e)
Perhaps
print e
./hs/src/HelVM/HelPS/BLC/Main.hs:37:19: Warning: Use 'getArgs' from Relude
Found
getArgs
Perhaps
getArgs
Note: 'getArgs' is already exported from Relude
./hs/src/HelVM/HelPS/BLC/Main.hs:38:14: Suggestion: Use null
Found
argv == []
Perhaps
null argv
./hs/src/HelVM/HelPS/BLC/PPrint.hs:30:31: Warning: Use shows
Found
showsPrec 0
Perhaps
shows
./hs/src/HelVM/HelPS/BLC/PPrint.hs:32:31: Warning: Use shows
Found
showsPrec 0
Perhaps
shows
./hs/src/HelVM/HelPS/BLC/PPrint.hs:32:60: Warning: Use shows
Found
showsPrec 0
Perhaps
shows
./hs/src/HelVM/HelPS/BLC/PPrint.hs:50:54: Warning: Use shows
Found
showsPrec 0
Perhaps
shows
./hs/src/HelVM/HelPS/BLC/PPrint.hs:52:23: Warning: Use shows
Found
showsPrec 0
Perhaps
shows
./hs/src/HelVM/HelPS/BLC/PPrint.hs:52:53: Suggestion: Redundant bracket
Found
(join ";\n\t" alts) . ('}' :)
Perhaps
join ";\n\t" alts . ('}' :)
./hs/src/HelVM/HelPS/BLC/PPrint.hs:53:23: Warning: Use shows
Found
showsPrec 0
Perhaps
shows
./hs/src/HelVM/HelPS/BLC/PPrint.hs:55:66: Warning: Use shows
Found
showsPrec 0
Perhaps
shows
./hs/src/HelVM/HelPS/BLC/PPrint.hs:57:9: Warning: Use shows
Found
showsPrec 0
Perhaps
shows
./hs/src/HelVM/HelPS/BLC/PPrint.hs:58:49: Suggestion: Use prev
Found
pred
Perhaps
prev
Note: pred from Prelude is a pure function but it may throw exception. Consider using prev from Relude.Extra.Enum instead.
./hs/src/HelVM/HelPS/BLC/Parser.hs:67:64: Warning: Use fmap
Found
liftM
Perhaps
fmap
./hs/src/HelVM/HelPS/BLC/Parser.hs:93:51: Suggestion: Use prev
Found
pred
Perhaps
prev
Note: pred from Prelude is a pure function but it may throw exception. Consider using prev from Relude.Extra.Enum instead.
./hs/src/HelVM/HelPS/BLC/Parser.hs:136:7: Warning: Use <$>
Found
do tokenEq
   e <- expr
   ds <- whereDecls
   return (Rhs e ds)
Perhaps
do tokenEq
   e <- expr
   Rhs e <$> whereDecls
./hs/src/HelVM/HelPS/BLC/Parser.hs:140:7: Warning: Use <$>
Found
do gds <- many1 (guard tokenEq)
   ds <- whereDecls
   return (Guarded gds ds)
Perhaps
do gds <- many1 (guard tokenEq)
   Guarded gds <$> whereDecls
./hs/src/HelVM/HelPS/BLC/Parser.hs:157:1: Suggestion: Use camelCase
Found
context_type = ...
Perhaps
contextType = ...
./hs/src/HelVM/HelPS/BLC/Parser.hs:160:1: Suggestion: Use camelCase
Found
context_simpletype = ...
Perhaps
contextSimpletype = ...
./hs/src/HelVM/HelPS/BLC/Parser.hs:222:10: Warning: Use <$>
Found
do i <- conid
   return (TyCon i)
Perhaps
do TyCon <$> conid
./hs/src/HelVM/HelPS/BLC/Parser.hs:225:9: Warning: Use <$>
Found
do i <- varid
   return (TyVar i)
Perhaps
do TyVar <$> varid
./hs/src/HelVM/HelPS/BLC/Parser.hs:253:9: Warning: Use <$>
Found
do tokenLambda
   ps <- many1 apat
   tokenRArrow
   e <- expr
   return (Lambda ps e)
Perhaps
do tokenLambda
   ps <- many1 apat
   tokenRArrow
   Lambda ps <$> expr
./hs/src/HelVM/HelPS/BLC/Parser.hs:258:9: Warning: Use <$>
Found
do tokenLet
   ds <- decls
   tokenIn
   e <- expr
   return (Let ds e)
Perhaps
do tokenLet
   ds <- decls
   tokenIn
   Let ds <$> expr
./hs/src/HelVM/HelPS/BLC/Parser.hs:263:9: Warning: Use <$>
Found
do tokenCase
   e <- expr
   tokenOf
   a <- alts
   return (Case e a)
Perhaps
do tokenCase
   e <- expr
   tokenOf
   Case e <$> alts
./hs/src/HelVM/HelPS/BLC/Parser.hs:271:8: Warning: Use <$>
Found
do i <- qvar
   return (Var i)
Perhaps
do Var <$> qvar
./hs/src/HelVM/HelPS/BLC/Parser.hs:272:8: Warning: Use <$>
Found
do c <- gcon
   return (Con c)
Perhaps
do Con <$> gcon
./hs/src/HelVM/HelPS/BLC/Parser.hs:273:8: Warning: Use <$>
Found
do i <- litInt
   return (LitInt i)
Perhaps
do LitInt <$> litInt
./hs/src/HelVM/HelPS/BLC/Parser.hs:274:8: Warning: Use <$>
Found
do c <- litChar
   return (LitChar c)
Perhaps
do LitChar <$> litChar
./hs/src/HelVM/HelPS/BLC/Parser.hs:275:8: Warning: Use <$>
Found
do s <- litStr
   return (LitStr s)
Perhaps
do LitStr <$> litStr
./hs/src/HelVM/HelPS/BLC/Parser.hs:331:28: Warning: Use <$>
Found
do tokenAt
   p <- apat
   return (AsPat v p)
Perhaps
do tokenAt
   AsPat v <$> apat
./hs/src/HelVM/HelPS/BLC/Parser.hs:333:8: Warning: Use <$>
Found
do i <- litInt
   return (PInt i)
Perhaps
do PInt <$> litInt
./hs/src/HelVM/HelPS/BLC/Parser.hs:334:8: Warning: Use <$>
Found
do c <- litChar
   return (PChar c)
Perhaps
do PChar <$> litChar
./hs/src/HelVM/HelPS/BLC/Parser.hs:335:8: Warning: Use <$>
Found
do s <- litStr
   return (PStr s)
Perhaps
do PStr <$> litStr
./hs/src/HelVM/HelPS/BLC/Parser.hs:507:1: Warning: Eta reduce
Found
hsBetween open close = between open close
Perhaps
hsBetween = between
./hs/src/HelVM/HelPS/BLC/Parser.hs:516:1: Warning: Eta reduce
Found
arrow l r = TyAp (TyAp (TyCon "(->)") l) r
Perhaps
arrow l = TyAp (TyAp (TyCon "(->)") l)
./hs/src/HelVM/HelPS/BLC/Parser.hs:519:1: Warning: Eta reduce
Found
ap2 op l r = Ap (Ap op l) r
Perhaps
ap2 op l = Ap (Ap op l)
./hs/src/HelVM/HelPS/BLC/Parser.hs:522:1: Warning: Eta reduce
Found
bltinApp i es = foldl Ap (Var i) es
Perhaps
bltinApp i = foldl Ap (Var i)
./hs/src/HelVM/HelPS/BLC/Parser.hs:525:14: Suggestion: Redundant bracket
Found
(Con ":") `Ap` e1
Perhaps
Con ":" `Ap` e1
./hs/src/HelVM/HelPS/BLC/PatComp.hs:36:30: Suggestion: Redundant $
Found
head $ qs
Perhaps
head qs
./hs/src/HelVM/HelPS/BLC/PatComp.hs:40:28: Warning: Use fmap
Found
liftM
Perhaps
fmap
./hs/src/HelVM/HelPS/BLC/PatComp.hs:56:21: Warning: Use fmap
Found
liftM
Perhaps
fmap
./hs/src/HelVM/HelPS/BLC/PatComp.hs:69:38: Suggestion: Redundant $
Found
LitStr $ "Non-exhaustive patterns"
Perhaps
LitStr "Non-exhaustive patterns"
./hs/src/HelVM/HelPS/BLC/PatComp.hs:87:44: Suggestion: Redundant $
Found
LitStr $ "!?"
Perhaps
LitStr "!?"
./hs/src/HelVM/HelPS/BLC/PatComp.hs:122:1: Warning: Eta reduce
Found
matchVar (u : us) qs def = match us (map sub qs) def
Perhaps
matchVar (u : us) qs = match us (map sub qs)
./hs/src/HelVM/HelPS/BLC/PatComp.hs:182:44: Suggestion: Redundant $
Found
LitStr $ "!?"
Perhaps
LitStr "!?"
./hs/src/HelVM/HelPS/BLC/SCC.hs:6:1: Suggestion: Use newtype instead of data
Found
data SM s a = SM (s -> (a, s))
Perhaps
newtype SM s a = SM (s -> (a, s))
Note: decreases laziness
./hs/src/HelVM/HelPS/BLC/SCC.hs:10:20: Suggestion: Use tuple-section
Found
\ s -> (k, s)
Perhaps
(k,)
Note: may require {-# LANGUAGE TupleSections #-} adding to the top of the file
./hs/src/HelVM/HelPS/BLC/SCC.hs:13:16: Suggestion: Use toFst
Found
\ s -> (f s, s)
Perhaps
toFst f
Note: Use toFst from Relude.Extra.Tuple
./hs/src/HelVM/HelPS/BLC/SCC.hs:19:18: Warning: Avoid lambda
Found
\ s -> f s
Perhaps
f
./hs/src/HelVM/HelPS/BLC/SCC.hs:42:33: Suggestion: Redundant bracket
Found
[(u, rangeSize (bounds m)) | u <- (v : c)]
Perhaps
[(u, rangeSize (bounds m)) | u <- v : c]
./hs/src/HelVM/HelPS/BLC/SCC.hs:56:18: Warning: Use 'when' from Relude
Found
when
Perhaps
when
Note: 'when' is already exported from Relude
./hs/src/HelVM/HelPS/BLC/SCC.hs:64:21: Suggestion: Use fromMaybe
Found
case elemIndex v vs of
    Just i -> i
    Nothing -> error "Illegal adjacency list"
Perhaps
fromMaybe (error "Illegal adjacency list") (elemIndex v vs)
./hs/src/HelVM/HelPS/BLC/Static.hs:22:18: Warning: Use concatMap
Found
concat (map (anSigDecl dt) sigDecls)
Perhaps
concatMap (anSigDecl dt) sigDecls
./hs/src/HelVM/HelPS/BLC/Static.hs:256:33: Suggestion: Use prev
Found
pred
Perhaps
prev
Note: pred from Prelude is a pure function but it may throw exception. Consider using prev from Relude.Extra.Enum instead.
./hs/src/HelVM/HelPS/BLC/Static.hs:257:38: Suggestion: Use prev
Found
pred
Perhaps
prev
Note: pred from Prelude is a pure function but it may throw exception. Consider using prev from Relude.Extra.Enum instead.
./hs/src/HelVM/HelPS/BLC/Static.hs:265:25: Suggestion: Use infix
Found
elem id bounded
Perhaps
id `elem` bounded
./hs/src/HelVM/HelPS/BLC/Syntax.hs:40:29: Warning: Use 'chr' from Relude
Found
chr
Perhaps
chr
Note: 'chr' is already exported from Relude
./hs/src/HelVM/HelPS/BLC/Syntax.hs:44:28: Warning: Use shows
Found
showsPrec 0
Perhaps
shows
./hs/src/HelVM/HelPS/BLC/Syntax.hs:48:50: Warning: Use shows
Found
showsPrec 0
Perhaps
shows
./hs/src/HelVM/HelPS/BLC/Syntax.hs:53:32: Warning: Use shows
Found
showsPrec 0
Perhaps
shows
./hs/src/HelVM/HelPS/BLC/Syntax.hs:75:5: Warning: Eta reduce
Found
show tc = tyconName tc
Perhaps
show = tyconName
./hs/src/HelVM/HelPS/BLC/Syntax.hs:83:5: Warning: Eta reduce
Found
assocKey tc = tyconName tc
Perhaps
assocKey = tyconName
./hs/src/HelVM/HelPS/BLC/Syntax.hs:142:1: Warning: Eta reduce
Found
list t = TAp tList t
Perhaps
list = TAp tList
./hs/src/HelVM/HelPS/BLC/Syntax.hs:152:3: Warning: Eta reduce
Found
kind tc = tyconKind tc
Perhaps
kind = tyconKind
./hs/src/HelVM/HelPS/BLC/Syntax.hs:158:20: Suggestion: Redundant bracket
Found
case (kind t) of
    (Kfun _ k) -> k
Perhaps
case kind t of
    (Kfun _ k) -> k
./hs/src/HelVM/HelPS/BLC/Syntax.hs:169:23: Suggestion: Use fromMaybe
Found
case lookup u s of
    Just t -> t
    Nothing -> TVar u
Perhaps
fromMaybe (TVar u) (lookup u s)
./hs/src/HelVM/HelPS/BLC/Syntax.hs:181:13: Warning: Use ordNub
Found
nub
Perhaps
ordNub
Note: 'nub' is O(n^2), 'ordNub' is O(n log n)
./hs/src/HelVM/HelPS/BLC/Syntax.hs:181:19: Warning: Use concatMap
Found
concat . map tv
Perhaps
concatMap tv
./hs/src/HelVM/HelPS/BLC/Syntax.hs:240:24: Suggestion: Redundant bracket
Found
i :>: (apply s sc)
Perhaps
i :>: apply s sc
./hs/src/HelVM/HelPS/BLC/Syntax.hs:324:35: Warning: Use concatMap
Found
concat (map patVars ps)
Perhaps
concatMap patVars ps
./hs/src/HelVM/HelPS/BLC/Syntax.hs:329:23: Warning: Use concatMap
Found
concat (map patVars ps)
Perhaps
concatMap patVars ps
./hs/src/HelVM/HelPS/BLC/Syntax.hs:368:1: Warning: Eta reduce
Found
idEnvTransformer ce = Just ce
Perhaps
idEnvTransformer = Just
./hs/src/HelVM/HelPS/BLC/Syntax.hs:397:28: Suggestion: Use fromMaybe
Found
case lookup key xs of
    Just x -> x
    Nothing -> error "cannot occur"
Perhaps
fromMaybe (error "cannot occur") (lookup key xs)
./hs/src/HelVM/HelPS/BLC/Test.hs:11:5: Suggestion: Redundant bracket
Found
let pList = (P.TyAp (P.TyCon "List") (P.TyVar "a")) in
  assertEqual "1" (tyList, tcList) (S.anDataLhs pList 2)
Perhaps
let pList = P.TyAp (P.TyCon "List") (P.TyVar "a") in
  assertEqual "1" (tyList, tcList) (S.anDataLhs pList 2)
./hs/src/HelVM/HelPS/BLC/Type.hs:350:12: Warning: Reduce duplication
Found
qs' = apply s qs
t' = apply s t
fs = tv (apply s env)
gs = tv t' \\ fs
sc' = quantify gs (qs' :=> t')
ps' = filter (not . entail ce qs') (apply s ps)
Perhaps
Combine with ./hs/src/HelVM/HelPS/BLC/Type.hs:521:18
./hs/src/HelVM/HelPS/BLC/Type.hs:374:27: Warning: Use mapM_
Found
mapM (unify t) [t' | (_, t', _) <- r]
Perhaps
mapM_ (unify t) [t' | (_, t', _) <- r]
./hs/src/HelVM/HelPS/BLC/Type.hs:394:8: Warning: Use mapM_
Found
mapM (unify t) [t' | (_, t', _) <- r]
Perhaps
mapM_ (unify t) [t' | (_, t', _) <- r]
./hs/src/HelVM/HelPS/BLC/Type.hs:429:36: Suggestion: Redundant bracket
Found
((TVar v) ==)
Perhaps
(TVar v ==)
./hs/src/HelVM/HelPS/BLC/Type.hs:444:44: Warning: Use concatMap
Found
concat (map snd vps)
Perhaps
concatMap snd vps
./hs/src/HelVM/HelPS/BLC/Type.hs:458:1: Warning: Eta reduce
Found
resolve ce s recs ps alts = map resolveAlt alts
Perhaps
resolve ce s recs ps = map resolveAlt
./hs/src/HelVM/HelPS/BLC/Type.hs:489:5: Suggestion: Use fromMaybe
Found
case lookup p' (reParam re) of
    Just e' -> e'
    Nothing -> case byInst (reClass re) p' of
                   Just (ps, e') -> foldl Ap e' (map (resolveExpr re . ClassPH) ps)
                   Nothing -> case resolveSuper re pes p' of
                                  Just e' -> e'
                                  Nothing -> e
Perhaps
fromMaybe
  (case byInst (reClass re) p' of
       Just (ps, e') -> foldl Ap e' (map (resolveExpr re . ClassPH) ps)
       Nothing -> case resolveSuper re pes p' of
                      Just e' -> e'
                      Nothing -> e)
  (lookup p' (reParam re))
./hs/src/HelVM/HelPS/BLC/Type.hs:495:17: Suggestion: Use fromMaybe
Found
case resolveSuper re pes p' of
    Just e' -> e'
    Nothing -> e
Perhaps
fromMaybe e (resolveSuper re pes p')
./hs/src/HelVM/HelPS/BLC/Type.hs:540:1: Warning: Eta reduce
Found
restricted bs = any simple bs
Perhaps
restricted = any simple
./hs/src/HelVM/HelPS/BLC/Type.hs:550:18: Warning: Use zipWithM
Found
sequence (zipWith (tiAlts ce env') altss ts)
Perhaps
Control.Monad.zipWithM (tiAlts ce env') altss ts
./hs/src/HelVM/HelPS/BLC/Type.hs:552:31: Warning: Use concatMap
Found
concat (map fst pssass)
Perhaps
concatMap fst pssass
./hs/src/HelVM/HelPS/BLC/Type.hs:579:20: Warning: Use concatMap
Found
concat (map fst qses_s)
Perhaps
concatMap fst qses_s
./hs/src/HelVM/HelPS/BLC/Type.hs:601:2: Suggestion: Redundant bracket
Found
"+" :>: (toScheme (tInt `fn` tInt `fn` tInt))
Perhaps
"+" :>: toScheme (tInt `fn` tInt `fn` tInt)
./hs/src/HelVM/HelPS/BLC/Type.hs:602:2: Suggestion: Redundant bracket
Found
"-" :>: (toScheme (tInt `fn` tInt `fn` tInt))
Perhaps
"-" :>: toScheme (tInt `fn` tInt `fn` tInt)
./hs/src/HelVM/HelPS/BLC/Type.hs:603:2: Suggestion: Redundant bracket
Found
"*" :>: (toScheme (tInt `fn` tInt `fn` tInt))
Perhaps
"*" :>: toScheme (tInt `fn` tInt `fn` tInt)
./hs/src/HelVM/HelPS/BLC/Type.hs:605:2: Suggestion: Redundant bracket
Found
"div" :>: (toScheme (tInt `fn` tInt `fn` tInt))
Perhaps
"div" :>: toScheme (tInt `fn` tInt `fn` tInt)
./hs/src/HelVM/HelPS/BLC/Type.hs:606:2: Suggestion: Redundant bracket
Found
"mod" :>: (toScheme (tInt `fn` tInt `fn` tInt))
Perhaps
"mod" :>: toScheme (tInt `fn` tInt `fn` tInt)
./hs/src/HelVM/HelPS/BLC/Type.hs:610:2: Suggestion: Redundant bracket
Found
"<" :>: (toScheme (tInt `fn` tInt `fn` tBool))
Perhaps
"<" :>: toScheme (tInt `fn` tInt `fn` tBool)
./hs/src/HelVM/HelPS/BLC/Type.hs:611:2: Suggestion: Redundant bracket
Found
">" :>: (toScheme (tInt `fn` tInt `fn` tBool))
Perhaps
">" :>: toScheme (tInt `fn` tInt `fn` tBool)
./hs/src/HelVM/HelPS/BLC/Type.hs:612:2: Suggestion: Redundant bracket
Found
"<=" :>: (toScheme (tInt `fn` tInt `fn` tBool))
Perhaps
"<=" :>: toScheme (tInt `fn` tInt `fn` tBool)
./hs/src/HelVM/HelPS/BLC/Type.hs:613:2: Suggestion: Redundant bracket
Found
">=" :>: (toScheme (tInt `fn` tInt `fn` tBool))
Perhaps
">=" :>: toScheme (tInt `fn` tInt `fn` tBool)
./hs/src/HelVM/HelPS/BLC/Type.hs:614:2: Suggestion: Redundant bracket
Found
"&&" :>: (toScheme (tBool `fn` tBool `fn` tBool))
Perhaps
"&&" :>: toScheme (tBool `fn` tBool `fn` tBool)
./hs/src/HelVM/HelPS/BLC/Type.hs:615:2: Suggestion: Redundant bracket
Found
"||" :>: (toScheme (tBool `fn` tBool `fn` tBool))
Perhaps
"||" :>: toScheme (tBool `fn` tBool `fn` tBool)
./hs/src/HelVM/HelPS/BLC/Type.hs:616:2: Suggestion: Redundant bracket
Found
"ord" :>: (toScheme (tChar `fn` tInt))
Perhaps
"ord" :>: toScheme (tChar `fn` tInt)
./hs/src/HelVM/HelPS/BLC/Type.hs:617:2: Suggestion: Redundant bracket
Found
"chr" :>: (toScheme (tInt `fn` tChar))
Perhaps
"chr" :>: toScheme (tInt `fn` tChar)
./hs/src/HelVM/HelPS/BLC/Type.hs:618:2: Suggestion: Redundant bracket
Found
"++" :>: (quantifyAll' (list a `fn` list a `fn` list a))
Perhaps
"++" :>: quantifyAll' (list a `fn` list a `fn` list a)
./hs/src/HelVM/HelPS/BLC/Type.hs:619:2: Suggestion: Redundant bracket
Found
"." :>: (quantifyAll' ((b `fn` c) `fn` (a `fn` b) `fn` a `fn` c))
Perhaps
"." :>: quantifyAll' ((b `fn` c) `fn` (a `fn` b) `fn` a `fn` c)
./hs/src/HelVM/HelPS/BLC/Type.hs:620:2: Suggestion: Redundant bracket
Found
"error" :>: (quantifyAll' (list tChar `fn` a))
Perhaps
"error" :>: quantifyAll' (list tChar `fn` a)
./hs/src/HelVM/HelPS/BLC/Type.hs:621:2: Suggestion: Redundant bracket
Found
"hGetContents" :>: (toScheme (tInt `fn` list tChar))
Perhaps
"hGetContents" :>: toScheme (tInt `fn` list tChar)
./hs/src/HelVM/HelPS/BLC/Type.hs:622:2: Suggestion: Redundant bracket
Found
"IF" :>: (quantifyAll' (tBool `fn` a `fn` a `fn` a))
Perhaps
"IF" :>: quantifyAll' (tBool `fn` a `fn` a `fn` a)
./hs/src/HelVM/HelPS/BLC/Type.hs:623:2: Suggestion: Redundant bracket
Found
"SEL" :>: (quantifyAll' (a `fn` b))
Perhaps
"SEL" :>: quantifyAll' (a `fn` b)
./hs/src/HelVM/HelPS/BLC/Type.hs:631:9: Suggestion: Redundant bracket
Found
"==" :>: (quantifyAll ([IsIn "Eq" a] :=> (a `fn` a `fn` tBool)))
Perhaps
"==" :>: quantifyAll ([IsIn "Eq" a] :=> (a `fn` a `fn` tBool))
./hs/src/HelVM/HelPS/BLC/Type.hs:632:9: Suggestion: Redundant bracket
Found
"/=" :>: (quantifyAll ([IsIn "Eq" a] :=> (a `fn` a `fn` tBool)))
Perhaps
"/=" :>: quantifyAll ([IsIn "Eq" a] :=> (a `fn` a `fn` tBool))