@prefix IAO: <http://purl.obolibrary.org/obo/IAO_> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix hackage: <https://purl.org/packagegraph/ontology/hackage#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix pkg: <https://purl.org/packagegraph/ontology/core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

hackage:CabalFile a owl:Class ;
    rdfs:label "Cabal File"@en ;
    IAO:0000115 "A .cabal file describing a Haskell package's metadata, dependencies, and build configuration."@en ;
    rdfs:comment "A Cabal package description file"@en ;
    rdfs:isDefinedBy hackage: .

hackage:bugReports a owl:DatatypeProperty ;
    rdfs:label "bug reports"@en ;
    IAO:0000115 "URL for reporting bugs."@en ;
    rdfs:domain hackage:HackagePackage ;
    rdfs:isDefinedBy hackage: ;
    rdfs:range xsd:anyURI .

hackage:buildDepends a owl:ObjectProperty ;
    rdfs:label "build depends"@en ;
    IAO:0000115 "A build-depends dependency required to compile the package."@en ;
    rdfs:domain hackage:HackagePackage ;
    rdfs:isDefinedBy hackage: ;
    rdfs:range hackage:HackagePackage ;
    rdfs:subPropertyOf pkg:dependsOn .

hackage:category a owl:DatatypeProperty ;
    rdfs:label "category"@en ;
    IAO:0000115 "Package category from the Cabal file (e.g., 'Web', 'Data', 'Network')."@en ;
    rdfs:domain hackage:HackagePackage ;
    rdfs:isDefinedBy hackage: ;
    rdfs:range xsd:string .

hackage:maintainer a owl:DatatypeProperty ;
    rdfs:label "maintainer"@en ;
    IAO:0000115 "Package maintainer name and email."@en ;
    rdfs:comment "Maintainer from .cabal file (semantically prov:wasAttributedTo)"@en ;
    rdfs:domain hackage:HackagePackage ;
    rdfs:isDefinedBy hackage: ;
    rdfs:range xsd:string .

hackage:publishedTo a owl:ObjectProperty ;
    rdfs:label "published to"@en ;
    IAO:0000115 "Associates a package with the Hackage repository."@en ;
    rdfs:domain hackage:HackagePackage ;
    rdfs:isDefinedBy hackage: ;
    rdfs:range hackage:HackageRepository .

hackage:stability a owl:DatatypeProperty ;
    rdfs:label "stability"@en ;
    IAO:0000115 "Package stability level (e.g., 'stable', 'experimental', 'provisional')."@en ;
    rdfs:domain hackage:HackagePackage ;
    rdfs:isDefinedBy hackage: ;
    rdfs:range xsd:string .

hackage:synopsis a owl:DatatypeProperty ;
    rdfs:label "synopsis"@en ;
    IAO:0000115 "One-line package description from the Cabal synopsis field."@en ;
    rdfs:domain hackage:HackagePackage ;
    rdfs:isDefinedBy hackage: ;
    rdfs:range xsd:string .

hackage:testedWith a owl:DatatypeProperty ;
    rdfs:label "tested with"@en ;
    IAO:0000115 "GHC versions this package has been tested with (e.g., 'GHC ==9.2.8, GHC ==9.4.8')."@en ;
    rdfs:domain hackage:HackagePackage ;
    rdfs:isDefinedBy hackage: ;
    rdfs:range xsd:string .

hackage:HackageRepository a owl:Class ;
    rdfs:label "Hackage Repository"@en ;
    IAO:0000115 "The Hackage repository serving Haskell packages at hackage.haskell.org."@en ;
    rdfs:comment "The Hackage package repository"@en ;
    rdfs:isDefinedBy hackage: ;
    rdfs:subClassOf pkg:Repository .

hackage:HackagePackage a owl:Class ;
    rdfs:label "Hackage Package"@en ;
    IAO:0000115 "A Haskell library or application distributed through Hackage, described by a .cabal file."@en ;
    rdfs:comment "A package published to Hackage"@en ;
    rdfs:isDefinedBy hackage: ;
    rdfs:subClassOf pkg:SourcePackage .

hackage: a owl:Ontology ;
    rdfs:label "Hackage Package Ontology"@en ;
    dcterms:abstract "Models Hackage packages including Cabal metadata, GHC version compatibility, categories, stability levels, and build-depends relationships. Instances are dual-typed as both pkg:Package and hackage:HackagePackage." ;
    dcterms:created "2026-04-14"^^xsd:date ;
    dcterms:license <https://creativecommons.org/publicdomain/zero/1.0/> ;
    dcterms:modified "2026-04-21"^^xsd:date ;
    rdfs:comment "Ontology for representing Hackage packages and the Haskell ecosystem"@en ;
    rdfs:isDefinedBy hackage: ;
    rdfs:seeAlso <https://purl.org/packagegraph/ontology/hackage/shapes> ;
    owl:imports pkg: ;
    owl:priorVersion <https://purl.org/packagegraph/ontology/hackage/0.6.0> ;
    owl:versionIRI <https://purl.org/packagegraph/ontology/hackage/0.7.0> ;
    owl:versionInfo "0.7.0" .

