Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Run hlint #202

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,19 @@ jobs:
enable-stack: true
stack-version: 'latest'
stack-no-global: true

- name: 'Set up HLint'
uses: haskell-actions/hlint-setup@v2

- name: 'Run HLint'
uses: haskell-actions/hlint-run@v2
with:
path: xml-conduit/src/
# fail-on: warning

- name: Build and run tests
shell: bash
run: |
set -ex
# stack upgrade --force-download
stack --version
stack test --fast --no-terminal --resolver=${{ matrix.resolver }}
2 changes: 1 addition & 1 deletion xml-conduit/src/Text/XML.hs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ fromEvents = do
d <- D.fromEvents
either (lift . throwM . UnresolvedEntityException) return $ fromXMLDocument d

data UnresolvedEntityException = UnresolvedEntityException (Set Text)
newtype UnresolvedEntityException = UnresolvedEntityException (Set Text)
deriving (Show, Typeable)
instance Exception UnresolvedEntityException

Expand Down
2 changes: 1 addition & 1 deletion xml-conduit/src/Text/XML/Cursor.hs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ laxAttribute n c =
case node c of
NodeElement e -> do
(n', v) <- Map.toList $ elementAttributes e
guard $ (on (==) T.toCaseFold) n (nameLocalName n')
guard $ on (==) T.toCaseFold n (nameLocalName n')
return v
_ -> []

Expand Down
2 changes: 1 addition & 1 deletion xml-conduit/src/Text/XML/Stream/Parse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1151,8 +1151,8 @@
newtype AttrParser a = AttrParser { runAttrParser :: [(Name, [Content])] -> Either SomeException ([(Name, [Content])], a) }

instance Monad AttrParser where
(AttrParser f) >>= g = AttrParser $ \as ->

Check warning on line 1154 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-16)

Suggestion in module Text.XML.Stream.Parse: Use <=< ▫︎ Found: "\\ as -> (\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "((\\ (as', f') -> runAttrParser (g f') as') Control.Monad.<=< f)"

Check warning on line 1154 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-18)

Suggestion in module Text.XML.Stream.Parse: Use <=< ▫︎ Found: "\\ as -> (\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "((\\ (as', f') -> runAttrParser (g f') as') Control.Monad.<=< f)"

Check warning on line 1154 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-14)

Suggestion in module Text.XML.Stream.Parse: Use <=< ▫︎ Found: "\\ as -> (\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "((\\ (as', f') -> runAttrParser (g f') as') Control.Monad.<=< f)"

Check warning on line 1154 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-20)

Suggestion in module Text.XML.Stream.Parse: Use <=< ▫︎ Found: "\\ as -> (\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "((\\ (as', f') -> runAttrParser (g f') as') Control.Monad.<=< f)"

Check warning on line 1154 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-22)

Suggestion in module Text.XML.Stream.Parse: Use <=< ▫︎ Found: "\\ as -> (\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "((\\ (as', f') -> runAttrParser (g f') as') Control.Monad.<=< f)"

Check warning on line 1154 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-23)

Suggestion in module Text.XML.Stream.Parse: Use <=< ▫︎ Found: "\\ as -> (\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "((\\ (as', f') -> runAttrParser (g f') as') Control.Monad.<=< f)"

Check warning on line 1154 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Suggestion in module Text.XML.Stream.Parse: Use <=< ▫︎ Found: "\\ as -> (\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "((\\ (as', f') -> runAttrParser (g f') as') Control.Monad.<=< f)"

Check warning on line 1154 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-14)

Suggestion in module Text.XML.Stream.Parse: Use <=< ▫︎ Found: "\\ as -> (\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "((\\ (as', f') -> runAttrParser (g f') as') Control.Monad.<=< f)"

Check warning on line 1154 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-16)

Suggestion in module Text.XML.Stream.Parse: Use <=< ▫︎ Found: "\\ as -> (\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "((\\ (as', f') -> runAttrParser (g f') as') Control.Monad.<=< f)"

Check warning on line 1154 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-22)

Suggestion in module Text.XML.Stream.Parse: Use <=< ▫︎ Found: "\\ as -> (\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "((\\ (as', f') -> runAttrParser (g f') as') Control.Monad.<=< f)"

Check warning on line 1154 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-20)

Suggestion in module Text.XML.Stream.Parse: Use <=< ▫︎ Found: "\\ as -> (\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "((\\ (as', f') -> runAttrParser (g f') as') Control.Monad.<=< f)"

Check warning on line 1154 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-18)

Suggestion in module Text.XML.Stream.Parse: Use <=< ▫︎ Found: "\\ as -> (\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "((\\ (as', f') -> runAttrParser (g f') as') Control.Monad.<=< f)"

Check warning on line 1154 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-23)

Suggestion in module Text.XML.Stream.Parse: Use <=< ▫︎ Found: "\\ as -> (\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "((\\ (as', f') -> runAttrParser (g f') as') Control.Monad.<=< f)"

Check warning on line 1154 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Suggestion in module Text.XML.Stream.Parse: Use <=< ▫︎ Found: "\\ as -> (\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "((\\ (as', f') -> runAttrParser (g f') as') Control.Monad.<=< f)"
either Left (\(as', f') -> runAttrParser (g f') as') (f as)
(\(as', f') -> runAttrParser (g f') as') =<< (f as)

Check warning on line 1155 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-16)

Suggestion in module Text.XML.Stream.Parse: Redundant bracket ▫︎ Found: "(\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "(\\ (as', f') -> runAttrParser (g f') as') =<< f as"

Check warning on line 1155 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-18)

Suggestion in module Text.XML.Stream.Parse: Redundant bracket ▫︎ Found: "(\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "(\\ (as', f') -> runAttrParser (g f') as') =<< f as"

Check warning on line 1155 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-14)

Suggestion in module Text.XML.Stream.Parse: Redundant bracket ▫︎ Found: "(\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "(\\ (as', f') -> runAttrParser (g f') as') =<< f as"

Check warning on line 1155 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-20)

Suggestion in module Text.XML.Stream.Parse: Redundant bracket ▫︎ Found: "(\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "(\\ (as', f') -> runAttrParser (g f') as') =<< f as"

Check warning on line 1155 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-22)

Suggestion in module Text.XML.Stream.Parse: Redundant bracket ▫︎ Found: "(\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "(\\ (as', f') -> runAttrParser (g f') as') =<< f as"

Check warning on line 1155 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-23)

Suggestion in module Text.XML.Stream.Parse: Redundant bracket ▫︎ Found: "(\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "(\\ (as', f') -> runAttrParser (g f') as') =<< f as"

Check warning on line 1155 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Suggestion in module Text.XML.Stream.Parse: Redundant bracket ▫︎ Found: "(\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "(\\ (as', f') -> runAttrParser (g f') as') =<< f as"

Check warning on line 1155 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-14)

Suggestion in module Text.XML.Stream.Parse: Redundant bracket ▫︎ Found: "(\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "(\\ (as', f') -> runAttrParser (g f') as') =<< f as"

Check warning on line 1155 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-16)

Suggestion in module Text.XML.Stream.Parse: Redundant bracket ▫︎ Found: "(\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "(\\ (as', f') -> runAttrParser (g f') as') =<< f as"

Check warning on line 1155 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-22)

Suggestion in module Text.XML.Stream.Parse: Redundant bracket ▫︎ Found: "(\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "(\\ (as', f') -> runAttrParser (g f') as') =<< f as"

Check warning on line 1155 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-20)

Suggestion in module Text.XML.Stream.Parse: Redundant bracket ▫︎ Found: "(\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "(\\ (as', f') -> runAttrParser (g f') as') =<< f as"

Check warning on line 1155 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-18)

Suggestion in module Text.XML.Stream.Parse: Redundant bracket ▫︎ Found: "(\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "(\\ (as', f') -> runAttrParser (g f') as') =<< f as"

Check warning on line 1155 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-23)

Suggestion in module Text.XML.Stream.Parse: Redundant bracket ▫︎ Found: "(\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "(\\ (as', f') -> runAttrParser (g f') as') =<< f as"

Check warning on line 1155 in xml-conduit/src/Text/XML/Stream/Parse.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Suggestion in module Text.XML.Stream.Parse: Redundant bracket ▫︎ Found: "(\\ (as', f') -> runAttrParser (g f') as') =<< (f as)" ▫︎ Perhaps: "(\\ (as', f') -> runAttrParser (g f') as') =<< f as"
instance Functor AttrParser where
fmap = liftM
instance Applicative AttrParser where
Expand Down
2 changes: 1 addition & 1 deletion xml-conduit/src/Text/XML/Stream/Render/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ content :: (Monad m) => Text -> ConduitT i Event m ()
content = yield . EventContent . ContentText

-- | A list of attributes.
data Attributes = Attributes [(Name, [Content])]
newtype Attributes = Attributes [(Name, [Content])]

instance Monoid Attributes where
mempty = Attributes mempty
Expand Down
8 changes: 4 additions & 4 deletions xml-conduit/src/Text/XML/Stream/Token.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
foldAttrs
(if indent == 0 || lessThan3 attrs
then oneSpace
else mconcat $ ("\n" : replicate indent " "))
else mconcat ("\n" : replicate indent " "))
attrs <>
(if isEmpty then "/>" else ">")
where
Expand Down Expand Up @@ -101,13 +101,13 @@
{-# INLINE charUtf8XmlEscaped #-}
charUtf8XmlEscaped :: EscapeContext -> E.BoundedPrim Word8
charUtf8XmlEscaped ec =
(condB (> _gt) (E.liftFixedToBounded E.word8)) $
(condB (== _lt) (fixed4 (_am,(_l,(_t,_sc))))) $ -- &lt;
condB (> _gt) (E.liftFixedToBounded E.word8) $
condB (== _lt) (fixed4 (_am,(_l,(_t,_sc)))) $ -- &lt;
escapeFor ECContent (condB (== _gt) (fixed4 (_am,(_g,(_t,_sc))))) $ -- &gt;
(condB (== _am) (fixed5 (_am,(_a,(_m,(_p,_sc)))))) $ -- &amp;
condB (== _am) (fixed5 (_am,(_a,(_m,(_p,_sc))))) $ -- &amp;
escapeFor ECDoubleArg (condB (== _dq) (fixed6 (_am,(_q,(_u,(_o,(_t,_sc))))))) $ -- &quot;
escapeFor ECSingleArg (condB (== _sq) (fixed6 (_am,(_a,(_p,(_o,(_s,_sc))))))) $ -- &apos;

Check warning on line 109 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-16)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant $ ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n (E.liftFixedToBounded E.word8)"

Check warning on line 109 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-18)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant $ ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n (E.liftFixedToBounded E.word8)"

Check warning on line 109 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-14)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant $ ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n (E.liftFixedToBounded E.word8)"

Check warning on line 109 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-20)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant $ ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n (E.liftFixedToBounded E.word8)"

Check warning on line 109 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-22)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant $ ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n (E.liftFixedToBounded E.word8)"

Check warning on line 109 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-23)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant $ ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n (E.liftFixedToBounded E.word8)"

Check warning on line 109 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant $ ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n (E.liftFixedToBounded E.word8)"

Check warning on line 109 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-14)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant $ ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n (E.liftFixedToBounded E.word8)"

Check warning on line 109 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-16)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant $ ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n (E.liftFixedToBounded E.word8)"

Check warning on line 109 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-22)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant $ ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n (E.liftFixedToBounded E.word8)"

Check warning on line 109 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-20)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant $ ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n (E.liftFixedToBounded E.word8)"

Check warning on line 109 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-18)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant $ ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n (E.liftFixedToBounded E.word8)"

Check warning on line 109 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-23)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant $ ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n (E.liftFixedToBounded E.word8)"

Check warning on line 109 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant $ ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n (E.liftFixedToBounded E.word8)"
(E.liftFixedToBounded E.word8) -- fallback for Chars smaller than '>'

Check warning on line 110 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-16)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant bracket ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ E.liftFixedToBounded E.word8"

Check warning on line 110 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-18)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant bracket ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ E.liftFixedToBounded E.word8"

Check warning on line 110 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-14)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant bracket ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ E.liftFixedToBounded E.word8"

Check warning on line 110 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-20)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant bracket ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ E.liftFixedToBounded E.word8"

Check warning on line 110 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-22)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant bracket ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ E.liftFixedToBounded E.word8"

Check warning on line 110 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, lts-23)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant bracket ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ E.liftFixedToBounded E.word8"

Check warning on line 110 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant bracket ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ E.liftFixedToBounded E.word8"

Check warning on line 110 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-14)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant bracket ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ E.liftFixedToBounded E.word8"

Check warning on line 110 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-16)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant bracket ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ E.liftFixedToBounded E.word8"

Check warning on line 110 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-22)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant bracket ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ E.liftFixedToBounded E.word8"

Check warning on line 110 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-20)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant bracket ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ E.liftFixedToBounded E.word8"

Check warning on line 110 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-18)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant bracket ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ E.liftFixedToBounded E.word8"

Check warning on line 110 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, lts-23)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant bracket ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ E.liftFixedToBounded E.word8"

Check warning on line 110 in xml-conduit/src/Text/XML/Stream/Token.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Suggestion in charUtf8XmlEscaped in module Text.XML.Stream.Token: Redundant bracket ▫︎ Found: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ (E.liftFixedToBounded E.word8)" ▫︎ Perhaps: "escapeFor\n ECSingleArg\n (condB (== _sq) (fixed6 (_am, (_a, (_p, (_o, (_s, _sc)))))))\n $ E.liftFixedToBounded E.word8"
where
_gt = 62 -- >
_lt = 60 -- <
Expand Down
2 changes: 1 addition & 1 deletion xml-conduit/src/Text/XML/Unresolved.hs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ elementFromEvents = goE
goN = do
x <- CL.peek
case x of
Just (_, EventBeginElement n as) -> (Just . NodeElement) <$> goE' n as
Just (_, EventBeginElement n as) -> Just . NodeElement <$> goE' n as
Just (_, EventInstruction i) -> dropReturn $ Just $ NodeInstruction i
Just (_, EventContent c) -> dropReturn $ Just $ NodeContent c
Just (_, EventComment t) -> dropReturn $ Just $ NodeComment t
Expand Down
Loading