Cleanup some compiler warnings

This commit is contained in:
2024-10-22 10:33:14 +01:00
parent e2330618f2
commit c0b1092fb6
6 changed files with 155 additions and 190 deletions
+46 -94
View File
@@ -1,97 +1,3 @@
/home/justin/Haskell/loop/src/Dodge/Placement/PlaceSpot.hs:159:5-30: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding: Patterns of type [Point2] not matched: []
|
159 | (p : ps) = orderPolygon qs
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Update.hs:319:30-33: warning: [-Wunused-matches]
Defined but not used: ssel
|
319 | Just (MouseInvChosen ssel esel) -> w
| ^^^^
/home/justin/Haskell/loop/src/Dodge/Update.hs:319:35-38: warning: [-Wunused-matches]
Defined but not used: esel
|
319 | Just (MouseInvChosen ssel esel) -> w
| ^^^^
/home/justin/Haskell/loop/src/Dodge/Update.hs:341:38: warning: [-Wunused-matches]
Defined but not used: k
|
341 | shiftInvItemsUp (_,i) (_,j) (Just (_,k)) w = w
| ^
/home/justin/Haskell/loop/src/Dodge/Update.hs:351:40: warning: [-Wunused-matches]
Defined but not used: k
|
351 | shiftInvItemsDown (_,i) (_,j) (Just (_,k)) w = w
| ^
/home/justin/Haskell/loop/src/Dodge/Room/RezBox.hs:54:22: warning: [GHC-47082] [-Woperator-whitespace-ext-conflict]
The prefix use of a $ would denote an untyped splice
were the TemplateHaskell extension enabled.
Suggested fix: Add whitespace after the $.
|
54 | shuffleLinks $(roomRectAutoLinks w h){_rmPmnts = []}
| ^
/home/justin/Haskell/loop/src/Dodge/Room/RezBox.hs:120:44: warning: [GHC-47082] [-Woperator-whitespace-ext-conflict]
The prefix use of a $ would denote an untyped splice
were the TemplateHaskell extension enabled.
Suggested fix: Add whitespace after the $.
|
120 | let n = length $ filter bottomEdgeTest $_rmLinks centralRoom
| ^
/home/justin/Haskell/loop/src/Dodge/Room/RezBox.hs:122:29: warning: [GHC-47082] [-Woperator-whitespace-ext-conflict]
The prefix use of a $ would denote an untyped splice
were the TemplateHaskell extension enabled.
Suggested fix: Add whitespace after the $.
|
122 | tToBTree "rezBoxes" $treeFromTrunk [rezBox thecol, door] $
| ^
/home/justin/Haskell/loop/src/Dodge/HeldUse.hs:177:5-59: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding:
Patterns of type ([Float], StdGen) not matched:
([], _)
([_], _)
([_, _], _)
([_, _, _], _)
|
177 | (a : b : c : d : _, g) = runState thestate $ _randGen w -- randomRs (2, 20) (_randGen w)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/RandomHelp.hs:36:9-35: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding:
Patterns of type ([a], [a]) not matched: (_, [])
|
36 | let (zs, w : ws) = splitAt i ys
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/RandomHelp.hs:51:17-46: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding:
Patterns of type ([b], [b]) not matched: (_, [])
|
51 | let (as, b : bs) = splitAt rand ys
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Multiset.hs:50:9: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding: Patterns of type [a] not matched: []
|
50 | (q:qs) = take (n-k+1) ys
| ^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Render/Connectors.hs:41:5: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding:
Patterns of type (Maybe Float, Maybe Float) not matched:
(Nothing, _)
((Just _), Nothing)
|
41 | (Just ymin,Just ymax) = minAndMax $ y : map (^._y) sps
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Particle/Draw.hs:15:5: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding:
Patterns of type [Geometry.Data.Point2] not matched: []
|
15 | (sp : ps) = _lzPoints pt
| ^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Polyhedra.hs:68:5: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding:
@@ -142,6 +48,31 @@
|
302 | (x : xs) = w ^. wCam . camBoundBox
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/RandomHelp.hs:36:9: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding:
Patterns of type ([a], [a]) not matched: (_, [])
|
36 | let (zs, w : ws) = splitAt i ys
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/RandomHelp.hs:51:17: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding:
Patterns of type ([b], [b]) not matched: (_, [])
|
51 | let (as, b : bs) = splitAt rand ys
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/HeldUse.hs:177:5: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding:
Patterns of type ([Float], StdGen) not matched:
([], _)
([_], _)
([_, _], _)
([_, _, _], _)
|
177 | (a : b : c : d : _, g) = runState thestate $ _randGen w -- randomRs (2, 20) (_randGen w)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Tile.hs:36:5: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding:
@@ -151,3 +82,24 @@
|
36 | (c:d:_) = poly
| ^^^^^^^^^^^^^^
/home/justin/Haskell/loop/src/Dodge/Room/RezBox.hs:54:22: warning: [GHC-47082] [-Woperator-whitespace-ext-conflict]
The prefix use of a $ would denote an untyped splice
were the TemplateHaskell extension enabled.
Suggested fix: Add whitespace after the $.
|
54 | shuffleLinks $(roomRectAutoLinks w h){_rmPmnts = []}
| ^
/home/justin/Haskell/loop/src/Dodge/Room/RezBox.hs:120:44: warning: [GHC-47082] [-Woperator-whitespace-ext-conflict]
The prefix use of a $ would denote an untyped splice
were the TemplateHaskell extension enabled.
Suggested fix: Add whitespace after the $.
|
120 | let n = length $ filter bottomEdgeTest $_rmLinks centralRoom
| ^
/home/justin/Haskell/loop/src/Dodge/Room/RezBox.hs:122:29: warning: [GHC-47082] [-Woperator-whitespace-ext-conflict]
The prefix use of a $ would denote an untyped splice
were the TemplateHaskell extension enabled.
Suggested fix: Add whitespace after the $.
|
122 | tToBTree "rezBoxes" $treeFromTrunk [rezBox thecol, door] $
| ^