Configuration is affected by the following files:
- cabal.project
- cabal.project.freeze
- cabal.project.local
app/Main.hs:22:1: warning: [GHC-66111] [-Wunused-imports]
The import of ‘Control.Applicative’ is redundant
except perhaps to import instances from ‘Control.Applicative’
To import instances alone, use: import Control.Applicative()
|
22 | import Control.Applicative
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
app/Main.hs:23:1: warning: [GHC-66111] [-Wunused-imports]
The import of ‘Control.Arrow’ is redundant
except perhaps to import instances from ‘Control.Arrow’
To import instances alone, use: import Control.Arrow()
|
23 | import Control.Arrow
| ^^^^^^^^^^^^^^^^^^^^
app/Main.hs:25:1: warning: [GHC-66111] [-Wunused-imports]
The import of ‘Control.Monad.Extra’ is redundant
except perhaps to import instances from ‘Control.Monad.Extra’
To import instances alone, use: import Control.Monad.Extra()
|
25 | import Control.Monad.Extra
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
app/Main.hs:29:1: warning: [GHC-66111] [-Wunused-imports]
The import of ‘Data.Bits’ is redundant
except perhaps to import instances from ‘Data.Bits’
To import instances alone, use: import Data.Bits()
|
29 | import Data.Bits
| ^^^^^^^^^^^^^^^^
app/Main.hs:30:1: warning: [GHC-66111] [-Wunused-imports]
The import of ‘Data.Char’ is redundant
except perhaps to import instances from ‘Data.Char’
To import instances alone, use: import Data.Char()
|
30 | import Data.Char
| ^^^^^^^^^^^^^^^^
app/Main.hs:32:1: warning: [GHC-66111] [-Wunused-imports]
The import of ‘Data.Tuple.Extra’ is redundant
except perhaps to import instances from ‘Data.Tuple.Extra’
To import instances alone, use: import Data.Tuple.Extra()
|
32 | import Data.Tuple.Extra hiding ( (&&&), (***) )
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/Main.hs:36:1: warning: [GHC-66111] [-Wunused-imports]
The import of ‘Data.Either’ is redundant
except perhaps to import instances from ‘Data.Either’
To import instances alone, use: import Data.Either()
|
36 | import Data.Either
| ^^^^^^^^^^^^^^^^^^
app/Main.hs:37:1: warning: [GHC-66111] [-Wunused-imports]
The import of ‘Data.Function’ is redundant
except perhaps to import instances from ‘Data.Function’
To import instances alone, use: import Data.Function()
|
37 | import Data.Function
| ^^^^^^^^^^^^^^^^^^^^
app/Main.hs:39:1: warning: [GHC-66111] [-Wunused-imports]
The qualified import of ‘Data.Set’ is redundant
except perhaps to import instances from ‘Data.Set’
To import instances alone, use: import Data.Set()
|
39 | import qualified Data.Set as Set
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/Main.hs:40:1: warning: [GHC-66111] [-Wunused-imports]
The qualified import of ‘Data.IntSet’ is redundant
except perhaps to import instances from ‘Data.IntSet’
To import instances alone, use: import Data.IntSet()
|
40 | import qualified Data.IntSet as ISet
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/Main.hs:41:1: warning: [GHC-66111] [-Wunused-imports]
The qualified import of ‘Data.Map’ is redundant
except perhaps to import instances from ‘Data.Map’
To import instances alone, use: import Data.Map()
|
41 | import qualified Data.Map as Map
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/Main.hs:42:1: warning: [GHC-66111] [-Wunused-imports]
The qualified import of ‘Data.IntMap’ is redundant
except perhaps to import instances from ‘Data.IntMap’
To import instances alone, use: import Data.IntMap()
|
42 | import qualified Data.IntMap as IMap
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/Main.hs:43:1: warning: [GHC-66111] [-Wunused-imports]
The qualified import of ‘Data.Sequence’ is redundant
except perhaps to import instances from ‘Data.Sequence’
To import instances alone, use: import Data.Sequence()
|
43 | import qualified Data.Sequence as Seq
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/Main.hs:44:1: warning: [GHC-66111] [-Wunused-imports]
The import of ‘Data.Sequence’ is redundant
except perhaps to import instances from ‘Data.Sequence’
To import instances alone, use: import Data.Sequence()
|
44 | import Data.Sequence ( (<|), (|>), (><), ViewL(..), ViewR(..) )
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/Main.hs:50:1: warning: [GHC-66111] [-Wunused-imports]
The import of ‘Data.Array.MArray’ is redundant
except perhaps to import instances from ‘Data.Array.MArray’
To import instances alone, use: import Data.Array.MArray()
|
50 | import Data.Array.MArray
| ^^^^^^^^^^^^^^^^^^^^^^^^
app/Main.hs:51:1: warning: [GHC-66111] [-Wunused-imports]
The import of ‘Data.STRef’ is redundant
except perhaps to import instances from ‘Data.STRef’
To import instances alone, use: import Data.STRef()
|
51 | import Data.STRef
| ^^^^^^^^^^^^^^^^^
app/Main.hs:53:1: warning: [GHC-66111] [-Wunused-imports]
The import of ‘Text.Printf’ is redundant
except perhaps to import instances from ‘Text.Printf’
To import instances alone, use: import Text.Printf()
|
53 | import Text.Printf
| ^^^^^^^^^^^^^^^^^^
app/Main.hs:54:1: warning: [GHC-66111] [-Wunused-imports]
The import of ‘Debug.Trace’ is redundant
except perhaps to import instances from ‘Debug.Trace’
To import instances alone, use: import Debug.Trace()
|
54 | import Debug.Trace
| ^^^^^^^^^^^^^^^^^^
app/Main.hs:56:1: warning: [GHC-66111] [-Wunused-imports]
The qualified import of ‘Data.Vector’ is redundant
except perhaps to import instances from ‘Data.Vector’
To import instances alone, use: import Data.Vector()
|
56 | import qualified Data.Vector as V
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/Main.hs:61:1: warning: [GHC-38417] [-Wmissing-signatures]
Top-level binding with no type signature: readInt :: IO Int
|
61 | readInt = fst . fromJust . B.readInt <$> B.getLine
| ^^^^^^^
app/Main.hs:61:1: warning: [GHC-40910] [-Wunused-top-binds]
Defined but not used: ‘readInt’
|
61 | readInt = fst . fromJust . B.readInt <$> B.getLine
| ^^^^^^^
app/Main.hs:62:1: warning: [GHC-38417] [-Wmissing-signatures]
Top-level binding with no type signature: readInteger :: IO Integer
|
62 | readInteger = fst . fromJust . B.readInteger <$> B.getLine
| ^^^^^^^^^^^
app/Main.hs:62:1: warning: [GHC-40910] [-Wunused-top-binds]
Defined but not used: ‘readInteger’
|
62 | readInteger = fst . fromJust . B.readInteger <$> B.getLine
| ^^^^^^^^^^^
app/Main.hs:63:1: warning: [GHC-38417] [-Wmissing-signatures]
Top-level binding with no type signature: readInts :: IO [Int]
|
63 | readInts = map ( fst . fromJust . B.readInt ) . B.words <$> B.getLine
| ^^^^^^^^
app/Main.hs:64:1: warning: [GHC-38417] [-Wmissing-signatures]
Top-level binding with no type signature:
readIntegers :: IO [Integer]
|
64 | readIntegers = map ( fst . fromJust . B.readInteger ) . B.words <$> B.getLine
| ^^^^^^^^^^^^
app/Main.hs:64:1: warning: [GHC-40910] [-Wunused-top-binds]
Defined but not used: ‘readIntegers’
|
64 | readIntegers = map ( fst . fromJust . B.readInteger ) . B.words <$> B.getLine
| ^^^^^^^^^^^^
app/Main.hs:65:1: warning: [GHC-38417] [-Wmissing-signatures]
Top-level binding with no type signature: readStr :: IO String
|
65 | readStr = trim . B.unpack <$> B.getLine
| ^^^^^^^
app/Main.hs:65:1: warning: [GHC-40910] [-Wunused-top-binds]
Defined but not used: ‘readStr’
|
65 | readStr = trim . B.unpack <$> B.getLine
| ^^^^^^^
app/Main.hs:66:1: warning: [GHC-38417] [-Wmissing-signatures]
Top-level binding with no type signature: readStrs :: IO [[Char]]
|
66 | readStrs = map B.unpack . B.words <$> B.getLine
| ^^^^^^^^
app/Main.hs:66:1: warning: [GHC-40910] [-Wunused-top-binds]
Defined but not used: ‘readStrs’
|
66 | readStrs = map B.unpack . B.words <$> B.getLine
| ^^^^^^^^
app/Main.hs:68:1: warning: [GHC-38417] [-Wmissing-signatures]
Top-level binding with no type signature: yesno :: Bool -> String
|
68 | yesno = bool "No" "Yes"
| ^^^^^
app/Main.hs:68:1: warning: [GHC-40910] [-Wunused-top-binds]
Defined but not used: ‘yesno’
|
68 | yesno = bool "No" "Yes"
| ^^^^^
app/Main.hs:68:14: warning: [GHC-18042] [-Wtype-defaults]
• Defaulting the type variable ‘a0’ to type ‘String’ in the following constraint
Data.String.IsString a0 arising from the literal ‘"No"’
• In the first argument of ‘bool’, namely ‘"No"’
In the expression: bool "No" "Yes"
In an equation for ‘yesno’: yesno = bool "No" "Yes"
|
68 | yesno = bool "No" "Yes"
| ^^^^
app/Main.hs:69:1: warning: [GHC-38417] [-Wmissing-signatures]
Top-level binding with no type signature: mp :: [b] -> (b, b)
|
69 | mp [ a, b ] = ( a, b )
| ^^
app/Main.hs:69:1: warning: [GHC-40910] [-Wunused-top-binds]
Defined but not used: ‘mp’
|
69 | mp [ a, b ] = ( a, b )
| ^^
app/Main.hs:69:1: warning: [GHC-62161] [-Wincomplete-patterns]
Pattern match(es) are non-exhaustive
In an equation for ‘mp’:
Patterns of type ‘[b]’ not matched:
[]
[_]
(_:_:_:_)
|
69 | mp [ a, b ] = ( a, b )
| ^^^^^^^^^^^^^^^^^^^^^^
app/Main.hs:71:1: warning: [GHC-38417] [-Wmissing-signatures]
Top-level binding with no type signature:
count :: Eq a => a -> [a] -> Int
|
71 | count a as = length $ filter ( == a ) as
| ^^^^^
app/Main.hs:71:1: warning: [GHC-40910] [-Wunused-top-binds]
Defined but not used: ‘count’
|
71 | count a as = length $ filter ( == a ) as
| ^^^^^
app/Main.hs:72:1: warning: [GHC-38417] [-Wmissing-signatures]
Top-level binding with no type signature:
countIf :: (a -> Bool) -> [a] -> Int
|
72 | countIf f as = length $ filter f as
| ^^^^^^^
app/Main.hs:72:1: warning: [GHC-40910] [-Wunused-top-binds]
Defined but not used: ‘countIf’
|
72 | countIf f as = length $ filter f as
| ^^^^^^^
app/Main.hs:74:1: warning: [GHC-38417] [-Wmissing-signatures]
Top-level binding with no type signature:
swapArrayElem :: (MArray a e m, Ix i) => a i e -> i -> i -> m ()
|
74 | swapArrayElem a i j = do
| ^^^^^^^^^^^^^
app/Main.hs:74:1: warning: [GHC-40910] [-Wunused-top-binds]
Defined but not used: ‘swapArrayElem’
|
74 | swapArrayElem a i j = do
| ^^^^^^^^^^^^^
app/Main.hs:80:3: warning: [GHC-38417] [-Wmissing-signatures]
Top-level binding with no type signature:
(!?) :: Ix i => Array i a -> i -> Maybe a
|
80 | a !? i
| ^^
app/Main.hs:80:3: warning: [GHC-40910] [-Wunused-top-binds]
Defined but not used: ‘!?’
|
80 | a !? i
| ^^
app/Main.hs:85:1: warning: [GHC-40910] [-Wunused-top-binds]
Defined but not used: ‘printList’
|
85 | printList = putStrLn . intercalate " " . map show
| ^^^^^^^^^
app/Main.hs:87:1: warning: [GHC-38417] [-Wmissing-signatures]
Top-level binding with no type signature: main :: IO ()
|
87 | main = do
| ^^^^
app/Main.hs:92:23: warning: [GHC-63397] [-Wname-shadowing]
This binding for ‘ps’ shadows the existing binding
bound at app/Main.hs:89:11
|
92 | solve ps vs = runST do
| ^^
app/Main.hs:92:26: warning: [GHC-63397] [-Wname-shadowing]
This binding for ‘vs’ shadows the existing binding
bound at app/Main.hs:89:15
|
92 | solve ps vs = runST do
| ^^
Configuration is affected by the following files:
- cabal.project
- cabal.project.freeze
- cabal.project.local