diff options
author | Volpeon <github@volpeon.ink> | 2023-06-24 08:58:22 +0200 |
---|---|---|
committer | Volpeon <github@volpeon.ink> | 2023-06-24 08:58:22 +0200 |
commit | b19440a4a30828f12f8eafaa7292152ecf733334 (patch) | |
tree | 00210fae1f860d76bb5319d10167d744c5d4037d /src/Data/JLD/Flattening | |
parent | Small code optimization (diff) | |
download | hs-jsonld-b19440a4a30828f12f8eafaa7292152ecf733334.tar.gz hs-jsonld-b19440a4a30828f12f8eafaa7292152ecf733334.tar.bz2 hs-jsonld-b19440a4a30828f12f8eafaa7292152ecf733334.zip |
WIP: Compaction
Diffstat (limited to 'src/Data/JLD/Flattening')
-rw-r--r-- | src/Data/JLD/Flattening/NodeMap.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Data/JLD/Flattening/NodeMap.hs b/src/Data/JLD/Flattening/NodeMap.hs index 06af2d4..ef09757 100644 --- a/src/Data/JLD/Flattening/NodeMap.hs +++ b/src/Data/JLD/Flattening/NodeMap.hs | |||
@@ -18,7 +18,7 @@ import Data.Aeson.Key qualified as K (toText) | |||
18 | import Data.Aeson.KeyMap qualified as KM (filterWithKey, insert, lookup, member, singleton) | 18 | import Data.Aeson.KeyMap qualified as KM (filterWithKey, insert, lookup, member, singleton) |
19 | import Data.Foldable.WithIndex (FoldableWithIndex (..), iforM_) | 19 | import Data.Foldable.WithIndex (FoldableWithIndex (..), iforM_) |
20 | import Data.Map.Strict qualified as M (insert, lookup) | 20 | import Data.Map.Strict qualified as M (insert, lookup) |
21 | import Data.Vector qualified as V (singleton, snoc, uniq) | 21 | import Data.Vector qualified as V (snoc, uniq) |
22 | 22 | ||
23 | type BNMT e m = REST BNMEnv (Either (JLDError e) ()) BNMState m | 23 | type BNMT e m = REST BNMEnv (Either (JLDError e) ()) BNMState m |
24 | 24 | ||
@@ -133,7 +133,7 @@ buildNodeMap' element = case element of | |||
133 | N.insert bnmEnvActiveGraph bnmEnvActiveSubject bnmEnvActiveProperty (Array <| V.snoc activePropertyValue element) nodeMap | 133 | N.insert bnmEnvActiveGraph bnmEnvActiveSubject bnmEnvActiveProperty (Array <| V.snoc activePropertyValue element) nodeMap |
134 | | otherwise -> nodeMap | 134 | | otherwise -> nodeMap |
135 | -- 4.2.2 | 135 | -- 4.2.2 |
136 | _ -> N.insert bnmEnvActiveGraph bnmEnvActiveSubject bnmEnvActiveProperty (Array <| V.singleton element) nodeMap | 136 | _ -> N.insert bnmEnvActiveGraph bnmEnvActiveSubject bnmEnvActiveProperty (Array <| pure element) nodeMap |
137 | -- 4.2. | 137 | -- 4.2. |
138 | Just list -> bnmModifyList <. const <. Just <| V.snoc list element | 138 | Just list -> bnmModifyList <. const <. Just <| V.snoc list element |
139 | -- 5. | 139 | -- 5. |