diff options
author | defanor <defanor@uberspace.net> | 2018-02-23 18:32:30 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2018-02-23 18:32:30 +0300 |
commit | d7c6f1d025cb7b03a7d44625827a7e852df23e0e (patch) | |
tree | da5d5ea583dccf69a58e6ba0e86ebc3866d61945 /Redland/Util.hs | |
parent | c249c4d8a8e6dbc4c95f656973126ab5ec07df49 (diff) |
Fix Literal value datatype URI handling
It should be an URI, not a string.
Diffstat (limited to 'Redland/Util.hs')
-rw-r--r-- | Redland/Util.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Redland/Util.hs b/Redland/Util.hs index 600cc83..e7ac295 100644 --- a/Redland/Util.hs +++ b/Redland/Util.hs @@ -79,10 +79,10 @@ redlandNodeToNode rn = do litVal <- nodeGetLiteralValue rn litLang <- nodeGetLiteralValueLanguage rn litType <- nodeGetLiteralValueDatatypeURI rn - let nType = case (litLang, litType) of - (Just l, _) -> Just $ LanguageTag l - (_, Just t) -> Just $ XMLSchema t - _ -> Nothing + nType <- case (litLang, litType) of + (Just l, _) -> pure $ Just $ LanguageTag l + (_, Just t) -> Just . XMLSchema <$> uriAsString t + _ -> pure Nothing pure $ LiteralNode litVal nType _ -> ResourceNode <$> (nodeGetURI rn >>= uriAsString) |