From 7c29b52da8e1d73b26c74f278cfc66bb0febed16 Mon Sep 17 00:00:00 2001
From: stuebinm <stuebinm@disroot.org>
Date: Thu, 16 Dec 2021 16:12:39 +0100
Subject: [PATCH] fixed some warnings (and disabled others)

So far i've never found an instance of -Wname-shadowing telling me
anything useful, so it's disabled now, and most of the other trivial
ones are fixed.

(I assume this means I'll need -Wname-shadowing in about a day or two to
find some bug ...)
---
 lib/CheckMap.hs | 2 +-
 lib/Paths.hs    | 2 +-
 walint.cabal    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/CheckMap.hs b/lib/CheckMap.hs
index 0fe76ba..ba92d6a 100644
--- a/lib/CheckMap.hs
+++ b/lib/CheckMap.hs
@@ -161,7 +161,7 @@ checkLayerRec config depth layers =
 
 -- human-readable lint output, e.g. for consoles
 instance PrettyPrint (Level, MapResult) where
-  prettyprint (level, mapResult) = if complete == ""
+  prettyprint (_, mapResult) = if complete == ""
     then "  all good!\n" else complete
     where
       complete = T.concat $ prettyGeneral
diff --git a/lib/Paths.hs b/lib/Paths.hs
index 7fae0df..f72874f 100644
--- a/lib/Paths.hs
+++ b/lib/Paths.hs
@@ -71,7 +71,7 @@ isOldStyle (Path _ text frag) = path =~ ("{<.+>*}" :: Text)
           _      -> text
 
 getExtension :: RelPath -> Text
-getExtension (Path _ text frag) = case length splitted of
+getExtension (Path _ text _) = case length splitted of
   0 -> ""
   _ -> last splitted
   where splitted = T.splitOn "." text
diff --git a/walint.cabal b/walint.cabal
index a211aec..b1c06ca 100644
--- a/walint.cabal
+++ b/walint.cabal
@@ -23,7 +23,7 @@ extra-source-files: CHANGELOG.md
 
 library
     default-language: Haskell2010
-    ghc-options: -Wall
+    ghc-options: -Wall -Wno-name-shadowing
     hs-source-dirs: lib
     exposed-modules:
         CheckMap
-- 
GitLab