Report generated by HLint v2.0.9 - a tool to suggest improvements to your Haskell code.
BotHugo183.hs:36:1: Warning: Eta reduce
Found
Found
apontaPeca p o pos = ladoPonto (metaOri p o) posWhy not
apontaPeca p o = ladoPonto (metaOri p o)
BotHugo183.hs:65:79: Warning: Redundant bracket
Found
Found
(caganco)Why not
caganco
BotHugo183.hs:65:111: Suggestion: Redundant bracket
Found
Found
(turbina p) quietoWhy not
turbina p quieto
BotHugo183.hs:77:24: Suggestion: Redundant $
Found
Found
take rodatuning $ proximasWhy not
take rodatuning proximas
BotHugo183.hs:78:30: Suggestion: Redundant $
Found
Found
take rodatuning $ proximasWhy not
take rodatuning proximas
BotHugo183.hs:93:203: Suggestion: Redundant bracket
Found
Found
(fwd . roda)Why not
fwd . roda
BotHugo183.hs:95:5: Suggestion: Reduce duplication
Found
Found
props = pista jogo carro = getCarro p jogo dir = normalizaAngulo $ direcao carroWhy not
Combine with BotHugo183.hs:119:5
BotHugo183.hs:101:5: Warning: Redundant bracket
Found
Found
(angE)Why not
angE
BotHugo183.hs:101:14: Suggestion: Redundant bracket
Found
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
Found
(angA)Why not
angA
BotHugo183.hs:102:6: Warning: Use fromMaybe
Found
Found
maybe id idWhy not
fromMaybe id
BotHugo183.hs:111:11: Suggestion: Redundant bracket
Found
Found
if (normalizaAngulo (angA - dir') `menorAngulo` normalizaAngulo sens) then go else idWhy not
if normalizaAngulo (angA - dir') `menorAngulo` normalizaAngulo sens then go else id
BotHugo183.hs:115:197: Suggestion: Redundant bracket
Found
Found
(go . roda)Why not
go . roda
BotHugo183.hs:129:6: Warning: Use fromMaybe
Found
Found
maybe id idWhy not
fromMaybe id
BotHugo183.hs:175:5: Warning: Used otherwise as a pattern
Found
Found
otherwise
Why not_
BotHugo183.hs:207:47: Suggestion: Use <$>
Found
Found
fmap (getCarro p) $ colideT4 doAtualiza Nothing jogo tempo tick pWhy not
getCarro p Control.Applicative.<$> colideT4 doAtualiza Nothing jogo tempo tick p
BotHugo183.hs:212:17: Warning: Use fromMaybe
Found
Found
maybe (getScore jogo p) idWhy not
fromMaybe (getScore jogo p)
BotHugo183.hs:230:53: Suggestion: Redundant bracket
Found
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
Found
(posicao)Why not
posicao
BotHugo183.hs:230:128: Warning: Redundant bracket
Found
Found
(tgt)Why not
tgt
BotHugo183.hs:285:41: Suggestion: Use section
Found
Found
(flip ladoPonto tgt)Why not
(`ladoPonto` tgt)
BotHugo183.hs:285:72: Suggestion: Redundant bracket
Found
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
Found
((Double, Double))Why not
(Double, Double)
BotHugo183.hs:289:26: Warning: Redundant bracket
Found
Found
((Double, Double))Why not
(Double, Double)
BotHugo183.hs:304:1: Suggestion: Use guards
Found
Found
maisCurto (_, a1) (_, a2) = if a1 `menorAngulo` a2 then LT else if a1 == a2 then EQ else GTWhy not
maisCurto (_, a1) (_, a2) | a1 `menorAngulo` a2 = LT | a1 == a2 = EQ | otherwise = GT
BotHugo183.hs:326:73: Suggestion: Redundant bracket
Found
Found
(pontoToPosicao pos) : histWhy not
pontoToPosicao pos : hist
BotHugo183.hs:352:17: Suggestion: Use fromMaybe
Found
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
Found
roda_esq a = ...Why not
rodaEsq a = ...
BotHugo183.hs:389:1: Suggestion: Use camelCase
Found
Found
roda_dir a = ...Why not
rodaDir a = ...
OracleT1.hs:50:5: Warning: Eta reduce
Found
Found
docPrec i x = doc xWhy not
docPrec i = doc
OracleT1.hs:54:5: Warning: Eta reduce
Found
Found
docPrec i x = doc xWhy not
docPrec i = doc
OracleT1.hs:58:5: Warning: Eta reduce
Found
Found
docPrec i x = doc xWhy not
docPrec i = doc
OracleT1.hs:62:5: Warning: Eta reduce
Found
Found
docPrec i x = doc xWhy not
docPrec i = doc
OracleT1.hs:66:5: Warning: Eta reduce
Found
Found
docPrec i x = doc xWhy not
docPrec i = doc
OracleT1.hs:77:5: Warning: Eta reduce
Found
Found
docPrec i x = doc xWhy not
docPrec i = doc
OracleT1.hs:81:5: Warning: Eta reduce
Found
Found
docPrec i x = doc xWhy not
docPrec i = doc
OracleT1.hs:85:5: Warning: Eta reduce
Found
Found
docPrec i x = doc xWhy not
docPrec i = doc
OracleT1.hs:96:5: Warning: Eta reduce
Found
Found
docPrec i x = doc xWhy not
docPrec i = doc
OracleT1.hs:106:5: Warning: Eta reduce
Found
Found
docPrec i x = doc xWhy not
docPrec i = doc
OracleT1.hs:110:5: Warning: Eta reduce
Found
Found
docPrec i x = doc xWhy not
docPrec i = doc
OracleT1.hs:112:18: Suggestion: Redundant $
Found
Found
text $ []Why not
text []
OracleT1.hs:114:41: Suggestion: Redundant bracket
Found
Found
(concatMap ((", " ++) . show) t) ++ "]"Why not
concatMap ((", " ++) . show) t ++ "]"
OracleT1.hs:122:1: Warning: Eta reduce
Found
Found
printTab tab = concatMap ((++ "\n") . concatMap printPeca) tabWhy not
printTab = concatMap ((++ "\n") . concatMap printPeca)
OracleT1.hs:180:16: Suggestion: Redundant bracket
Found
Found
(blocoRampa s d) (min a a')Why not
blocoRampa s d (min a a')
OracleT1.hs:183:21: Suggestion: Redundant bracket
Found
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
Found
[l] ++ (drop (y + 1) m)Why not
[l] ++ drop (y + 1) m
OracleT1.hs:184:15: Suggestion: Redundant bracket
Found
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
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
Found
atNote2 str xys x y = atNote str (atNote str xys x) yWhy not
atNote2 str xys x = atNote str (atNote str xys x)
OracleT1.hs:267:1: Warning: Eta reduce
Found
Found
paredesPeca (Peca t _) p = paredesPeca' t pWhy not
paredesPeca (Peca t _) = paredesPeca' t
OracleT1.hs:294:42: Suggestion: Use section
Found
Found
(flip distanceLinhaPonto pnt)Why not
(`distanceLinhaPonto` pnt)
OracleT1.hs:297:1: Warning: Eta reduce
Found
Found
pecaSaida (Peca t _) o = pecaS t oWhy not
pecaSaida (Peca t _) = pecaS t
OracleT1.hs:312:1: Warning: Eta reduce
Found
Found
metaOri (Peca t _) o = meta' t oWhy not
metaOri (Peca t _) = meta' t
OracleT1.hs:330:28: Warning: Redundant bracket
Found
Found
(i)Why not
i
OracleT1.hs:330:45: Warning: Redundant bracket
Found
Found
(i)Why not
i
OracleT2.hs:36:5: Suggestion: Reduce duplication
Found
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
Found
c == []Why not
null c
OracleT2.hs:72:54: Suggestion: Redundant bracket
Found
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
Found
(naoDesperdica c t) && (sequencial c a)Why not
naoDesperdica c t && (sequencial c a)
OracleT2.hs:72:69: Suggestion: Redundant bracket
Found
Found
(naoDesperdica c t) && (sequencial c a)Why not
(naoDesperdica c t) && sequencial c a
OracleT2.hs:75:13: Suggestion: Redundant bracket
Found
Found
if t0 == Rampa (roda (roda d True) True) then (x + 1) else xWhy not
if t0 == Rampa (roda (roda d True) True) then x + 1 else x
OracleT2.hs:93:25: Warning: Use isNothing
Found
Found
d' == NothingWhy not
isNothing d'
OracleT2.hs:113:13: Suggestion: Redundant bracket
Found
Found
(head p) == (last p)Why not
head p == (last p)
OracleT2.hs:113:13: Suggestion: Redundant bracket
Found
Found
(head p) == (last p)Why not
(head p) == last p
OracleT2.hs:132:30: Suggestion: Redundant bracket
Found
Found
o == (roda c False)Why not
o == roda c False
OracleT3.hs:56:42: Suggestion: Redundant bracket
Found
Found
(distancia (posicao x) (posicao y) distance) * 100Why not
distancia (posicao x) (posicao y) distance * 100
OracleT3.hs:57:16: Suggestion: Redundant bracket
Found
Found
(normAngulo (abs (direcao x - direcao y))) / 360Why not
normAngulo (abs (direcao x - direcao y)) / 360
OracleT3.hs:58:42: Suggestion: Redundant bracket
Found
Found
(distancia (velocidade x) (velocidade y) distance) * 100Why not
distancia (velocidade x) (velocidade y) distance * 100
OracleT3.hs:67:25: Suggestion: Move brackets to avoid $
Found
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
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
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
Found
(arrowToComponents (d, a1)) .+. (-x, -y)Why not
arrowToComponents (d, a1) .+. (-x, -y)
OracleT3.hs:97:19: Suggestion: Redundant bracket
Found
Found
dp .*. (arrowToComponents (1, a2))Why not
dp .*. arrowToComponents (1, a2)
OracleT3.hs:122:90: Warning: Redundant bracket
Found
Found
("colide12")Why not
"colide12"
OracleT3.hs:167:21: Warning: Use mapMaybe
Found
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
Found
if (isJust a) then Just (fromJustNote "atravessa" a, b) else NothingWhy not
if isJust a then Just (fromJustNote "atravessa" a, b) else Nothing
OracleT3.hs:189:40: Suggestion: Move brackets to avoid $
Found
Found
(round $ 180 + snd c) `mod` 360Why not
round (180 + snd c) `mod` 360
OracleT3.hs:190:41: Suggestion: Redundant bracket
Found
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
Found
(fromEnum x) + 2Why not
fromEnum x + 2
OracleT3.hs:190:96: Suggestion: Move brackets to avoid $
Found
Found
(abs $ aa - aa') == 1Why not
abs (aa - aa') == 1
OracleT3.hs:191:28: Warning: Used otherwise as a pattern
Found
Found
otherwise
Why not_
OracleT3.hs:271:17: Suggestion: Redundant bracket
Found
Found
((x * a), (x * b))Why not
(x * a, (x * b))
OracleT3.hs:271:17: Suggestion: Redundant bracket
Found
Found
((x * a), (x * b))Why not
((x * a), x * b)
OracleT3.hs:274:21: Suggestion: Redundant bracket
Found
Found
((x + a), (y + b))Why not
(x + a, (y + b))
OracleT3.hs:274:21: Suggestion: Redundant bracket
Found
Found
((x + a), (y + b))Why not
((x + a), y + b)
OracleT3.hs:277:21: Suggestion: Redundant bracket
Found
Found
((x - a), (y - b))Why not
(x - a, (y - b))
OracleT3.hs:277:21: Suggestion: Redundant bracket
Found
Found
((x - a), (y - b))Why not
((x - a), y - b)
OracleT3.hs:290:40: Warning: Redundant bracket
Found
Found
(th)Why not
th
OracleT3.hs:308:17: Suggestion: Redundant bracket
Found
Found
(abs x) ^ 2Why not
abs x ^ 2
OracleT3.hs:308:29: Suggestion: Redundant bracket
Found
Found
(abs y) ^ 2Why not
abs y ^ 2
OracleT3.hs:334:132: Warning: Redundant bracket
Found
Found
(Recta)Why not
Recta
OracleT4.hs:1:1: Warning: Unused LANGUAGE pragma
Found
Found
{-# LANGUAGE PatternGuards #-}
Why not remove it.
OracleT4.hs:36:60: Suggestion: Use uncurry
Found
Found
\ (x, y) -> comparaCarro delta x yWhy not
uncurry (comparaCarro delta)Note: increases laziness
OracleT4.hs:50:61: Suggestion: Use uncurry
Found
Found
\ (x, y) -> comparaDouble delta x yWhy not
uncurry (comparaDouble delta)Note: increases laziness
OracleT4.hs:67:11: Suggestion: Redundant bracket
Found
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
Found
(mapa e)Why not
mapa e
OracleT4.hs:75:15: Suggestion: Redundant bracket
Found
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
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
Found
(floor (fst (posicao c)), floor (snd (posicao c)))Why not
(floor Control.Arrow.*** floor) (posicao c)
OracleT4.hs:89:17: Suggestion: Use ***
Found
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
Found
(h : hs)Why not
h : hs
OracleT4.hs:95:48: Suggestion: Redundant bracket
Found
Found
(nitros e) !! iWhy not
nitros e !! i
OracleT4.hs:97:32: Suggestion: Redundant bracket
Found
Found
(nitros e) !! iWhy not
nitros e !! i
OracleT4.hs:98:15: Suggestion: Redundant bracket
Found
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
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
Found
(nitros e) !! iWhy not
nitros e !! i
OracleT4.hs:101:13: Suggestion: Redundant bracket
Found
Found
(carros e) !! jWhy not
carros e !! j
OracleT4.hs:102:14: Suggestion: Redundant bracket
Found
Found
(carros e0) !! jWhy not
carros e0 !! j
OracleT4.hs:103:31: Suggestion: Redundant bracket
Found
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
Found
tNitro .*. (nitroVec (pista e) c0)Why not
tNitro .*. nitroVec (pista e) c0
OracleT4.hs:107:14: Suggestion: Redundant bracket
Found
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
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
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
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
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
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
Found
(sin (radians (a - d))) > 0Why not
sin (radians (a - d)) > 0
OracleT5.hs:1:1: Warning: Unused LANGUAGE pragma
Found
Found
{-# LANGUAGE PatternGuards #-}
Why not remove it.
OracleT5.hs:68:70: Suggestion: Redundant bracket
Found
Found
[(fst p)]Why not
[fst p]
OracleT5.hs:76:26: Suggestion: Redundant bracket
Found
Found
(t !! b !! a)Why not
t !! b !! a
OracleT5.hs:93:25: Warning: Use isNothing
Found
Found
c == NothingWhy not
isNothing c
OracleT5.hs:115:36: Suggestion: Redundant bracket
Found
Found
toEnum x * (tamBloco e)Why not
toEnum x * tamBloco e
OracleT5.hs:115:62: Suggestion: Redundant bracket
Found
Found
toEnum y * (tamBloco e)Why not
toEnum y * tamBloco e
OracleT5.hs:116:36: Suggestion: Redundant bracket
Found
Found
toEnum x * (tamBloco e)Why not
toEnum x * tamBloco e
OracleT5.hs:116:62: Suggestion: Redundant bracket
Found
Found
toEnum y * (tamBloco e)Why not
toEnum y * tamBloco e
OracleT5.hs:121:39: Suggestion: Redundant bracket
Found
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
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
Found
(length (head m))Why not
length (head m)
OracleT5.hs:124:16: Suggestion: Redundant bracket
Found
Found
(length m)Why not
length m
OracleT5.hs:142:15: Warning: Evaluate
Found
Found
(toEnum a) * 1Why not
(toEnum a)
OracleT5.hs:142:15: Suggestion: Redundant bracket
Found
Found
(toEnum a) * 1Why not
toEnum a * 1
OracleT5.hs:143:18: Suggestion: Move brackets to avoid $
Found
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
Found
3 - (double2Float $ k_atrito p)Why not
3 - double2Float (k_atrito p)
OracleT5.hs:145:23: Suggestion: Move brackets to avoid $
Found
Found
2 - (double2Float $ k_atrito p)Why not
2 - double2Float (k_atrito p)
OracleT5.hs:147:15: Warning: Evaluate
Found
Found
abs (toEnum a) * 1Why not
abs (toEnum a)
OracleT5.hs:148:16: Suggestion: Move brackets to avoid $
Found
Found
(double2Float $ k_atrito p) * 0.5Why not
double2Float (k_atrito p) * 0.5
OracleT5.hs:149:17: Suggestion: Move brackets to avoid $
Found
Found
3 - (double2Float $ k_atrito p)Why not
3 - double2Float (k_atrito p)
OracleT5.hs:150:16: Suggestion: Redundant bracket
Found
Found
(2 - (double2Float $ k_atrito p))Why not
2 - (double2Float $ k_atrito p)
OracleT5.hs:150:17: Suggestion: Move brackets to avoid $
Found
Found
2 - (double2Float $ k_atrito p)Why not
2 - double2Float (k_atrito p)
OracleT5.hs:163:33: Suggestion: Move brackets to avoid $
Found
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
Found
"c" ++ (show (i + 1))Why not
"c" ++ show (i + 1)
OracleT5.hs:173:16: Suggestion: Redundant bracket
Found
Found
m !! (floor y)Why not
m !! floor y
OracleT5.hs:173:16: Suggestion: Redundant bracket
Found
Found
m !! (floor y) !! (floor x)Why not
m !! (floor y) !! floor x
OracleT5.hs:176:20: Suggestion: Redundant bracket
Found
Found
(nitros (jogo s)) !! iWhy not
nitros (jogo s) !! i
OracleT5.hs:177:20: Suggestion: Redundant bracket
Found
Found
(nitros (jogo s)) !! iWhy not
nitros (jogo s) !! i
OracleT5.hs:193:20: Suggestion: Redundant bracket
Found
Found
(digitToInt n) `elem` [1 .. 4]Why not
digitToInt n `elem` [1 .. 4]
OracleT5.hs:193:88: Suggestion: Redundant bracket
Found
Found
(digitToInt n) - 1Why not
digitToInt n - 1
OracleT5.hs:194:20: Suggestion: Redundant bracket
Found
Found
(digitToInt n) `elem` [5 .. 8]Why not
digitToInt n `elem` [5 .. 8]
OracleT5.hs:194:88: Suggestion: Redundant bracket
Found
Found
(digitToInt n) - 5Why not
digitToInt n - 5
OracleT5.hs:197:20: Suggestion: Redundant bracket
Found
Found
(digitToInt n) `elem` [1 .. 4]Why not
digitToInt n `elem` [1 .. 4]
OracleT5.hs:198:20: Suggestion: Redundant bracket
Found
Found
(digitToInt n) `elem` [5 .. 8]Why not
digitToInt n `elem` [5 .. 8]
OracleT5.hs:210:15: Warning: Evaluate
Found
Found
percorre [] tab (fst p0) (snd p0)Why not
uncurry (percorre [] tab) p0
OracleT5.hs:212:35: Suggestion: Redundant bracket
Found
Found
(voltas m) !! nWhy not
voltas m !! n
OracleT5.hs:212:62: Suggestion: Redundant bracket
Found
Found
(voltas m) !! nWhy not
voltas m !! n
OracleT5.hs:215:79: Suggestion: Redundant bracket
Found
Found
(voltas m) !! nWhy not
voltas m !! n
OracleT5.hs:222:17: Suggestion: Redundant bracket
Found
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
Found
(max a b) - tWhy not
max a b - t
OracleT5.hs:223:17: Suggestion: Redundant bracket
Found
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
Found
(max a b) - tWhy not
max a b - t
OracleT5.hs:229:49: Suggestion: Redundant bracket
Found
Found
(historico j) !! nWhy not
historico j !! n
OracleT5.hs:231:15: Warning: Evaluate
Found
Found
percorre [] tab (fst p0) (snd p0)Why not
uncurry (percorre [] tab) p0
OracleT5.hs:235:60: Suggestion: Use zipWith
Found
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
Found
(fromIntegral i) * 53Why not
fromIntegral i * 53
OracleT5.hs:237:52: Suggestion: Redundant bracket
Found
Found
"p" ++ (show (i + 1))Why not
"p" ++ show (i + 1)
OracleT5.hs:240:42: Suggestion: Redundant bracket
Found
Found
if (batotas e !! i > 0) then getImage "btt" e else BlankWhy not
if batotas e !! i > 0 then getImage "btt" e else Blank
OracleT5.hs:241:42: Suggestion: Redundant bracket
Found
Found
if (mortes e !! i > 0) then getImage "mrt" e else BlankWhy not
if mortes e !! i > 0 then getImage "mrt" e else Blank
OracleT5.hs:250:12: Suggestion: Redundant bracket
Found
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 glossTempoWhy 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
Found
Translate 14 14 $ timerWhy not
Translate 14 14 timer
OracleT5.hs:304:14: Suggestion: Redundant bracket
Found
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
Found
(realToFrac screenx) / (realToFrac x)Why not
realToFrac screenx / (realToFrac x)
OracleT5.hs:308:23: Suggestion: Redundant bracket
Found
Found
(realToFrac screenx) / (realToFrac x)Why not
(realToFrac screenx) / realToFrac x
OracleT5.hs:309:23: Suggestion: Redundant bracket
Found
Found
(realToFrac screeny) / (realToFrac y)Why not
realToFrac screeny / (realToFrac y)
OracleT5.hs:309:23: Suggestion: Redundant bracket
Found
Found
(realToFrac screeny) / (realToFrac y)Why not
(realToFrac screeny) / realToFrac y
OracleT5.hs:333:23: Suggestion: Use head
Found
Found
args !! 0Why not
head args
OracleT5.hs:338:16: Warning: Use isNothing
Found
Found
p' == NothingWhy not
isNothing p'
OracleT5.hs:340:15: Suggestion: Redundant bracket
Found
Found
(carros (jogo e) !! i)Why not
carros (jogo e) !! i
OracleT5.hs:343:23: Suggestion: Redundant bracket
Found
Found
(m !! pj !! pi)Why not
m !! pj !! pi
OracleT5.hs:348:20: Suggestion: Use null
Found
Found
length whereAmI' > 0Why not
not (null whereAmI')Note: increases laziness
Tarefa1_2017li1g183.hs:62:1: Suggestion: Use camelCase
Found
Found
c_exOP = ...Why not
cExOP = ...
Tarefa1_2017li1g183.hs:67:1: Suggestion: Use camelCase
Found
Found
c_exDM = ...Why not
cExDM = ...
Tarefa1_2017li1g183.hs:72:1: Suggestion: Use camelCase
Found
Found
c_exOL = ...Why not
cExOL = ...
Tarefa1_2017li1g183.hs:77:1: Suggestion: Use camelCase
Found
Found
c_exHM = ...Why not
cExHM = ...
Tarefa1_2017li1g183.hs:82:1: Suggestion: Use camelCase
Found
Found
c_exR = ...Why not
cExR = ...
Tarefa1_2017li1g183.hs:92:1: Suggestion: Use camelCase
Found
Found
c_exE = ...Why not
cExE = ...
Tarefa1_2017li1g183.hs:114:76: Warning: Redundant bracket
Found
Found
(dir)Why not
dir
Tarefa1_2017li1g183.hs:125:25: Suggestion: Redundant bracket
Found
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
Found
(Peca (Curva Norte) 0) : _Why not
Peca (Curva Norte) 0 : _
Tarefa3_2017li1g183.hs:16:30: Warning: Redundant do
Found
Found
do suchThat genC (validaCarro tab)Why not
suchThat genC (validaCarro tab)
Tarefa3_2017li1g183.hs:54:16: Suggestion: Redundant bracket
Found
Found
(normAngulo (abs (direcao x - direcao y))) / 360Why not
normAngulo (abs (direcao x - direcao y)) / 360
Tarefa3_2017li1g183.hs:63:25: Suggestion: Redundant bracket
Found
Found
(not $ derrete tab (posicao carro))Why not
not $ derrete tab (posicao carro)
Tarefa3_2017li1g183.hs:72:15: Suggestion: Redundant bracket
Found
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
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
Found
(arrowToComponents (d, a1)) .+. (-x, -y)Why not
arrowToComponents (d, a1) .+. (-x, -y)
Tarefa3_2017li1g183.hs:94:19: Suggestion: Redundant bracket
Found
Found
dp .*. (arrowToComponents (1, a2))Why not
dp .*. arrowToComponents (1, a2)
Tarefa3_2017li1g183.hs:164:21: Warning: Use mapMaybe
Found
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
Found
if (isJust a) then Just (fromJust a, b) else NothingWhy not
if isJust a then Just (fromJust a, b) else Nothing
Tarefa3_2017li1g183.hs:185:41: Suggestion: Redundant bracket
Found
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
Found
(fromEnum x) + 2Why not
fromEnum x + 2
Tarefa3_2017li1g183.hs:185:96: Suggestion: Move brackets to avoid $
Found
Found
(abs $ aa - aa') == 1Why not
abs (aa - aa') == 1
Tarefa3_2017li1g183.hs:186:28: Warning: Used otherwise as a pattern
Found
Found
otherwise
Why not_
Tarefa3_2017li1g183.hs:254:17: Suggestion: Redundant bracket
Found
Found
((x * a), (x * b))Why not
(x * a, (x * b))
Tarefa3_2017li1g183.hs:254:17: Suggestion: Redundant bracket
Found
Found
((x * a), (x * b))Why not
((x * a), x * b)
Tarefa3_2017li1g183.hs:257:21: Suggestion: Redundant bracket
Found
Found
((x + a), (y + b))Why not
(x + a, (y + b))
Tarefa3_2017li1g183.hs:257:21: Suggestion: Redundant bracket
Found
Found
((x + a), (y + b))Why not
((x + a), y + b)
Tarefa3_2017li1g183.hs:260:21: Suggestion: Redundant bracket
Found
Found
((x - a), (y - b))Why not
(x - a, (y - b))
Tarefa3_2017li1g183.hs:260:21: Suggestion: Redundant bracket
Found
Found
((x - a), (y - b))Why not
((x - a), y - b)
Tarefa3_2017li1g183.hs:273:40: Warning: Redundant bracket
Found
Found
(th)Why not
th
Tarefa3_2017li1g183.hs:288:17: Suggestion: Redundant bracket
Found
Found
(abs x) ^ 2Why not
abs x ^ 2
Tarefa3_2017li1g183.hs:288:29: Suggestion: Redundant bracket
Found
Found
(abs y) ^ 2Why not
abs y ^ 2
Tarefa4_2017li1g183.hs:1:1: Warning: Unused LANGUAGE pragma
Found
Found
{-# LANGUAGE PatternGuards #-}
Why not remove it.
Tarefa4_2017li1g183.hs:31:68: Suggestion: Redundant bracket
Found
Found
[(fst p)]Why not
[fst p]
Tarefa4_2017li1g183.hs:39:26: Suggestion: Redundant bracket
Found
Found
(t !! b !! a)Why not
t !! b !! a
Tarefa4_2017li1g183.hs:49:25: Warning: Redundant bracket
Found
Found
(1.5)Why not
1.5
Tarefa4_2017li1g183.hs:55:20: Suggestion: Redundant bracket
Found
Found
(mapa e)Why not
mapa e
Tarefa4_2017li1g183.hs:58:15: Suggestion: Redundant bracket
Found
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
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
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
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
Found
(h : hs)Why not
h : hs
Tarefa4_2017li1g183.hs:78:48: Suggestion: Redundant bracket
Found
Found
(nitros e) !! iWhy not
nitros e !! i
Tarefa4_2017li1g183.hs:80:32: Suggestion: Redundant bracket
Found
Found
(nitros e) !! iWhy not
nitros e !! i
Tarefa4_2017li1g183.hs:81:15: Suggestion: Redundant bracket
Found
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
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
Found
(nitros e) !! iWhy not
nitros e !! i
Tarefa4_2017li1g183.hs:84:13: Suggestion: Redundant bracket
Found
Found
(carros e) !! jWhy not
carros e !! j
Tarefa4_2017li1g183.hs:85:14: Suggestion: Redundant bracket
Found
Found
(carros e0) !! jWhy not
carros e0 !! j
Tarefa4_2017li1g183.hs:86:31: Suggestion: Redundant bracket
Found
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
Found
tNitro .*. (nitroVec (pista e) c0)Why not
tNitro .*. nitroVec (pista e) c0
Tarefa4_2017li1g183.hs:90:14: Suggestion: Redundant bracket
Found
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
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
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
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
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
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
Found
(sin (radians (a - d))) > 0Why not
sin (radians (a - d)) > 0