mmagorsc/taskmonad

View on GitHub

Showing 11 of 12 total issues

Unused LANGUAGE pragma
Open

{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances #-}
Severity: Minor
Found in src/TaskMonad/Utils.hs by hlint

Found

{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances,
  FlexibleInstances #-}

Perhaps

{-# LANGUAGE ScopedTypeVariables, FlexibleInstances #-}

Applying this change:

  • Extension TypeSynonymInstances is implied by FlexibleInstances

Reduce duplication
Open

  liftIO $ selectInput dpy
                       win
                       (exposureMask .|. keyPressMask .|. buttonReleaseMask)
Severity: Minor
Found in src/GridSelect/Extras.hs by hlint

Found

liftIO $
  selectInput dpy win
    (exposureMask .|. keyPressMask .|. buttonReleaseMask)
status <- io $
            grabKeyboard dpy win True grabModeAsync grabModeAsync currentTime
io $
  grabPointer dpy win True buttonReleaseMask grabModeAsync
    grabModeAsync
    none
    none
    currentTime
font <- initXMF (gs_font gsconfig)
let screenWidth = toInteger $ rect_width scr
    screenHeight = toInteger $ rect_height scr

Perhaps

Combine with src/GridSelect/Extras.hs:873:5

Reduce duplication
Open

        restriction ss cs =
          (fromInteger ss / fromInteger (cs gsconfig) - 1) / 2 :: Double
Severity: Minor
Found in src/GridSelect/Extras.hs by hlint

Found

restriction ss cs
  = (fromInteger ss / fromInteger (cs gsconfig) - 1) / 2 :: Double
restrictX = floor $ restriction screenWidth gs_cellwidth
restrictY = floor $ restriction screenHeight gs_cellheight
originPosX
  = floor $
      (gs_originFractX gsconfig - (1 / 2)) * 2 * fromIntegral restrictX
originPosY
  = floor $
      (gs_originFractY gsconfig - (1 / 2)) * 2 * fromIntegral restrictY
coords = diamondRestrict restrictX restrictY originPosX originPosY
s = TwoDState{td_curpos = head coords, td_availSlots = coords,
              td_elements = elements, td_gsconfig = gsconfig, td_font = font,
              td_paneX = screenWidth, td_paneY = screenHeight,
              td_drawingWin = win, td_searchString = "", td_elementmap = []}

Perhaps

Combine with src/GridSelect/Extras.hs:893:11

Unused LANGUAGE pragma
Open

{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances #-}
Severity: Minor
Found in src/TaskMonad/GridSelect.hs by hlint

Found

{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances,
  FlexibleInstances #-}

Perhaps

{-# LANGUAGE ScopedTypeVariables, FlexibleInstances #-}

Applying this change:

  • Extension TypeSynonymInstances is implied by FlexibleInstances

Unused LANGUAGE pragma
Open

{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances #-}
Severity: Minor
Found in src/TaskMonad.hs by hlint

Found

{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances,
  FlexibleInstances #-}

Perhaps

{-# LANGUAGE ScopedTypeVariables, FlexibleInstances #-}

Applying this change:

  • Extension TypeSynonymInstances is implied by FlexibleInstances

Unused LANGUAGE pragma
Open

{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances #-}
Severity: Minor
Found in src/TaskMonad/ScratchPad.hs by hlint

Found

{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances,
  FlexibleInstances #-}

Perhaps

{-# LANGUAGE ScopedTypeVariables, FlexibleInstances #-}

Applying this change:

  • Extension TypeSynonymInstances is implied by FlexibleInstances

Unused LANGUAGE pragma
Open

{-# LANGUAGE ScopedTypeVariables, TupleSections, GeneralizedNewtypeDeriving, TypeSynonymInstances, FlexibleInstances #-}
Severity: Minor
Found in src/GridSelect/Extras.hs by hlint

Found

{-# LANGUAGE ScopedTypeVariables, TupleSections,
  GeneralizedNewtypeDeriving, TypeSynonymInstances, FlexibleInstances
  #-}

Perhaps

{-# LANGUAGE ScopedTypeVariables, TupleSections,
  GeneralizedNewtypeDeriving, FlexibleInstances #-}

Applying this change:

  • Extension TypeSynonymInstances is implied by FlexibleInstances

Unused LANGUAGE pragma
Open

{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances #-}
Severity: Minor
Found in src/TaskMonad/Prompt.hs by hlint

Found

{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances,
  FlexibleInstances #-}

Perhaps

{-# LANGUAGE ScopedTypeVariables, FlexibleInstances #-}

Applying this change:

  • Extension TypeSynonymInstances is implied by FlexibleInstances

Reduce duplication
Open

    unmapWindow dpy win
Severity: Minor
Found in src/GridSelect/Extras.hs by hlint

Found

unmapWindow dpy win
destroyWindow dpy win
ungrabPointer dpy currentTime
sync dpy False

Perhaps

Combine with src/GridSelect/Extras.hs:928:7

Reduce duplication
Open

  rootw <- asks theRoot
Severity: Minor
Found in src/GridSelect/Extras.hs by hlint

Found

rootw <- asks theRoot
scr <- gets $ screenRect . W.screenDetail . W.current . windowset
win <- liftIO $
         mkUnmanagedWindow dpy (defaultScreenOfDisplay dpy) rootw
           (rect_x scr)
           (rect_y scr)
           (rect_width scr)
           (rect_height scr)
liftIO $ mapWindow dpy win

Perhaps

Combine with src/GridSelect/Extras.hs:845:5

Reduce duplication
Open

  let cellwidth  = gs_cellwidth gsconfig
Severity: Minor
Found in src/GridSelect/Extras.hs by hlint

Found

cellwidth = gs_cellwidth gsconfig
cellheight = gs_cellheight gsconfig
paneX' = div (paneX - cellwidth) 2
paneY' = div (paneY - cellheight) 2

Perhaps

Combine with src/GridSelect/Extras.hs:955:7
Severity
Category
Status
Source
Language