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

Use qualified import on Data.List #210

Merged
merged 1 commit into from
Feb 9, 2023
Merged
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
6 changes: 3 additions & 3 deletions yaml/src/Data/Yaml/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import qualified Data.ByteString.Builder as BB
import qualified Data.ByteString.Lazy as BL
import Data.ByteString.Builder.Scientific (scientificBuilder)
import Data.Char (toUpper, ord)
import Data.List
import qualified Data.List as List
import Data.Conduit ((.|), ConduitM, runConduit)
import qualified Data.Conduit.List as CL
import qualified Data.HashSet as HashSet
Expand Down Expand Up @@ -314,14 +314,14 @@ parseM mergedKeys a front = do
if s == "<<"
then case o of
Object l -> return (merge l)
Array l -> return $ merge $ foldl' mergeObjects M.empty $ V.toList l
Array l -> return $ merge $ List.foldl' mergeObjects M.empty $ V.toList l
_ -> al
else al
parseM mergedKeys' a al'
where mergeObjects al (Object om) = M.union al om
mergeObjects al _ = al

merge xs = (Set.fromList (M.keys xs \\ M.keys front), M.union front xs)
merge xs = (Set.fromList (M.keys xs List.\\ M.keys front), M.union front xs)

parseSrc :: ReaderT JSONPath (ConduitM Event Void Parse) val
-> ConduitM () Event Parse ()
Expand Down