summaryrefslogtreecommitdiff
path: root/lib/Uris.hs
diff options
context:
space:
mode:
authorstuebinm2021-12-29 04:49:46 +0100
committerstuebinm2021-12-29 04:56:19 +0100
commit0419aa9918723c8b74252bf6ff1a2162c2f3a89a (patch)
tree6c793ecd95e1653024f4cb73675ab2a400c7221c /lib/Uris.hs
parent436a7dbb734f58a254bed6c9d28908033b537bf8 (diff)
maps, maps, and yet more maps
don't add maps to the result if their lint result looks the same as that of another list, just say it happened several times instead (this leads to a rather confusing Eq instance for MapResult which implements a very simple surface-level equality — perhaps change that later)
Diffstat (limited to 'lib/Uris.hs')
-rw-r--r--lib/Uris.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Uris.hs b/lib/Uris.hs
index 5c2ad05..6436ac6 100644
--- a/lib/Uris.hs
+++ b/lib/Uris.hs
@@ -22,9 +22,9 @@ import Data.Text (Text, pack)
import qualified Data.Text as T
import GHC.Generics (Generic)
import GHC.TypeLits (KnownSymbol, symbolVal)
+import Network.URI.Encode as URI
import Text.Regex.TDFA ((=~))
-import Witherable (mapMaybe)
-import Network.URI.Encode as URI
+import Witherable (mapMaybe)
data Substitution =
Prefixed { prefix :: Text, blocked :: [Text], allowed :: [Text], scope :: [String] }
@@ -82,7 +82,7 @@ applySubsts s substs uri = do
[] -> Left (SchemaDoesNotExist schema)
results@(_:_) -> case mapMaybe rightToMaybe results of
suc:_ -> Right suc
- _ -> minimum results
+ _ -> minimum results
where
note = maybeToRight