All hints

All files

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

BotHugo183.hs:36:1: Warning: Eta reduce
Found
apontaPeca p o pos = ladoPonto (metaOri p o) pos
Why not
apontaPeca p o = ladoPonto (metaOri p o)
BotHugo183.hs:65:79: Warning: Redundant bracket
Found
(caganco)
Why not
caganco
BotHugo183.hs:65:111: Suggestion: Redundant bracket
Found
(turbina p) quieto
Why not
turbina p quieto
BotHugo183.hs:77:24: Suggestion: Redundant $
Found
take rodatuning $ proximas
Why not
take rodatuning proximas
BotHugo183.hs:78:30: Suggestion: Redundant $
Found
take rodatuning $ proximas
Why not
take rodatuning proximas
BotHugo183.hs:93:203: Suggestion: Redundant bracket
Found
(fwd . roda)
Why not
fwd . roda
BotHugo183.hs:95:5: Suggestion: Reduce duplication
Found
props = pista jogo
carro = getCarro p jogo
dir = normalizaAngulo $ direcao carro
Why not
Combine with BotHugo183.hs:119:5
BotHugo183.hs:101:5: Warning: Redundant bracket
Found
(angE)
Why not
angE
BotHugo183.hs:101:14: Suggestion: Redundant bracket
Found
if angA >= 180 then (angA - 180) else (angA)
Why not
if angA >= 180 then angA - 180 else (angA)
BotHugo183.hs:101:50: Warning: Redundant bracket
Found
(angA)
Why not
angA
BotHugo183.hs:102:6: Warning: Use fromMaybe
Found
maybe id id
Why not
fromMaybe id
BotHugo183.hs:111:11: Suggestion: Redundant bracket
Found
if
  (normalizaAngulo (angA - dir') `menorAngulo` normalizaAngulo sens)
  then go else id
Why not
if normalizaAngulo (angA - dir') `menorAngulo` normalizaAngulo sens
  then go else id
BotHugo183.hs:115:197: Suggestion: Redundant bracket
Found
(go . roda)
Why not
go . roda
BotHugo183.hs:129:6: Warning: Use fromMaybe
Found
maybe id id
Why not
fromMaybe id
BotHugo183.hs:175:5: Warning: Used otherwise as a pattern
Found
otherwise
Why not
_
BotHugo183.hs:207:47: Suggestion: Use <$>
Found
fmap (getCarro p) $ colideT4 doAtualiza Nothing jogo tempo tick p
Why not
getCarro p Control.Applicative.<$>
  colideT4 doAtualiza Nothing jogo tempo tick p
BotHugo183.hs:212:17: Warning: Use fromMaybe
Found
maybe (getScore jogo p) id
Why not
fromMaybe (getScore jogo p)
BotHugo183.hs:230:53: Suggestion: Redundant bracket
Found
fmap (posicao) (colideT4Batota doAtualiza jogo tempo tick p)
  `mbcmp` (Just (tgt))
Why not
fmap (posicao) (colideT4Batota doAtualiza jogo tempo tick p)
  `mbcmp` Just (tgt)
BotHugo183.hs:230:58: Warning: Redundant bracket
Found
(posicao)
Why not
posicao
BotHugo183.hs:230:128: Warning: Redundant bracket
Found
(tgt)
Why not
tgt
BotHugo183.hs:285:41: Suggestion: Use section
Found
(flip ladoPonto tgt)
Why not
(`ladoPonto` tgt)
BotHugo183.hs:285:72: Suggestion: Redundant bracket
Found
if (k_atrito props < 1 && la == 0) then cantosCurva peca tgt else
  []
Why not
if k_atrito props < 1 && la == 0 then cantosCurva peca tgt else []
BotHugo183.hs:287:36: Warning: Redundant bracket
Found
((Double, Double))
Why not
(Double, Double)
BotHugo183.hs:289:26: Warning: Redundant bracket
Found
((Double, Double))
Why not
(Double, Double)
BotHugo183.hs:304:1: Suggestion: Use guards
Found
maisCurto (_, a1) (_, a2)
  = if a1 `menorAngulo` a2 then LT else if a1 == a2 then EQ else GT
Why not
maisCurto (_, a1) (_, a2)
  | a1 `menorAngulo` a2 = LT
  | a1 == a2 = EQ
  | otherwise = GT
BotHugo183.hs:326:73: Suggestion: Redundant bracket
Found
(pontoToPosicao pos) : hist
Why not
pontoToPosicao pos : hist
BotHugo183.hs:352:17: Suggestion: Use fromMaybe
Found
case Map.lookup x m of
    Just ps -> ps
    Nothing -> (0, lookupPosicaoPecas x (ori : oripecas))
Why not
fromMaybe (0, lookupPosicaoPecas x (ori : oripecas))
  (Map.lookup x m)
BotHugo183.hs:388:1: Suggestion: Use camelCase
Found
roda_esq a = ...
Why not
rodaEsq a = ...
BotHugo183.hs:389:1: Suggestion: Use camelCase
Found
roda_dir a = ...
Why not
rodaDir a = ...
OracleT1.hs:50:5: Warning: Eta reduce
Found
docPrec i x = doc x
Why not
docPrec i = doc
OracleT1.hs:54:5: Warning: Eta reduce
Found
docPrec i x = doc x
Why not
docPrec i = doc
OracleT1.hs:58:5: Warning: Eta reduce
Found
docPrec i x = doc x
Why not
docPrec i = doc
OracleT1.hs:62:5: Warning: Eta reduce
Found
docPrec i x = doc x
Why not
docPrec i = doc
OracleT1.hs:66:5: Warning: Eta reduce
Found
docPrec i x = doc x
Why not
docPrec i = doc
OracleT1.hs:77:5: Warning: Eta reduce
Found
docPrec i x = doc x
Why not
docPrec i = doc
OracleT1.hs:81:5: Warning: Eta reduce
Found
docPrec i x = doc x
Why not
docPrec i = doc
OracleT1.hs:85:5: Warning: Eta reduce
Found
docPrec i x = doc x
Why not
docPrec i = doc
OracleT1.hs:96:5: Warning: Eta reduce
Found
docPrec i x = doc x
Why not
docPrec i = doc
OracleT1.hs:106:5: Warning: Eta reduce
Found
docPrec i x = doc x
Why not
docPrec i = doc
OracleT1.hs:110:5: Warning: Eta reduce
Found
docPrec i x = doc x
Why not
docPrec i = doc
OracleT1.hs:112:18: Suggestion: Redundant $
Found
text $ []
Why not
text []
OracleT1.hs:114:41: Suggestion: Redundant bracket
Found
(concatMap ((", " ++) . show) t) ++ "]"
Why not
concatMap ((", " ++) . show) t ++ "]"
OracleT1.hs:122:1: Warning: Eta reduce
Found
printTab tab = concatMap ((++ "\n") . concatMap printPeca) tab
Why not
printTab = concatMap ((++ "\n") . concatMap printPeca)
OracleT1.hs:180:16: Suggestion: Redundant bracket
Found
(blocoRampa s d) (min a a')
Why not
blocoRampa s d (min a a')
OracleT1.hs:183:21: Suggestion: Redundant bracket
Found
(take y m) ++ [l] ++ (drop (y + 1) m)
Why not
take y m ++ [l] ++ (drop (y + 1) m)
OracleT1.hs:183:35: Suggestion: Redundant bracket
Found
[l] ++ (drop (y + 1) m)
Why not
[l] ++ drop (y + 1) m
OracleT1.hs:184:15: Suggestion: Redundant bracket
Found
(take x (atNote "replace1" m y)) ++
  [e] ++ (drop (x + 1) (atNote "replace2" m y))
Why not
take x (atNote "replace1" m y) ++
  [e] ++ (drop (x + 1) (atNote "replace2" m y))
OracleT1.hs:184:51: Suggestion: Redundant bracket
Found
[e] ++ (drop (x + 1) (atNote "replace2" m y))
Why not
[e] ++ drop (x + 1) (atNote "replace2" m y)
OracleT1.hs:222:1: Warning: Eta reduce
Found
atNote2 str xys x y = atNote str (atNote str xys x) y
Why not
atNote2 str xys x = atNote str (atNote str xys x)
OracleT1.hs:267:1: Warning: Eta reduce
Found
paredesPeca (Peca t _) p = paredesPeca' t p
Why not
paredesPeca (Peca t _) = paredesPeca' t
OracleT1.hs:294:42: Suggestion: Use section
Found
(flip distanceLinhaPonto pnt)
Why not
(`distanceLinhaPonto` pnt)
OracleT1.hs:297:1: Warning: Eta reduce
Found
pecaSaida (Peca t _) o = pecaS t o
Why not
pecaSaida (Peca t _) = pecaS t
OracleT1.hs:312:1: Warning: Eta reduce
Found
metaOri (Peca t _) o = meta' t o
Why not
metaOri (Peca t _) = meta' t
OracleT1.hs:330:28: Warning: Redundant bracket
Found
(i)
Why not
i
OracleT1.hs:330:45: Warning: Redundant bracket
Found
(i)
Why not
i
OracleT2.hs:36:5: Suggestion: Reduce duplication
Found
x <- choose (0, maxx - 1)
y <- choose (0, maxy - 1)
return (x, y)
Why not
Combine with OracleT2.hs:45:5
OracleT2.hs:71:25: Suggestion: Use null
Found
c == []
Why not
null c
OracleT2.hs:72:54: Suggestion: Redundant bracket
Found
(daVolta c) && (naoDesperdica c t) && (sequencial c a)
Why not
daVolta c && (naoDesperdica c t) && (sequencial c a)
OracleT2.hs:72:69: Suggestion: Redundant bracket
Found
(naoDesperdica c t) && (sequencial c a)
Why not
naoDesperdica c t && (sequencial c a)
OracleT2.hs:72:69: Suggestion: Redundant bracket
Found
(naoDesperdica c t) && (sequencial c a)
Why not
(naoDesperdica c t) && sequencial c a
OracleT2.hs:75:13: Suggestion: Redundant bracket
Found
if t0 == Rampa (roda (roda d True) True) then (x + 1) else x
Why not
if t0 == Rampa (roda (roda d True) True) then x + 1 else x
OracleT2.hs:93:25: Warning: Use isNothing
Found
d' == Nothing
Why not
isNothing d'
OracleT2.hs:113:13: Suggestion: Redundant bracket
Found
(head p) == (last p)
Why not
head p == (last p)
OracleT2.hs:113:13: Suggestion: Redundant bracket
Found
(head p) == (last p)
Why not
(head p) == last p
OracleT2.hs:132:30: Suggestion: Redundant bracket
Found
o == (roda c False)
Why not
o == roda c False
OracleT3.hs:56:42: Suggestion: Redundant bracket
Found
(distancia (posicao x) (posicao y) distance) * 100
Why not
distancia (posicao x) (posicao y) distance * 100
OracleT3.hs:57:16: Suggestion: Redundant bracket
Found
(normAngulo (abs (direcao x - direcao y))) / 360
Why not
normAngulo (abs (direcao x - direcao y)) / 360
OracleT3.hs:58:42: Suggestion: Redundant bracket
Found
(distancia (velocidade x) (velocidade y) distance) * 100
Why not
distancia (velocidade x) (velocidade y) distance * 100
OracleT3.hs:67:25: Suggestion: Move brackets to avoid $
Found
validaPonto (posicao carro) tab &&
  (not $ derrete tab (posicao carro))
Why not
validaPonto (posicao carro) tab &&
  not (derrete tab (posicao carro))
OracleT3.hs:74:15: Suggestion: Redundant bracket
Found
(atNote "derrete" (atNote "derrete" t j) i)
Why not
atNote "derrete" (atNote "derrete" t j) i
OracleT3.hs:86:16: Suggestion: Redundant bracket
Found
case (colideLocal m v (a, b) i) of
    Nothing -> Nothing
    Just (p', v') -> Just $ c{posicao = p', velocidade = v'}
Why not
case colideLocal m v (a, b) i of
    Nothing -> Nothing
    Just (p', v') -> Just $ c{posicao = p', velocidade = v'}
OracleT3.hs:95:44: Suggestion: Redundant bracket
Found
(arrowToComponents (d, a1)) .+. (-x, -y)
Why not
arrowToComponents (d, a1) .+. (-x, -y)
OracleT3.hs:97:19: Suggestion: Redundant bracket
Found
dp .*. (arrowToComponents (1, a2))
Why not
dp .*. arrowToComponents (1, a2)
OracleT3.hs:122:90: Warning: Redundant bracket
Found
("colide12")
Why not
"colide12"
OracleT3.hs:167:21: Warning: Use mapMaybe
Found
catMaybes .
  map
    (\ (a, b) ->
       if (isJust a) then Just (fromJustNote "atravessa" a, b) else
         Nothing)
Why not
mapMaybe
  (\ (a, b) ->
     if (isJust a) then Just (fromJustNote "atravessa" a, b) else
       Nothing)
OracleT3.hs:167:48: Suggestion: Redundant bracket
Found
if (isJust a) then Just (fromJustNote "atravessa" a, b) else
  Nothing
Why not
if isJust a then Just (fromJustNote "atravessa" a, b) else Nothing
OracleT3.hs:189:40: Suggestion: Move brackets to avoid $
Found
(round $ 180 + snd c) `mod` 360
Why not
round (180 + snd c) `mod` 360
OracleT3.hs:190:41: Suggestion: Redundant bracket
Found
t0 == (Rampa (toEnum (((fromEnum x) + 2) `mod` 4)))
Why not
t0 == Rampa (toEnum (((fromEnum x) + 2) `mod` 4))
OracleT3.hs:190:64: Suggestion: Redundant bracket
Found
(fromEnum x) + 2
Why not
fromEnum x + 2
OracleT3.hs:190:96: Suggestion: Move brackets to avoid $
Found
(abs $ aa - aa') == 1
Why not
abs (aa - aa') == 1
OracleT3.hs:191:28: Warning: Used otherwise as a pattern
Found
otherwise
Why not
_
OracleT3.hs:271:17: Suggestion: Redundant bracket
Found
((x * a), (x * b))
Why not
(x * a, (x * b))
OracleT3.hs:271:17: Suggestion: Redundant bracket
Found
((x * a), (x * b))
Why not
((x * a), x * b)
OracleT3.hs:274:21: Suggestion: Redundant bracket
Found
((x + a), (y + b))
Why not
(x + a, (y + b))
OracleT3.hs:274:21: Suggestion: Redundant bracket
Found
((x + a), (y + b))
Why not
((x + a), y + b)
OracleT3.hs:277:21: Suggestion: Redundant bracket
Found
((x - a), (y - b))
Why not
(x - a, (y - b))
OracleT3.hs:277:21: Suggestion: Redundant bracket
Found
((x - a), (y - b))
Why not
((x - a), y - b)
OracleT3.hs:290:40: Warning: Redundant bracket
Found
(th)
Why not
th
OracleT3.hs:308:17: Suggestion: Redundant bracket
Found
(abs x) ^ 2
Why not
abs x ^ 2
OracleT3.hs:308:29: Suggestion: Redundant bracket
Found
(abs y) ^ 2
Why not
abs y ^ 2
OracleT3.hs:334:132: Warning: Redundant bracket
Found
(Recta)
Why not
Recta
OracleT4.hs:1:1: Warning: Unused LANGUAGE pragma
Found
{-# LANGUAGE PatternGuards #-}
Why not remove it.


OracleT4.hs:36:60: Suggestion: Use uncurry
Found
\ (x, y) -> comparaCarro delta x y
Why not
uncurry (comparaCarro delta)
Note: increases laziness
OracleT4.hs:50:61: Suggestion: Use uncurry
Found
\ (x, y) -> comparaDouble delta x y
Why not
uncurry (comparaDouble delta)
Note: increases laziness
OracleT4.hs:67:11: Suggestion: Redundant bracket
Found
(take p (carros j)) ++ (c' : drop (p + 1) (carros j))
Why not
take p (carros j) ++ (c' : drop (p + 1) (carros j))
OracleT4.hs:72:20: Suggestion: Redundant bracket
Found
(mapa e)
Why not
mapa e
OracleT4.hs:75:15: Suggestion: Redundant bracket
Found
(take j (carros e)) ++ (c' : drop (j + 1) (carros e))
Why not
take j (carros e) ++ (c' : drop (j + 1) (carros e))
OracleT4.hs:76:15: Suggestion: Redundant bracket
Found
(take j (historico e)) ++ (h' : drop (j + 1) (historico e))
Why not
take j (historico e) ++ (h' : drop (j + 1) (historico e))
OracleT4.hs:87:27: Suggestion: Use ***
Found
(floor (fst (posicao c)), floor (snd (posicao c)))
Why not
(floor Control.Arrow.*** floor) (posicao c)
OracleT4.hs:89:17: Suggestion: Use ***
Found
(floor (fst (posicao c)), floor (snd (posicao c)))
Why not
(floor Control.Arrow.*** floor) (posicao c)
OracleT4.hs:90:28: Suggestion: Redundant bracket
Found
(h : hs)
Why not
h : hs
OracleT4.hs:95:48: Suggestion: Redundant bracket
Found
(nitros e) !! i
Why not
nitros e !! i
OracleT4.hs:97:32: Suggestion: Redundant bracket
Found
(nitros e) !! i
Why not
nitros e !! i
OracleT4.hs:98:15: Suggestion: Redundant bracket
Found
(take i (nitros e)) ++ (n' : drop (i + 1) (nitros e))
Why not
take i (nitros e) ++ (n' : drop (i + 1) (nitros e))
OracleT4.hs:99:15: Suggestion: Redundant bracket
Found
(take j (carros e)) ++ (c' : drop (j + 1) (carros e))
Why not
take j (carros e) ++ (c' : drop (j + 1) (carros e))
OracleT4.hs:100:22: Suggestion: Redundant bracket
Found
(nitros e) !! i
Why not
nitros e !! i
OracleT4.hs:101:13: Suggestion: Redundant bracket
Found
(carros e) !! j
Why not
carros e !! j
OracleT4.hs:102:14: Suggestion: Redundant bracket
Found
(carros e0) !! j
Why not
carros e0 !! j
OracleT4.hs:103:31: Suggestion: Redundant bracket
Found
(velocidade c) .+. (tNitro .*. (nitroVec (pista e) c0))
Why not
velocidade c .+. (tNitro .*. (nitroVec (pista e) c0))
OracleT4.hs:103:51: Suggestion: Redundant bracket
Found
tNitro .*. (nitroVec (pista e) c0)
Why not
tNitro .*. nitroVec (pista e) c0
OracleT4.hs:107:14: Suggestion: Redundant bracket
Found
(velocidade c) .+.
  (t .*.
     ((accelVec ps (c, a)) .+. (dragVec ps c) .+. (driftVec ps c) .+.
        (gravityVec ps p c)))
Why not
velocidade c .+.
  (t .*.
     ((accelVec ps (c, a)) .+. (dragVec ps c) .+. (driftVec ps c) .+.
        (gravityVec ps p c)))
OracleT4.hs:107:41: Suggestion: Redundant bracket
Found
(accelVec ps (c, a)) .+. (dragVec ps c)
Why not
accelVec ps (c, a) .+. (dragVec ps c)
OracleT4.hs:107:41: Suggestion: Redundant bracket
Found
(accelVec ps (c, a)) .+. (dragVec ps c)
Why not
(accelVec ps (c, a)) .+. dragVec ps c
OracleT4.hs:107:41: Suggestion: Redundant bracket
Found
(accelVec ps (c, a)) .+. (dragVec ps c) .+. (driftVec ps c)
Why not
(accelVec ps (c, a)) .+. (dragVec ps c) .+. driftVec ps c
OracleT4.hs:107:41: Suggestion: Redundant bracket
Found
(accelVec ps (c, a)) .+. (dragVec ps c) .+. (driftVec ps c) .+.
  (gravityVec ps p c)
Why not
(accelVec ps (c, a)) .+. (dragVec ps c) .+. (driftVec ps c) .+.
  gravityVec ps p c
OracleT4.hs:110:17: Suggestion: Use ***
Found
(floor (fst (posicao c)), floor (snd (posicao c)))
Why not
(floor Control.Arrow.*** floor) (posicao c)
OracleT4.hs:126:25: Suggestion: Redundant bracket
Found
(sin (radians (a - d))) > 0
Why not
sin (radians (a - d)) > 0
OracleT5.hs:1:1: Warning: Unused LANGUAGE pragma
Found
{-# LANGUAGE PatternGuards #-}
Why not remove it.


OracleT5.hs:68:70: Suggestion: Redundant bracket
Found
[(fst p)]
Why not
[fst p]
OracleT5.hs:76:26: Suggestion: Redundant bracket
Found
(t !! b !! a)
Why not
t !! b !! a
OracleT5.hs:93:25: Warning: Use isNothing
Found
c == Nothing
Why not
isNothing c
OracleT5.hs:115:36: Suggestion: Redundant bracket
Found
toEnum x * (tamBloco e)
Why not
toEnum x * tamBloco e
OracleT5.hs:115:62: Suggestion: Redundant bracket
Found
toEnum y * (tamBloco e)
Why not
toEnum y * tamBloco e
OracleT5.hs:116:36: Suggestion: Redundant bracket
Found
toEnum x * (tamBloco e)
Why not
toEnum x * tamBloco e
OracleT5.hs:116:62: Suggestion: Redundant bracket
Found
toEnum y * (tamBloco e)
Why not
toEnum y * tamBloco e
OracleT5.hs:121:39: Suggestion: Redundant bracket
Found
((toEnum i * tamBloco e), -(toEnum j * tamBloco e))
Why not
(toEnum i * tamBloco e, -(toEnum j * tamBloco e))
OracleT5.hs:122:39: Suggestion: Redundant bracket
Found
((toEnum i * tamBloco e), (-(toEnum j * tamBloco e)) - tamBloco e)
Why not
(toEnum i * tamBloco e, (-(toEnum j * tamBloco e)) - tamBloco e)
OracleT5.hs:123:16: Suggestion: Redundant bracket
Found
(length (head m))
Why not
length (head m)
OracleT5.hs:124:16: Suggestion: Redundant bracket
Found
(length m)
Why not
length m
OracleT5.hs:142:15: Warning: Evaluate
Found
(toEnum a) * 1
Why not
(toEnum a)
OracleT5.hs:142:15: Suggestion: Redundant bracket
Found
(toEnum a) * 1
Why not
toEnum a * 1
OracleT5.hs:143:18: Suggestion: Move brackets to avoid $
Found
0.2 * (double2Float $ k_atrito p)
Why not
0.2 * double2Float (k_atrito p)
OracleT5.hs:144:23: Suggestion: Move brackets to avoid $
Found
3 - (double2Float $ k_atrito p)
Why not
3 - double2Float (k_atrito p)
OracleT5.hs:145:23: Suggestion: Move brackets to avoid $
Found
2 - (double2Float $ k_atrito p)
Why not
2 - double2Float (k_atrito p)
OracleT5.hs:147:15: Warning: Evaluate
Found
abs (toEnum a) * 1
Why not
abs (toEnum a)
OracleT5.hs:148:16: Suggestion: Move brackets to avoid $
Found
(double2Float $ k_atrito p) * 0.5
Why not
double2Float (k_atrito p) * 0.5
OracleT5.hs:149:17: Suggestion: Move brackets to avoid $
Found
3 - (double2Float $ k_atrito p)
Why not
3 - double2Float (k_atrito p)
OracleT5.hs:150:16: Suggestion: Redundant bracket
Found
(2 - (double2Float $ k_atrito p))
Why not
2 - (double2Float $ k_atrito p)
OracleT5.hs:150:17: Suggestion: Move brackets to avoid $
Found
2 - (double2Float $ k_atrito p)
Why not
2 - double2Float (k_atrito p)
OracleT5.hs:163:33: Suggestion: Move brackets to avoid $
Found
(Translate x y $ glossBloco e c) :
  glossMapa e (x + tamBloco e, y) (cs : ls)
Why not
Translate x y (glossBloco e c) :
  glossMapa e (x + tamBloco e, y) (cs : ls)
OracleT5.hs:169:28: Suggestion: Redundant bracket
Found
"c" ++ (show (i + 1))
Why not
"c" ++ show (i + 1)
OracleT5.hs:173:16: Suggestion: Redundant bracket
Found
m !! (floor y)
Why not
m !! floor y
OracleT5.hs:173:16: Suggestion: Redundant bracket
Found
m !! (floor y) !! (floor x)
Why not
m !! (floor y) !! floor x
OracleT5.hs:176:20: Suggestion: Redundant bracket
Found
(nitros (jogo s)) !! i
Why not
nitros (jogo s) !! i
OracleT5.hs:177:20: Suggestion: Redundant bracket
Found
(nitros (jogo s)) !! i
Why not
nitros (jogo s) !! i
OracleT5.hs:193:20: Suggestion: Redundant bracket
Found
(digitToInt n) `elem` [1 .. 4]
Why not
digitToInt n `elem` [1 .. 4]
OracleT5.hs:193:88: Suggestion: Redundant bracket
Found
(digitToInt n) - 1
Why not
digitToInt n - 1
OracleT5.hs:194:20: Suggestion: Redundant bracket
Found
(digitToInt n) `elem` [5 .. 8]
Why not
digitToInt n `elem` [5 .. 8]
OracleT5.hs:194:88: Suggestion: Redundant bracket
Found
(digitToInt n) - 5
Why not
digitToInt n - 5
OracleT5.hs:197:20: Suggestion: Redundant bracket
Found
(digitToInt n) `elem` [1 .. 4]
Why not
digitToInt n `elem` [1 .. 4]
OracleT5.hs:198:20: Suggestion: Redundant bracket
Found
(digitToInt n) `elem` [5 .. 8]
Why not
digitToInt n `elem` [5 .. 8]
OracleT5.hs:210:15: Warning: Evaluate
Found
percorre [] tab (fst p0) (snd p0)
Why not
uncurry (percorre [] tab) p0
OracleT5.hs:212:35: Suggestion: Redundant bracket
Found
(voltas m) !! n
Why not
voltas m !! n
OracleT5.hs:212:62: Suggestion: Redundant bracket
Found
(voltas m) !! n
Why not
voltas m !! n
OracleT5.hs:215:79: Suggestion: Redundant bracket
Found
(voltas m) !! n
Why not
voltas m !! n
OracleT5.hs:222:17: Suggestion: Redundant bracket
Found
(zipWith (\ a b -> (max a b) - t) (batotas m) btts)
Why not
zipWith (\ a b -> (max a b) - t) (batotas m) btts
OracleT5.hs:222:35: Suggestion: Redundant bracket
Found
(max a b) - t
Why not
max a b - t
OracleT5.hs:223:17: Suggestion: Redundant bracket
Found
(zipWith (\ a b -> (max a b) - t) (mortes m) mrts)
Why not
zipWith (\ a b -> (max a b) - t) (mortes m) mrts
OracleT5.hs:223:35: Suggestion: Redundant bracket
Found
(max a b) - t
Why not
max a b - t
OracleT5.hs:229:49: Suggestion: Redundant bracket
Found
(historico j) !! n
Why not
historico j !! n
OracleT5.hs:231:15: Warning: Evaluate
Found
percorre [] tab (fst p0) (snd p0)
Why not
uncurry (percorre [] tab) p0
OracleT5.hs:235:60: Suggestion: Use zipWith
Found
map f (zip [0 ..] (nitros (jogo e)))
Why not
zipWith (curry f) [0 ..] (nitros (jogo e))
OracleT5.hs:236:40: Suggestion: Redundant bracket
Found
(fromIntegral i) * 53
Why not
fromIntegral i * 53
OracleT5.hs:237:52: Suggestion: Redundant bracket
Found
"p" ++ (show (i + 1))
Why not
"p" ++ show (i + 1)
OracleT5.hs:240:42: Suggestion: Redundant bracket
Found
if (batotas e !! i > 0) then getImage "btt" e else Blank
Why not
if batotas e !! i > 0 then getImage "btt" e else Blank
OracleT5.hs:241:42: Suggestion: Redundant bracket
Found
if (mortes e !! i > 0) then getImage "mrt" e else Blank
Why not
if mortes e !! i > 0 then getImage "mrt" e else Blank
OracleT5.hs:250:12: Suggestion: Redundant bracket
Found
do Just lava <- loadJuicy "lava.jpg"
   Just nitro1 <- loadJuicy "nitro1.png"
   Just nitro2 <- loadJuicy "nitro2.png"
   Just nitro3 <- loadJuicy "nitro3.png"
   Just nitro4 <- loadJuicy "nitro4.png"
   Just puff <- loadJuicy "puff.png"
   Just bar1 <- loadJuicy "bar1.png"
   Just bar2 <- loadJuicy "bar2.png"
   Just bar3 <- loadJuicy "bar3.png"
   Just bar4 <- loadJuicy "bar4.png"
   Just p1 <- loadJuicy "p1.png"
   Just p2 <- loadJuicy "p2.png"
   Just p3 <- loadJuicy "p3.png"
   Just p4 <- loadJuicy "p4.png"
   Just c1 <- loadJuicy "c1.png"
   Just c2 <- loadJuicy "c2.png"
   Just c3 <- loadJuicy "c3.png"
   Just c4 <- loadJuicy "c4.png"
   Just n1 <- loadJuicy "1.png"
   Just n2 <- loadJuicy "2.png"
   Just n3 <- loadJuicy "3.png"
   Just n4 <- loadJuicy "4.png"
   Just btt <- loadJuicy "btt.png"
   Just mrt <- loadJuicy "mrt.png"
   Just timer <- loadJuicy "timer.png"
   let e = (estadoInicial prp ini tamanho imgs)
       imgs
         = [("lava",
             Translate (tamBloco e / 2) (-tamBloco e / 2) $ Scale s s lava),
            ("nitro1", nitro1), ("nitro2", nitro2), ("nitro3", nitro3),
            ("nitro4", nitro4), ("puff", puff),
            ("bar1", Scale (2.5 * s) (2 * s) bar1),
            ("bar2", Scale (2.5 * s) (2 * s) bar2),
            ("bar3", Scale (2.5 * s) (2 * s) bar3),
            ("bar4", Scale (2.5 * s) (2 * s) bar4),
            ("timer", Translate 14 14 $ timer), ("1", Translate 10 15 n1),
            ("2", Translate 10 15 n2), ("3", Translate 10 15 n3),
            ("4", Translate 10 15 n4),
            ("btt", Translate 14 14 $ Scale (2 * s) (2 * s) btt),
            ("mrt", Translate 14 14 $ Scale (2 * s) (2 * s) mrt),
            ("p1", Translate 14 14 $ Scale (2 * s) (2 * s) p1),
            ("p2", Translate 14 14 $ Scale (2 * s) (2 * s) p2),
            ("p3", Translate 14 14 $ Scale (2 * s) (2 * s) p3),
            ("p4", Translate 14 14 $ Scale (2 * s) (2 * s) p4),
            ("c1", Rotate 90 $ Scale (4 * s) (4 * s) c1),
            ("c2", Rotate 90 $ Scale (4 * s) (4 * s) c2),
            ("c3", Rotate 90 $ Scale (4 * s) (4 * s) c3),
            ("c4", Rotate 90 $ Scale (4 * s) (4 * s) c4)]
       m@(Mapa (p, _) tb) = mapa (jogo e)
   play screen back 20 e glossDesenha glossEvento glossTempo
Why not
do Just lava <- loadJuicy "lava.jpg"
   Just nitro1 <- loadJuicy "nitro1.png"
   Just nitro2 <- loadJuicy "nitro2.png"
   Just nitro3 <- loadJuicy "nitro3.png"
   Just nitro4 <- loadJuicy "nitro4.png"
   Just puff <- loadJuicy "puff.png"
   Just bar1 <- loadJuicy "bar1.png"
   Just bar2 <- loadJuicy "bar2.png"
   Just bar3 <- loadJuicy "bar3.png"
   Just bar4 <- loadJuicy "bar4.png"
   Just p1 <- loadJuicy "p1.png"
   Just p2 <- loadJuicy "p2.png"
   Just p3 <- loadJuicy "p3.png"
   Just p4 <- loadJuicy "p4.png"
   Just c1 <- loadJuicy "c1.png"
   Just c2 <- loadJuicy "c2.png"
   Just c3 <- loadJuicy "c3.png"
   Just c4 <- loadJuicy "c4.png"
   Just n1 <- loadJuicy "1.png"
   Just n2 <- loadJuicy "2.png"
   Just n3 <- loadJuicy "3.png"
   Just n4 <- loadJuicy "4.png"
   Just btt <- loadJuicy "btt.png"
   Just mrt <- loadJuicy "mrt.png"
   Just timer <- loadJuicy "timer.png"
   let e = estadoInicial prp ini tamanho imgs
       imgs
         = [("lava",
             Translate (tamBloco e / 2) (-tamBloco e / 2) $ Scale s s lava),
            ("nitro1", nitro1), ("nitro2", nitro2), ("nitro3", nitro3),
            ("nitro4", nitro4), ("puff", puff),
            ("bar1", Scale (2.5 * s) (2 * s) bar1),
            ("bar2", Scale (2.5 * s) (2 * s) bar2),
            ("bar3", Scale (2.5 * s) (2 * s) bar3),
            ("bar4", Scale (2.5 * s) (2 * s) bar4),
            ("timer", Translate 14 14 $ timer), ("1", Translate 10 15 n1),
            ("2", Translate 10 15 n2), ("3", Translate 10 15 n3),
            ("4", Translate 10 15 n4),
            ("btt", Translate 14 14 $ Scale (2 * s) (2 * s) btt),
            ("mrt", Translate 14 14 $ Scale (2 * s) (2 * s) mrt),
            ("p1", Translate 14 14 $ Scale (2 * s) (2 * s) p1),
            ("p2", Translate 14 14 $ Scale (2 * s) (2 * s) p2),
            ("p3", Translate 14 14 $ Scale (2 * s) (2 * s) p3),
            ("p4", Translate 14 14 $ Scale (2 * s) (2 * s) p4),
            ("c1", Rotate 90 $ Scale (4 * s) (4 * s) c1),
            ("c2", Rotate 90 $ Scale (4 * s) (4 * s) c2),
            ("c3", Rotate 90 $ Scale (4 * s) (4 * s) c3),
            ("c4", Rotate 90 $ Scale (4 * s) (4 * s) c4)]
       m@(Mapa (p, _) tb) = mapa (jogo e)
   play screen back 20 e glossDesenha glossEvento glossTempo
OracleT5.hs:284:30: Suggestion: Redundant $
Found
Translate 14 14 $ timer
Why not
Translate 14 14 timer
OracleT5.hs:304:14: Suggestion: Redundant bracket
Found
(InWindow "MicroMachines" (screenx + 200, screeny) (0, 0))
Why not
InWindow "MicroMachines" (screenx + 200, screeny) (0, 0)
OracleT5.hs:308:23: Suggestion: Redundant bracket
Found
(realToFrac screenx) / (realToFrac x)
Why not
realToFrac screenx / (realToFrac x)
OracleT5.hs:308:23: Suggestion: Redundant bracket
Found
(realToFrac screenx) / (realToFrac x)
Why not
(realToFrac screenx) / realToFrac x
OracleT5.hs:309:23: Suggestion: Redundant bracket
Found
(realToFrac screeny) / (realToFrac y)
Why not
realToFrac screeny / (realToFrac y)
OracleT5.hs:309:23: Suggestion: Redundant bracket
Found
(realToFrac screeny) / (realToFrac y)
Why not
(realToFrac screeny) / realToFrac y
OracleT5.hs:333:23: Suggestion: Use head
Found
args !! 0
Why not
head args
OracleT5.hs:338:16: Warning: Use isNothing
Found
p' == Nothing
Why not
isNothing p'
OracleT5.hs:340:15: Suggestion: Redundant bracket
Found
(carros (jogo e) !! i)
Why not
carros (jogo e) !! i
OracleT5.hs:343:23: Suggestion: Redundant bracket
Found
(m !! pj !! pi)
Why not
m !! pj !! pi
OracleT5.hs:348:20: Suggestion: Use null
Found
length whereAmI' > 0
Why not
not (null whereAmI')
Note: increases laziness
Tarefa1_2017li1g183.hs:62:1: Suggestion: Use camelCase
Found
c_exOP = ...
Why not
cExOP = ...
Tarefa1_2017li1g183.hs:67:1: Suggestion: Use camelCase
Found
c_exDM = ...
Why not
cExDM = ...
Tarefa1_2017li1g183.hs:72:1: Suggestion: Use camelCase
Found
c_exOL = ...
Why not
cExOL = ...
Tarefa1_2017li1g183.hs:77:1: Suggestion: Use camelCase
Found
c_exHM = ...
Why not
cExHM = ...
Tarefa1_2017li1g183.hs:82:1: Suggestion: Use camelCase
Found
c_exR = ...
Why not
cExR = ...
Tarefa1_2017li1g183.hs:92:1: Suggestion: Use camelCase
Found
c_exE = ...
Why not
cExE = ...
Tarefa1_2017li1g183.hs:114:76: Warning: Redundant bracket
Found
(dir)
Why not
dir
Tarefa1_2017li1g183.hs:125:25: Suggestion: Redundant bracket
Found
l : (coloca p (x, y - 1) ls)
Why not
l : coloca p (x, y - 1) ls
Tarefa2_2017li1g183.hs:10:22: Suggestion: Redundant bracket
Found
(Peca (Curva Norte) 0) : _
Why not
Peca (Curva Norte) 0 : _
Tarefa3_2017li1g183.hs:16:30: Warning: Redundant do
Found
do suchThat genC (validaCarro tab)
Why not
suchThat genC (validaCarro tab)
Tarefa3_2017li1g183.hs:54:16: Suggestion: Redundant bracket
Found
(normAngulo (abs (direcao x - direcao y))) / 360
Why not
normAngulo (abs (direcao x - direcao y)) / 360
Tarefa3_2017li1g183.hs:63:25: Suggestion: Redundant bracket
Found
(not $ derrete tab (posicao carro))
Why not
not $ derrete tab (posicao carro)
Tarefa3_2017li1g183.hs:72:15: Suggestion: Redundant bracket
Found
(atNote "derrete" (atNote "derrete" t j) i)
Why not
atNote "derrete" (atNote "derrete" t j) i
Tarefa3_2017li1g183.hs:83:19: Suggestion: Redundant bracket
Found
case (colideLocal m v (a, b) i) of
    Nothing -> Nothing
    Just (p', v') -> Just $ c{posicao = p', velocidade = v'}
Why not
case colideLocal m v (a, b) i of
    Nothing -> Nothing
    Just (p', v') -> Just $ c{posicao = p', velocidade = v'}
Tarefa3_2017li1g183.hs:92:44: Suggestion: Redundant bracket
Found
(arrowToComponents (d, a1)) .+. (-x, -y)
Why not
arrowToComponents (d, a1) .+. (-x, -y)
Tarefa3_2017li1g183.hs:94:19: Suggestion: Redundant bracket
Found
dp .*. (arrowToComponents (1, a2))
Why not
dp .*. arrowToComponents (1, a2)
Tarefa3_2017li1g183.hs:164:21: Warning: Use mapMaybe
Found
catMaybes .
  map
    (\ (a, b) -> if (isJust a) then Just (fromJust a, b) else Nothing)
Why not
mapMaybe
  (\ (a, b) -> if (isJust a) then Just (fromJust a, b) else Nothing)
Tarefa3_2017li1g183.hs:164:48: Suggestion: Redundant bracket
Found
if (isJust a) then Just (fromJust a, b) else Nothing
Why not
if isJust a then Just (fromJust a, b) else Nothing
Tarefa3_2017li1g183.hs:185:41: Suggestion: Redundant bracket
Found
t0 == (Rampa (toEnum (((fromEnum x) + 2) `mod` 4)))
Why not
t0 == Rampa (toEnum (((fromEnum x) + 2) `mod` 4))
Tarefa3_2017li1g183.hs:185:64: Suggestion: Redundant bracket
Found
(fromEnum x) + 2
Why not
fromEnum x + 2
Tarefa3_2017li1g183.hs:185:96: Suggestion: Move brackets to avoid $
Found
(abs $ aa - aa') == 1
Why not
abs (aa - aa') == 1
Tarefa3_2017li1g183.hs:186:28: Warning: Used otherwise as a pattern
Found
otherwise
Why not
_
Tarefa3_2017li1g183.hs:254:17: Suggestion: Redundant bracket
Found
((x * a), (x * b))
Why not
(x * a, (x * b))
Tarefa3_2017li1g183.hs:254:17: Suggestion: Redundant bracket
Found
((x * a), (x * b))
Why not
((x * a), x * b)
Tarefa3_2017li1g183.hs:257:21: Suggestion: Redundant bracket
Found
((x + a), (y + b))
Why not
(x + a, (y + b))
Tarefa3_2017li1g183.hs:257:21: Suggestion: Redundant bracket
Found
((x + a), (y + b))
Why not
((x + a), y + b)
Tarefa3_2017li1g183.hs:260:21: Suggestion: Redundant bracket
Found
((x - a), (y - b))
Why not
(x - a, (y - b))
Tarefa3_2017li1g183.hs:260:21: Suggestion: Redundant bracket
Found
((x - a), (y - b))
Why not
((x - a), y - b)
Tarefa3_2017li1g183.hs:273:40: Warning: Redundant bracket
Found
(th)
Why not
th
Tarefa3_2017li1g183.hs:288:17: Suggestion: Redundant bracket
Found
(abs x) ^ 2
Why not
abs x ^ 2
Tarefa3_2017li1g183.hs:288:29: Suggestion: Redundant bracket
Found
(abs y) ^ 2
Why not
abs y ^ 2
Tarefa4_2017li1g183.hs:1:1: Warning: Unused LANGUAGE pragma
Found
{-# LANGUAGE PatternGuards #-}
Why not remove it.


Tarefa4_2017li1g183.hs:31:68: Suggestion: Redundant bracket
Found
[(fst p)]
Why not
[fst p]
Tarefa4_2017li1g183.hs:39:26: Suggestion: Redundant bracket
Found
(t !! b !! a)
Why not
t !! b !! a
Tarefa4_2017li1g183.hs:49:25: Warning: Redundant bracket
Found
(1.5)
Why not
1.5
Tarefa4_2017li1g183.hs:55:20: Suggestion: Redundant bracket
Found
(mapa e)
Why not
mapa e
Tarefa4_2017li1g183.hs:58:15: Suggestion: Redundant bracket
Found
(take j (carros e)) ++ (c' : drop (j + 1) (carros e))
Why not
take j (carros e) ++ (c' : drop (j + 1) (carros e))
Tarefa4_2017li1g183.hs:59:15: Suggestion: Redundant bracket
Found
(take j (historico e)) ++ (h' : drop (j + 1) (historico e))
Why not
take j (historico e) ++ (h' : drop (j + 1) (historico e))
Tarefa4_2017li1g183.hs:70:27: Suggestion: Use ***
Found
(floor (fst (posicao c)), floor (snd (posicao c)))
Why not
(floor Control.Arrow.*** floor) (posicao c)
Tarefa4_2017li1g183.hs:72:17: Suggestion: Use ***
Found
(floor (fst (posicao c)), floor (snd (posicao c)))
Why not
(floor Control.Arrow.*** floor) (posicao c)
Tarefa4_2017li1g183.hs:73:28: Suggestion: Redundant bracket
Found
(h : hs)
Why not
h : hs
Tarefa4_2017li1g183.hs:78:48: Suggestion: Redundant bracket
Found
(nitros e) !! i
Why not
nitros e !! i
Tarefa4_2017li1g183.hs:80:32: Suggestion: Redundant bracket
Found
(nitros e) !! i
Why not
nitros e !! i
Tarefa4_2017li1g183.hs:81:15: Suggestion: Redundant bracket
Found
(take i (nitros e)) ++ (n' : drop (i + 1) (nitros e))
Why not
take i (nitros e) ++ (n' : drop (i + 1) (nitros e))
Tarefa4_2017li1g183.hs:82:15: Suggestion: Redundant bracket
Found
(take j (carros e)) ++ (c' : drop (j + 1) (carros e))
Why not
take j (carros e) ++ (c' : drop (j + 1) (carros e))
Tarefa4_2017li1g183.hs:83:22: Suggestion: Redundant bracket
Found
(nitros e) !! i
Why not
nitros e !! i
Tarefa4_2017li1g183.hs:84:13: Suggestion: Redundant bracket
Found
(carros e) !! j
Why not
carros e !! j
Tarefa4_2017li1g183.hs:85:14: Suggestion: Redundant bracket
Found
(carros e0) !! j
Why not
carros e0 !! j
Tarefa4_2017li1g183.hs:86:31: Suggestion: Redundant bracket
Found
(velocidade c) .+. (tNitro .*. (nitroVec (pista e) c0))
Why not
velocidade c .+. (tNitro .*. (nitroVec (pista e) c0))
Tarefa4_2017li1g183.hs:86:51: Suggestion: Redundant bracket
Found
tNitro .*. (nitroVec (pista e) c0)
Why not
tNitro .*. nitroVec (pista e) c0
Tarefa4_2017li1g183.hs:90:14: Suggestion: Redundant bracket
Found
(velocidade c) .+.
  (t .*.
     ((accelVec ps (c, a)) .+. (dragVec ps c) .+. (driftVec ps c) .+.
        (gravityVec ps p c)))
Why not
velocidade c .+.
  (t .*.
     ((accelVec ps (c, a)) .+. (dragVec ps c) .+. (driftVec ps c) .+.
        (gravityVec ps p c)))
Tarefa4_2017li1g183.hs:90:41: Suggestion: Redundant bracket
Found
(accelVec ps (c, a)) .+. (dragVec ps c)
Why not
accelVec ps (c, a) .+. (dragVec ps c)
Tarefa4_2017li1g183.hs:90:41: Suggestion: Redundant bracket
Found
(accelVec ps (c, a)) .+. (dragVec ps c)
Why not
(accelVec ps (c, a)) .+. dragVec ps c
Tarefa4_2017li1g183.hs:90:41: Suggestion: Redundant bracket
Found
(accelVec ps (c, a)) .+. (dragVec ps c) .+. (driftVec ps c)
Why not
(accelVec ps (c, a)) .+. (dragVec ps c) .+. driftVec ps c
Tarefa4_2017li1g183.hs:90:41: Suggestion: Redundant bracket
Found
(accelVec ps (c, a)) .+. (dragVec ps c) .+. (driftVec ps c) .+.
  (gravityVec ps p c)
Why not
(accelVec ps (c, a)) .+. (dragVec ps c) .+. (driftVec ps c) .+.
  gravityVec ps p c
Tarefa4_2017li1g183.hs:93:17: Suggestion: Use ***
Found
(floor (fst (posicao c)), floor (snd (posicao c)))
Why not
(floor Control.Arrow.*** floor) (posicao c)
Tarefa4_2017li1g183.hs:109:25: Suggestion: Redundant bracket
Found
(sin (radians (a - d))) > 0
Why not
sin (radians (a - d)) > 0