timjb/diagrams-rubiks-cube

View on GitHub

Showing 11 of 11 total issues

Unused LANGUAGE pragma
Open

{-# LANGUAGE KindSignatures #-}
Severity: Minor
Found in src/Diagrams/RubiksCube/Model.hs by hlint

Found

{-# LANGUAGE KindSignatures #-}

Perhaps

Applying this change:

  • Extension KindSignatures is implied by TypeFamilies

Use foldr
Open

doMoves [] = iso id id
doMoves (m:ms) = move m . doMoves ms
Severity: Minor
Found in src/Diagrams/RubiksCube/Model.hs by hlint

Found

doMoves [] = iso id id
doMoves (m : ms) = move m . doMoves ms

Perhaps

doMoves ms = foldr ((.) . move) (iso id id) ms

Redundant bracket
Open

    (\downSide' downRows' -> c & downSide .~ downSide' & downRows .~ downRows')
       <$> (traverse f (c ^. downSide))
       <*> (traverse (traverse f) (c ^. downRows))
Severity: Minor
Found in src/Diagrams/RubiksCube/Model.hs by hlint

Found

(\ downSide' downRows' ->
   c & downSide .~ downSide' & downRows .~ downRows')
  <$> (traverse f (c ^. downSide))
  <*> (traverse (traverse f) (c ^. downRows))

Perhaps

(\ downSide' downRows' ->
   c & downSide .~ downSide' & downRows .~ downRows')
  <$> (traverse f (c ^. downSide))
  <*> traverse (traverse f) (c ^. downRows)

Redundant bracket
Open

    (\upSide' upRows' -> c & upSide .~ upSide' & upRows .~ upRows')
       <$> (traverse f (c ^. upSide))
Severity: Minor
Found in src/Diagrams/RubiksCube/Model.hs by hlint

Found

(\ upSide' upRows' -> c & upSide .~ upSide' & upRows .~ upRows')
  <$> (traverse f (c ^. upSide))

Perhaps

(\ upSide' upRows' -> c & upSide .~ upSide' & upRows .~ upRows')
  <$> traverse f (c ^. upSide)

Redundant bracket
Open

        arrowOffsets = [(0 ^& 2.1), ((-2.1) ^& 0)]
Severity: Minor
Found in src/Diagrams/RubiksCube/Draw.hs by hlint

Found

[(0 ^& 2.1), ((-2.1) ^& 0)]

Perhaps

[0 ^& 2.1, ((-2.1) ^& 0)]

Redundant bracket
Open

    (\downSide' downRows' -> c & downSide .~ downSide' & downRows .~ downRows')
       <$> (traverse f (c ^. downSide))
Severity: Minor
Found in src/Diagrams/RubiksCube/Model.hs by hlint

Found

(\ downSide' downRows' ->
   c & downSide .~ downSide' & downRows .~ downRows')
  <$> (traverse f (c ^. downSide))

Perhaps

(\ downSide' downRows' ->
   c & downSide .~ downSide' & downRows .~ downRows')
  <$> traverse f (c ^. downSide)

Redundant guard
Open

    go !i c | otherwise = go (i+1) (step c)
Severity: Minor
Found in examples/OrbitLength.hs by hlint

Found

go !i c | otherwise = go (i + 1) (step c)

Perhaps

go !i c = go (i + 1) (step c)

Redundant $
Open

    sides = map snd $ sortBy (compare `on` fst) $
      [ (-dx, r)
      , (dx, l)
      , (-dy, u)
      , (dy, d)
Severity: Minor
Found in src/Diagrams/RubiksCube/Draw.hs by hlint

Found

sortBy (compare `on` fst) $ [(-dx, r), (dx, l), (-dy, u), (dy, d)]

Perhaps

sortBy (compare `on` fst) [(-dx, r), (dx, l), (-dy, u), (dy, d)]

Redundant bracket
Open

        arrowOffsets = [(0 ^& 2.1), ((-2.1) ^& 0)]
Severity: Minor
Found in src/Diagrams/RubiksCube/Draw.hs by hlint

Found

[(0 ^& 2.1), ((-2.1) ^& 0)]

Perhaps

[(0 ^& 2.1), (-2.1) ^& 0]

Avoid lambda
Open

  _3 f (Vec3 a b c) = (\c' -> Vec3 a b c') <$> f c
Severity: Minor
Found in src/Diagrams/RubiksCube/Model.hs by hlint

Found

\ c' -> Vec3 a b c'

Perhaps

Vec3 a b

Redundant bracket
Open

    (\upSide' upRows' -> c & upSide .~ upSide' & upRows .~ upRows')
       <$> (traverse f (c ^. upSide))
       <*> (traverse (traverse f) (c ^. upRows))
Severity: Minor
Found in src/Diagrams/RubiksCube/Model.hs by hlint

Found

(\ upSide' upRows' -> c & upSide .~ upSide' & upRows .~ upRows')
  <$> (traverse f (c ^. upSide))
  <*> (traverse (traverse f) (c ^. upRows))

Perhaps

(\ upSide' upRows' -> c & upSide .~ upSide' & upRows .~ upRows')
  <$> (traverse f (c ^. upSide))
  <*> traverse (traverse f) (c ^. upRows)
Severity
Category
Status
Source
Language