summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2018-02-23 13:57:09 +0300
committerdefanor <defanor@uberspace.net>2018-02-23 13:57:09 +0300
commit64ede85539277d676f4b9bed88599ce0b9150f23 (patch)
tree5236726e831f090d19fe9191e30833d817cc4e02
parentfe1e63da4567ab263f0e3cf9cbd2d954714e7a3b (diff)
downloadredland-64ede85539277d676f4b9bed88599ce0b9150f23.zip
redland-64ede85539277d676f4b9bed88599ce0b9150f23.tar.gz
redland-64ede85539277d676f4b9bed88599ce0b9150f23.tar.bz2
Add Ord instances for Node and Triple
-rw-r--r--Redland/Util.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Redland/Util.hs b/Redland/Util.hs
index 9d3744d..2bcd947 100644
--- a/Redland/Util.hs
+++ b/Redland/Util.hs
@@ -12,7 +12,6 @@ module Redland.Util where
import Foreign
import Control.Monad
-import Data.Maybe
import Redland.LowLevel
import Redland.MidLevel
@@ -52,7 +51,7 @@ withStatements world model t f =
data Node = BlankNode String
| LiteralNode String
| ResourceNode String
- deriving (Eq, Show)
+ deriving (Ord, Eq, Show)
-- | A conversion function.
redlandNodeToNode :: ForeignPtr RedlandNode -> IO Node
@@ -139,7 +138,7 @@ queryResultsToList qr = do
data Triple = Triple { subject :: Maybe Node
, predicate :: Maybe Node
, object :: Maybe Node
- } deriving (Eq, Show)
+ } deriving (Ord, Eq, Show)
-- | A conversion function.
statementToTriple :: ForeignPtr RedlandStatement