diff options
Diffstat (limited to 'src/Data/JLD.hs')
| -rw-r--r-- | src/Data/JLD.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Data/JLD.hs b/src/Data/JLD.hs index a7042dc..40abae1 100644 --- a/src/Data/JLD.hs +++ b/src/Data/JLD.hs | |||
| @@ -26,8 +26,7 @@ import Data.JLD.Options | |||
| 26 | import Data.JLD.Util (flattenSingletonArray, valueToArray) | 26 | import Data.JLD.Util (flattenSingletonArray, valueToArray) |
| 27 | 27 | ||
| 28 | import Data.Aeson (Value (..)) | 28 | import Data.Aeson (Value (..)) |
| 29 | import Data.Aeson.KeyMap qualified as KM | 29 | import Data.Aeson.KeyMap qualified as KM (lookup, size) |
| 30 | import Data.Vector qualified as V (singleton) | ||
| 31 | import Text.URI (URI) | 30 | import Text.URI (URI) |
| 32 | 31 | ||
| 33 | data JLDExpansionParams e m = JLDExpansionParams | 32 | data JLDExpansionParams e m = JLDExpansionParams |
| @@ -72,7 +71,7 @@ expand document baseUrl paramsFn = do | |||
| 72 | jldExpansionParamsExpandContext <&> flattenSingletonArray .> \case | 71 | jldExpansionParamsExpandContext <&> flattenSingletonArray .> \case |
| 73 | Array expandedContext -> Array expandedContext | 72 | Array expandedContext -> Array expandedContext |
| 74 | (Object expandedContext) | Just ctx <- KM.lookup (show KeywordContext) expandedContext -> ctx | 73 | (Object expandedContext) | Just ctx <- KM.lookup (show KeywordContext) expandedContext -> ctx |
| 75 | expandedContext -> Array <| V.singleton expandedContext | 74 | expandedContext -> Array <| pure expandedContext |
| 76 | 75 | ||
| 77 | activeContext' <- case maybeExpandContext of | 76 | activeContext' <- case maybeExpandContext of |
| 78 | Just expandContext -> | 77 | Just expandContext -> |
