All hints

All files

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

BotHugo186.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)
BotHugo186.hs:65:79: Warning: Redundant bracket
Found
(caganco)
Why not
caganco
BotHugo186.hs:65:111: Suggestion: Redundant bracket
Found
(turbina p) quieto
Why not
turbina p quieto
BotHugo186.hs:77:24: Suggestion: Redundant $
Found
take rodatuning $ proximas
Why not
take rodatuning proximas
BotHugo186.hs:78:30: Suggestion: Redundant $
Found
take rodatuning $ proximas
Why not
take rodatuning proximas
BotHugo186.hs:93:203: Suggestion: Redundant bracket
Found
(fwd . roda)
Why not
fwd . roda
BotHugo186.hs:95:5: Suggestion: Reduce duplication
Found
props = pista jogo
carro = getCarro p jogo
dir = normalizaAngulo $ direcao carro
Why not
Combine with BotHugo186.hs:120:5
BotHugo186.hs:101:5: Warning: Redundant bracket
Found
(angE)
Why not
angE
BotHugo186.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)
BotHugo186.hs:101:50: Warning: Redundant bracket
Found
(angA)
Why not
angA
BotHugo186.hs:102:6: Warning: Use fromMaybe
Found
maybe id id
Why not
fromMaybe id
BotHugo186.hs:104:5: Suggestion: Reduce duplication
Found
aceleraV
  = velocidade $
      andaCarro tick jogo (carro{direcao = dir'}, acelera quieto)
travaV
  = velocidade $
      andaCarro tick jogo (carro{direcao = dir'}, trava quieto)
turbinaV
  = tick .*.
      arrowToComponents (min (nitros jogo !! p) (k_nitro props), dir')
Why not
Combine with BotHugo186.hs:133:5
BotHugo186.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
BotHugo186.hs:116:197: Suggestion: Redundant bracket
Found
(go . roda)
Why not
go . roda
BotHugo186.hs:130:6: Warning: Use fromMaybe
Found
maybe id id
Why not
fromMaybe id
BotHugo186.hs:176:5: Warning: Used otherwise as a pattern
Found
otherwise
Why not
_
BotHugo186.hs:208: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
BotHugo186.hs:213:17: Warning: Use fromMaybe
Found
maybe (getScore jogo p) id
Why not
fromMaybe (getScore jogo p)
BotHugo186.hs:231: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)
BotHugo186.hs:231:58: Warning: Redundant bracket
Found
(posicao)
Why not
posicao
BotHugo186.hs:231:128: Warning: Redundant bracket
Found
(tgt)
Why not
tgt
BotHugo186.hs:286:41: Suggestion: Use section
Found
(flip ladoPonto tgt)
Why not
(`ladoPonto` tgt)
BotHugo186.hs:288:36: Warning: Redundant bracket
Found
((Double, Double))
Why not
(Double, Double)
BotHugo186.hs:290:26: Warning: Redundant bracket
Found
((Double, Double))
Why not
(Double, Double)
BotHugo186.hs:305: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
BotHugo186.hs:327:73: Suggestion: Redundant bracket
Found
(pontoToPosicao pos) : hist
Why not
pontoToPosicao pos : hist
BotHugo186.hs:353: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)
BotHugo186.hs:389:1: Suggestion: Use camelCase
Found
roda_esq a = ...
Why not
rodaEsq a = ...
BotHugo186.hs:390:1: Suggestion: Use camelCase
Found
roda_dir a = ...
Why not
rodaDir a = ...
BotNuno.hs:1:1: Warning: Unused LANGUAGE pragma
Found
{-# LANGUAGE PatternGuards #-}
Why not remove it.


BotNuno.hs:17:13: Warning: Use isNothing
Found
p' == Nothing
Why not
isNothing p'
BotNuno.hs:19:15: Suggestion: Redundant bracket
Found
(carros e !! i)
Why not
carros e !! i
BotNuno.hs:22:47: Warning: Redundant bracket
Found
(e)
Why not
e
BotNuno.hs:23:38: Warning: Redundant bracket
Found
(e)
Why not
e
BotNuno.hs:24:23: Suggestion: Redundant bracket
Found
(m !! pj !! pi)
Why not
m !! pj !! pi
BotNuno.hs:29:20: Suggestion: Use null
Found
length whereAmI' > 0
Why not
not (null whereAmI')
Note: increases laziness
BotNuno.hs:34:17: Suggestion: Redundant bracket
Found
(round (direcao p)) `mod` 4
Why not
round (direcao p) `mod` 4
CollisionViewer.hs:62:1: Suggestion: Use camelCase
Found
data Terreno = T{delta_roda :: Double, delta_acel :: Double,
                 delta_drag :: Double, delta_drift :: Double,
                 delta_gravity :: Double}
Why not
data Terreno = T{deltaRoda :: Double, deltaAcel :: Double,
                 deltaDrag :: Double, deltaDrift :: Double, deltaGravity :: Double}
CollisionViewer.hs:78:23: Suggestion: Redundant bracket
Found
(atNote2 "posInicial" t b a)
Why not
atNote2 "posInicial" t b a
CollisionViewer.hs:143:17: Suggestion: Redundant bracket
Found
((x * a), (x * b))
Why not
(x * a, (x * b))
CollisionViewer.hs:143:17: Suggestion: Redundant bracket
Found
((x * a), (x * b))
Why not
((x * a), x * b)
CollisionViewer.hs:146:21: Suggestion: Redundant bracket
Found
((x + a), (y + b))
Why not
(x + a, (y + b))
CollisionViewer.hs:146:21: Suggestion: Redundant bracket
Found
((x + a), (y + b))
Why not
((x + a), y + b)
CollisionViewer.hs:149:21: Suggestion: Redundant bracket
Found
((x - a), (y - b))
Why not
(x - a, (y - b))
CollisionViewer.hs:149:21: Suggestion: Redundant bracket
Found
((x - a), (y - b))
Why not
((x - a), y - b)
CollisionViewer.hs:162:40: Warning: Redundant bracket
Found
(th)
Why not
th
CollisionViewer.hs:177:17: Suggestion: Redundant bracket
Found
(abs x) ^ 2
Why not
abs x ^ 2
CollisionViewer.hs:177:29: Suggestion: Redundant bracket
Found
(abs y) ^ 2
Why not
abs y ^ 2
CollisionViewer.hs:203:15: Warning: Evaluate
Found
(toEnum a) * 1
Why not
(toEnum a)
CollisionViewer.hs:203:15: Suggestion: Redundant bracket
Found
(toEnum a) * 1
Why not
toEnum a * 1
CollisionViewer.hs:205:15: Warning: Evaluate
Found
abs (toEnum a) * 1
Why not
abs (toEnum a)
CollisionViewer.hs:221: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)
CollisionViewer.hs:225:27: Warning: Evaluate
Found
Translate (fst $ norm x) (snd $ norm x)
Why not
uncurry Translate (norm x)
CollisionViewer.hs:229:26: Warning: Evaluate
Found
Translate (fst $ norm $ head l) (snd $ norm $ head l)
Why not
uncurry Translate (norm $ head l)
CollisionViewer.hs:230:27: Warning: Evaluate
Found
Translate (fst $ norm $ last l) (snd $ norm $ last l)
Why not
uncurry Translate (norm $ last l)
CollisionViewer.hs:235:54: Suggestion: Redundant bracket
Found
toEnum x * (tamBloco e)
Why not
toEnum x * tamBloco e
CollisionViewer.hs:235:80: Suggestion: Redundant bracket
Found
toEnum y * (tamBloco e)
Why not
toEnum y * tamBloco e
CollisionViewer.hs:238:16: Suggestion: Redundant bracket
Found
(length (head m))
Why not
length (head m)
CollisionViewer.hs:239:16: Suggestion: Redundant bracket
Found
(length m)
Why not
length m
CollisionViewer.hs:247:13: Suggestion: Redundant bracket
Found
(double2Float x * tamBloco e)
Why not
double2Float x * tamBloco e
CollisionViewer.hs:248:13: Suggestion: Redundant bracket
Found
(-double2Float y * tamBloco e)
Why not
-double2Float y * tamBloco e
CollisionViewer.hs:258:8: Suggestion: Redundant bracket
Found
do screen@(Display screenx screeny) <- getDisplay
   txt <- CW.getTextContent
   (tab, tempo, carro) <- case
                            readMaybe txt :: Maybe (Tabuleiro, Tempo, Carro) of
                              Nothing -> case readMaybe txt :: Maybe (Tempo, Carro) of
                                             Nothing -> error $
                                                          "erro ao carregar (Tabuleiro,Tempo,Carro) ou (Tempo,Carro): "
                                                            ++ show txt
                                             Just (tempo, carro) -> let (Mapa _ tab) = m_ex1 in
                                                                      return (tab, tempo, carro)
                              Just (tab, tempo, carro) -> return (tab, tempo, carro)
   let from = posicao carro
       to = posicao carro .+. (tempo .*. velocidade carro)
   let back = greyN 0.5
       x = toEnum (length (head tab))
       y = toEnum (length tab)
       tamanhoX :: Float = (realToFrac screenx) / (realToFrac x)
       tamanhoY :: Float = (realToFrac screeny) / (realToFrac y)
       tamanho = min tamanhoX tamanhoY
   let imgs = makeImages tamanho screen
   let e = (estadoInicial tab tamanho imgs)
       bs
         = if (T2.validaPonto from tab && T2.validaTabuleiro tab) then
             T3.colideLocalAcc [] tab (1, 1) (from, to) (ponto2Pos from) else
             ([from], Nothing)
       carro'
         = if T2.validaTabuleiro tab then T3.colide tab tempo carro else
             Nothing
       carros
         = filter (flip T2.validaPonto tab . posicao)
             (carro : maybeToList carro')
   display screen back (glossDesenhaBounces screen carros bs e)
Why not
do screen@(Display screenx screeny) <- getDisplay
   txt <- CW.getTextContent
   (tab, tempo, carro) <- case
                            readMaybe txt :: Maybe (Tabuleiro, Tempo, Carro) of
                              Nothing -> case readMaybe txt :: Maybe (Tempo, Carro) of
                                             Nothing -> error $
                                                          "erro ao carregar (Tabuleiro,Tempo,Carro) ou (Tempo,Carro): "
                                                            ++ show txt
                                             Just (tempo, carro) -> let (Mapa _ tab) = m_ex1 in
                                                                      return (tab, tempo, carro)
                              Just (tab, tempo, carro) -> return (tab, tempo, carro)
   let from = posicao carro
       to = posicao carro .+. (tempo .*. velocidade carro)
   let back = greyN 0.5
       x = toEnum (length (head tab))
       y = toEnum (length tab)
       tamanhoX :: Float = (realToFrac screenx) / (realToFrac x)
       tamanhoY :: Float = (realToFrac screeny) / (realToFrac y)
       tamanho = min tamanhoX tamanhoY
   let imgs = makeImages tamanho screen
   let e = estadoInicial tab tamanho imgs
       bs
         = if (T2.validaPonto from tab && T2.validaTabuleiro tab) then
             T3.colideLocalAcc [] tab (1, 1) (from, to) (ponto2Pos from) else
             ([from], Nothing)
       carro'
         = if T2.validaTabuleiro tab then T3.colide tab tempo carro else
             Nothing
       carros
         = filter (flip T2.validaPonto tab . posicao)
             (carro : maybeToList carro')
   display screen back (glossDesenhaBounces screen carros bs e)
CollisionViewer.hs:271:27: Suggestion: Redundant bracket
Found
(realToFrac screenx) / (realToFrac x)
Why not
realToFrac screenx / (realToFrac x)
CollisionViewer.hs:271:27: Suggestion: Redundant bracket
Found
(realToFrac screenx) / (realToFrac x)
Why not
(realToFrac screenx) / realToFrac x
CollisionViewer.hs:272:27: Suggestion: Redundant bracket
Found
(realToFrac screeny) / (realToFrac y)
Why not
realToFrac screeny / (realToFrac y)
CollisionViewer.hs:272:27: Suggestion: Redundant bracket
Found
(realToFrac screeny) / (realToFrac y)
Why not
(realToFrac screeny) / realToFrac y
CollisionViewer.hs:276:14: Suggestion: Redundant bracket
Found
if (T2.validaPonto from tab && T2.validaTabuleiro tab) then
  T3.colideLocalAcc [] tab (1, 1) (from, to) (ponto2Pos from) else
  ([from], Nothing)
Why not
if T2.validaPonto from tab && T2.validaTabuleiro tab then
  T3.colideLocalAcc [] tab (1, 1) (from, to) (ponto2Pos from) else
  ([from], Nothing)
CollisionViewer.hs:284:14: Warning: Redundant bracket
Found
(joga)
Why not
joga
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:96:25: Warning: Use isNothing
Found
d' == Nothing
Why not
isNothing d'
OracleT2.hs:116:13: Suggestion: Redundant bracket
Found
(head p) == (last p)
Why not
head p == (last p)
OracleT2.hs:116:13: Suggestion: Redundant bracket
Found
(head p) == (last p)
Why not
(head p) == last p
OracleT2.hs:135: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:37:60: Suggestion: Use uncurry
Found
\ (x, y) -> comparaCarro delta x y
Why not
uncurry (comparaCarro delta)
Note: increases laziness
OracleT4.hs:51:61: Suggestion: Use uncurry
Found
\ (x, y) -> comparaDouble delta x y
Why not
uncurry (comparaDouble delta)
Note: increases laziness
OracleT4.hs:68: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:76:20: Suggestion: Redundant bracket
Found
(mapa e)
Why not
mapa e
OracleT4.hs:79: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:80: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:91:27: Suggestion: Use ***
Found
(floor (fst (posicao c)), floor (snd (posicao c)))
Why not
(floor Control.Arrow.*** floor) (posicao c)
OracleT4.hs:93:17: Suggestion: Use ***
Found
(floor (fst (posicao c)), floor (snd (posicao c)))
Why not
(floor Control.Arrow.*** floor) (posicao c)
OracleT4.hs:94:28: Suggestion: Redundant bracket
Found
(h : hs)
Why not
h : hs
OracleT4.hs:99:48: Suggestion: Redundant bracket
Found
(nitros e) !! i
Why not
nitros e !! i
OracleT4.hs:101:32: Suggestion: Redundant bracket
Found
(nitros e) !! i
Why not
nitros e !! i
OracleT4.hs:102: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:103: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:104:22: Suggestion: Redundant bracket
Found
(nitros e) !! i
Why not
nitros e !! i
OracleT4.hs:105:13: Suggestion: Redundant bracket
Found
(carros e) !! j
Why not
carros e !! j
OracleT4.hs:106:14: Suggestion: Redundant bracket
Found
(carros e0) !! j
Why not
carros e0 !! j
OracleT4.hs:107:31: Suggestion: Redundant bracket
Found
(velocidade c) .+. (tNitro .*. (nitroVec (pista e) c0))
Why not
velocidade c .+. (tNitro .*. (nitroVec (pista e) c0))
OracleT4.hs:107:51: Suggestion: Redundant bracket
Found
tNitro .*. (nitroVec (pista e) c0)
Why not
tNitro .*. nitroVec (pista e) c0
OracleT4.hs:111: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:111:41: Suggestion: Redundant bracket
Found
(accelVec ps (c, a)) .+. (dragVec ps c)
Why not
accelVec ps (c, a) .+. (dragVec ps c)
OracleT4.hs:111:41: Suggestion: Redundant bracket
Found
(accelVec ps (c, a)) .+. (dragVec ps c)
Why not
(accelVec ps (c, a)) .+. dragVec ps c
OracleT4.hs:111: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:111: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:114:17: Suggestion: Use ***
Found
(floor (fst (posicao c)), floor (snd (posicao c)))
Why not
(floor Control.Arrow.*** floor) (posicao c)
OracleT4.hs:130:25: Suggestion: Redundant bracket
Found
(sin (radians (a - d))) > 0
Why not
sin (radians (a - d)) > 0
OracleT4.hs:211:23: Warning: Redundant bracket
Found
(190)
Why not
190
OracleT4.hs:213:23: Warning: Redundant bracket
Found
(145)
Why not
145
OracleT5.hs:1:1: Warning: Unused LANGUAGE pragma
Found
{-# LANGUAGE PatternGuards #-}
Why not remove it.


OracleT5.hs:69:70: Suggestion: Redundant bracket
Found
[(fst p)]
Why not
[fst p]
OracleT5.hs:77:26: Suggestion: Redundant bracket
Found
(t !! b !! a)
Why not
t !! b !! a
OracleT5.hs:94:25: Warning: Use isNothing
Found
c == Nothing
Why not
isNothing c
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:117:36: Suggestion: Redundant bracket
Found
toEnum x * (tamBloco e)
Why not
toEnum x * tamBloco e
OracleT5.hs:117:62: Suggestion: Redundant bracket
Found
toEnum y * (tamBloco e)
Why not
toEnum y * tamBloco e
OracleT5.hs:122: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:123: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:124:16: Suggestion: Redundant bracket
Found
(length (head m))
Why not
length (head m)
OracleT5.hs:125:16: Suggestion: Redundant bracket
Found
(length m)
Why not
length m
OracleT5.hs:143:15: Warning: Evaluate
Found
(toEnum a) * 1
Why not
(toEnum a)
OracleT5.hs:143:15: Suggestion: Redundant bracket
Found
(toEnum a) * 1
Why not
toEnum a * 1
OracleT5.hs:144:18: Suggestion: Move brackets to avoid $
Found
0.2 * (double2Float $ k_atrito p)
Why not
0.2 * double2Float (k_atrito p)
OracleT5.hs:145:23: Suggestion: Move brackets to avoid $
Found
3 - (double2Float $ k_atrito p)
Why not
3 - double2Float (k_atrito p)
OracleT5.hs:146:23: Suggestion: Move brackets to avoid $
Found
2 - (double2Float $ k_atrito p)
Why not
2 - double2Float (k_atrito p)
OracleT5.hs:148:15: Warning: Evaluate
Found
abs (toEnum a) * 1
Why not
abs (toEnum a)
OracleT5.hs:149:16: Suggestion: Move brackets to avoid $
Found
(double2Float $ k_atrito p) * 0.5
Why not
double2Float (k_atrito p) * 0.5
OracleT5.hs:150:17: Suggestion: Move brackets to avoid $
Found
3 - (double2Float $ k_atrito p)
Why not
3 - double2Float (k_atrito p)
OracleT5.hs:151:16: Suggestion: Redundant bracket
Found
(2 - (double2Float $ k_atrito p))
Why not
2 - (double2Float $ k_atrito p)
OracleT5.hs:151:17: Suggestion: Move brackets to avoid $
Found
2 - (double2Float $ k_atrito p)
Why not
2 - double2Float (k_atrito p)
OracleT5.hs:164: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:170:28: Suggestion: Redundant bracket
Found
"c" ++ (show (i + 1))
Why not
"c" ++ show (i + 1)
OracleT5.hs:174:16: Suggestion: Redundant bracket
Found
m !! (floor y)
Why not
m !! floor y
OracleT5.hs:174:16: Suggestion: Redundant bracket
Found
m !! (floor y) !! (floor x)
Why not
m !! (floor y) !! floor x
OracleT5.hs:177:20: Suggestion: Redundant bracket
Found
(nitros (jogo s)) !! i
Why not
nitros (jogo s) !! i
OracleT5.hs:178:20: Suggestion: Redundant bracket
Found
(nitros (jogo s)) !! i
Why not
nitros (jogo s) !! i
OracleT5.hs:194:20: Suggestion: Redundant bracket
Found
(digitToInt n) `elem` [1 .. 4]
Why not
digitToInt n `elem` [1 .. 4]
OracleT5.hs:194:88: Suggestion: Redundant bracket
Found
(digitToInt n) - 1
Why not
digitToInt n - 1
OracleT5.hs:195:20: Suggestion: Redundant bracket
Found
(digitToInt n) `elem` [5 .. 8]
Why not
digitToInt n `elem` [5 .. 8]
OracleT5.hs:195:88: Suggestion: Redundant bracket
Found
(digitToInt n) - 5
Why not
digitToInt n - 5
OracleT5.hs:198:20: Suggestion: Redundant bracket
Found
(digitToInt n) `elem` [1 .. 4]
Why not
digitToInt n `elem` [1 .. 4]
OracleT5.hs:199:20: Suggestion: Redundant bracket
Found
(digitToInt n) `elem` [5 .. 8]
Why not
digitToInt n `elem` [5 .. 8]
OracleT5.hs:211:15: Warning: Evaluate
Found
percorre [] tab (fst p0) (snd p0)
Why not
uncurry (percorre [] tab) p0
OracleT5.hs:213:46: Suggestion: Redundant bracket
Found
(voltas m) !! n
Why not
voltas m !! n
OracleT5.hs:216:30: Suggestion: Redundant bracket
Found
(voltas m) !! n
Why not
voltas m !! n
OracleT5.hs:225: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:225:35: Suggestion: Redundant bracket
Found
(max a b) - t
Why not
max a b - t
OracleT5.hs:226: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:226:35: Suggestion: Redundant bracket
Found
(max a b) - t
Why not
max a b - t
OracleT5.hs:232:49: Suggestion: Redundant bracket
Found
(historico j) !! n
Why not
historico j !! n
OracleT5.hs:234:15: Warning: Evaluate
Found
percorre [] tab (fst p0) (snd p0)
Why not
uncurry (percorre [] tab) p0
OracleT5.hs:238:60: Suggestion: Use zipWith
Found
map f (zip [0 ..] (nitros (jogo e)))
Why not
zipWith (curry f) [0 ..] (nitros (jogo e))
OracleT5.hs:239:40: Suggestion: Redundant bracket
Found
(fromIntegral i) * 53
Why not
fromIntegral i * 53
OracleT5.hs:240:52: Suggestion: Redundant bracket
Found
"p" ++ (show (i + 1))
Why not
"p" ++ show (i + 1)
OracleT5.hs:243: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:244: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:253: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:287:30: Suggestion: Redundant $
Found
Translate 14 14 $ timer
Why not
Translate 14 14 timer
OracleT5.hs:307:14: Suggestion: Redundant bracket
Found
(InWindow "MicroMachines" (screenx + 200, screeny) (0, 0))
Why not
InWindow "MicroMachines" (screenx + 200, screeny) (0, 0)
OracleT5.hs:311:23: Suggestion: Redundant bracket
Found
(realToFrac screenx) / (realToFrac x)
Why not
realToFrac screenx / (realToFrac x)
OracleT5.hs:311:23: Suggestion: Redundant bracket
Found
(realToFrac screenx) / (realToFrac x)
Why not
(realToFrac screenx) / realToFrac x
OracleT5.hs:312:23: Suggestion: Redundant bracket
Found
(realToFrac screeny) / (realToFrac y)
Why not
realToFrac screeny / (realToFrac y)
OracleT5.hs:312:23: Suggestion: Redundant bracket
Found
(realToFrac screeny) / (realToFrac y)
Why not
(realToFrac screeny) / realToFrac y
OracleT5.hs:336:23: Suggestion: Use head
Found
args !! 0
Why not
head args
OracleT5.hs:341:16: Warning: Use isNothing
Found
p' == Nothing
Why not
isNothing p'
OracleT5.hs:343:15: Suggestion: Redundant bracket
Found
(carros (jogo e) !! i)
Why not
carros (jogo e) !! i
OracleT5.hs:346:23: Suggestion: Redundant bracket
Found
(m !! pj !! pi)
Why not
m !! pj !! pi
OracleT5.hs:351:20: Suggestion: Use null
Found
length whereAmI' > 0
Why not
not (null whereAmI')
Note: increases laziness
OracleT6.hs:1:1: Warning: Unused LANGUAGE pragma
Found
{-# LANGUAGE PatternGuards #-}
Why not remove it.


OracleT6.hs:17:12: Suggestion: Redundant bracket
Found
(constroi
   ((replicate 20 Avanca) ++
      [CurvaDir, Avanca, Avanca, CurvaDir] ++
        (replicate 20 Avanca) ++ [CurvaDir, Avanca, Avanca, CurvaDir]))
  : mapas128 ++ mapas64 ++ mapas16
Why not
constroi
  ((replicate 20 Avanca) ++
     [CurvaDir, Avanca, Avanca, CurvaDir] ++
       (replicate 20 Avanca) ++ [CurvaDir, Avanca, Avanca, CurvaDir])
  : mapas128 ++ mapas64 ++ mapas16
OracleT6.hs:17:23: Suggestion: Redundant bracket
Found
(replicate 20 Avanca) ++
  [CurvaDir, Avanca, Avanca, CurvaDir] ++
    (replicate 20 Avanca) ++ [CurvaDir, Avanca, Avanca, CurvaDir]
Why not
replicate 20 Avanca ++
  [CurvaDir, Avanca, Avanca, CurvaDir] ++
    (replicate 20 Avanca) ++ [CurvaDir, Avanca, Avanca, CurvaDir]
OracleT6.hs:17:81: Suggestion: Redundant bracket
Found
(replicate 20 Avanca) ++ [CurvaDir, Avanca, Avanca, CurvaDir]
Why not
replicate 20 Avanca ++ [CurvaDir, Avanca, Avanca, CurvaDir]
Tarefa1.hs:1:16: Error: Parse error
Found
  module Tarefa1_${group} where
  
> import LI11718
  
  testesT1 :: [Caminho]
Tarefa2.hs:1:16: Error: Parse error
Found
  module Tarefa2_${group} where
  
> import LI11718
  
  testesT2 :: [Tabuleiro]
Tarefa3.hs:1:16: Error: Parse error
Found
  module Tarefa3_${group} where
  
> import LI11718
  
  testesT3 :: [(Tabuleiro,Tempo,Carro)]
Tarefa4.hs:7:16: Error: Parse error
Found
  Módulo para a realização da Tarefa 4 de LI1 em 2017/18.
  -}
> module Tarefa4_${group} where
  
  import LI11718
Tarefa6.hs:7:16: Error: Parse error
Found
  Módulo para a realização da Tarefa 6 de LI1 em 2017/18.
  -}
> module Tarefa6_${group} where
  
  import LI11718
Tarefa6_2017li1g186.hs:21:1: Warning: Eta reduce
Found
bot tick e j = BotHugo186.bot tick e j
Why not
bot = BotHugo186.bot