Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6843123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:12:28+00:00 2026-05-27T00:12:28+00:00

Introduction I am programming a semantic web application in haskell. With hsparql http://hackage.haskell.org/package/hsparql I

  • 0

Introduction

I am programming a semantic web application in haskell.

With hsparql http://hackage.haskell.org/package/hsparql I can access my Tripple Store. Currently I use http://4store.org/ (mainly because it was easy to install). I use snap http://snapframework.com/ to do the servlet programming (Yesod is very cool too!!).

Currently I use SKOS to represent bookmarks categories in RDF.

Links on SKOS:

  • http://www.w3.org/TR/skos-reference/
  • http://www.athenaeurope.org/athenawiki/index.php/SKOS

Basically, a Skos Concept is a category. It has a URL (as kind of ID)
and a Label. Further Skos Concepts can have sub concepts, defined with “broader”
and “narrower”.

For example in my bookmarks there is the SKOS concept “all bookmarks”, with a sub concept
“haskell bookmarks”. And both concepts have a URL (e.g. as ID) and a Label.
Also “haskell bookmarks” has a relation that the broader concept is “all bookmarks”.

My Problem

I need a data structure in haskell for SKOS.

My current one is:

-- Type Aliases.

type Url = String
type Label = String


-- Date Structure.

data SkosConcept = SkosConcept {
      url :: Url
    , label :: Label
    , subConcepts :: [SkosConcept]
    } deriving (Show)

I think it’s not a good way, but I don’t know a better one.

Further, in the future the data structure needs to be extended to multiple labels,
and means to store related concepts, …

Also some concepts may not have any sub concepts.

Any pointers on how to improve the data structure or ‘do it right’?

===== EDIT: ======

The problem is that a skos concept may have multiple broader skos concepts.
So my “haskell bookmarks” can have two broader skos concepts (e.g. categories) named “programming bookmarks” and “my important bookmarks”.

The only solutions I can think of at the moment is using:

  • a directed graph for the “broader” relation of skos concepts
  • a binary relation “broader” (but I don’t know if there is good haskell support)
  • no intermediate data structures and all my functions query the RDF Tripple Store
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:12:29+00:00Added an answer on May 27, 2026 at 12:12 am

    Rather than trying to store a bidirectional structure directly, why not use the standard Graph approach, and store a tuple containing both the set of concepts, and containing the set of relations between concepts?

    cf: http://hackage.haskell.org/package/fgl

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make an application for iPhone, as an introduction to programming in
In the OpenGL ES 2.0 introduction, found here: http://www.webreference.com/programming/opengl_es/2.html a vertex shader is defined:
I'm a blind college student who is taking an introduction to programming class that
The code is from K. Pollari-Malmi's lecture notes for the course Introduction to Programming:
I am teaching a course Introduction to Computer Programming to the first year math
I'm reading Introduction to 3D Game Programming with DirectX 10 to learn some DirectX,
Has the introduction of the .net framework made raw programming in COM and DCOM
Introduction In my current organisation, we have many desktop and web applications all feeding
I studied 2 courses in Java: 1- Introduction to programming with Java. 2- Data
I was programming the example code from Frank Luna's book Introduction to 3D Game

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.