Skip to content


Subversion checkout URL

You can clone with
Download ZIP


needed a fix in cabal file for GHC 7.0.3 (plattform 2011.2.0.1) #1

stgit opened this Issue · 2 comments

2 participants



RDF4H is really great!!!
People use it ;-)

Could you possibly provide an example? Like a few lines where you read a turtle rdf file and make a simple query on it? I am trying to figure it out myself but it takes some hours for me. (also since I am not ye fully familiar with haskell...)

For ghc 7.0.3 I needed to fix the ".cabal" file to get it working.
I did the following changes (just guessed what might work, so not sure):

Her is the diff for "rdf4h.cabal":

>                  , test-framework-quickcheck2 >= 0.2.9
<                  , QuickCheck >= && < 1.3
<                  , HUnit >= && < 1.3
>                  , QuickCheck >= && < 1.5
>                  , HUnit >= && < 3

Hey. It's good to know someone is interested :). I should have some time to generate a proper readme over the weekend (likely tomorrow). I hope that's early enough for your purposes.


Hey. Looking forward to the README file. Is the most resent version of the code actually on github or in the darcs repository? I managed to hack some code together to open a turtle rdf file and to run a query. Is really hacked code, as you can see:

instance Show TriplesGraph where show gr = concatMap (\t -> show t ++ "\n") (queryClasses gr)

rdffile :: String
rdffile = "/home/steve/Develop/myhaskell/myrdf/bookmarks.ttl"

main :: IO ()
main = do loadInputGraph rdffile >>= putStrLn . show

query'' :: TriplesGraph -> Maybe Subject -> Maybe Predicate -> Maybe Object -> Triples
query'' gr s p o = removeDupes $ filter (matchPattern s p o) (triplesOf gr)

queryClasses :: TriplesGraph -> Triples 
queryClasses gr = query'' gr Nothing Nothing (Just (unode (s2b "")) )

loadInputGraph :: String -> IO (Either ParseFailure TriplesGraph)
loadInputGraph name =
  B.readFile (name) >>=
    return . parseString (TurtleParser mtestBaseUri (mkDocUrl testBaseUri name)) >>= return . handleLoad

What would be the right way to run a query from main::IO?

From what I seen so far the source code of RDF4H is VERY readable and nice!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.