Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Based on the ensuing discussion, it sounds like what you want is to create a DSL (Domain-Specific Language) to represent XML. </p> <p>One option is to <em>embed</em> your DSL in Haskell so it can appear in Haskell source code. In general, you can do this by defining the types you need, and providing a set of functions to work with those types. <em>It sounds like this is what you're hoping to do.</em> However, as an <em>embedded</em> DSL, it will be subject to some constraints, and this is the problem you're encountering. Perhaps there is a clever trick to do what you want, maybe something involving type functions, but I can't think of anything at present. If you want to keep trying, maybe add the tags <code>dsl</code> and <code>gadt</code> to your question, catch the attention of people who know more about this stuff than I do. Alternatively, you might be able to use something like <a href="http://www.haskell.org/haskellwiki/Template_Haskell" rel="nofollow" title="Template Haskell">Template Haskell</a> or <a href="http://www.haskell.org/haskellwiki/Scrap_your_boilerplate" rel="nofollow" title="Scrap_your_boilerplate">Scrap Your Boilerplate</a> to allow your users to omit some information, which would them be "filled in" before Haskell "sees" it.</p> <p>Another option is to have an external DSL, which you parse using Haskell. You could define a DSL, but maybe it would be easier to just use XML directly with a suitable DTD. There are Haskell libraries for parsing XML, of course.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload