rdf4h-5.0.1: A library for RDF processing in Haskell
Safe HaskellNone
LanguageHaskell2010

Data.RDF.Vocabulary.Generator.VocabularyGenerator

Synopsis

Documentation

genVocabulary Source #

Arguments

:: String

the filepath of the file containing the schema in RDF Turtle format.

-> Q [Dec] 

Generates Node values for concepts and properties, and Namespace values, for a given schema in the Haskell module in which genVocabulary is used.

Concepts in the schema are prepended with "_", the names of properties are unchanged.

For example:

>>> $(genVocabulary "resources/shacl.ttl")

creates many Node values including

    _SPARQLConstraint  :: Node
    annotationProperty :: Node

This is used to auto-generate all modules in Data.RDF.Vocabulary.* at compile time with Template Haskell.