[Haskell] Progress in StaticDTD
m at tel.netbeisser.de
Wed Jul 18 18:01:13 EDT 2007
in StaticDTD we are moving to complete statical validness against a DTD.
For a (compile time) function that uses our generic combinators, we can
garuantee the following:
- The content model for each element is enforced (this is done by checking
a type-level determined finite automaton for each content model)
- The attributes are validated (not so their values yet). The check function
facilitates a type-level mergesort algorithm.
We are using a HList like structure and so these garuantees also hold with
higher order functions.
The implementation can be found at
It is a mess and all of the infrastructure around it is still missing, but
it shows that the concept might work.
We hope to have a well-working release in very few months.
Some words about related work:
- WASH/HTML  was the original inspiration for us. It checks proper
elements, but not the content model. It is a HTML, not a 'all DTDs of
- HaXml  has two modes: one with generic combinators, which are not
in respect to a DTD, and one where validity is enforced by regex-like
Haskell abstract data types. With them, pattern matching can be used.
- HSXML  has generic combinators and checkes for some
- BinaryNumbers.hs  is a great type-level implemention of numeric
and we are using it in our library for defining complete order and
the states of a DFA.
As a side-effect of our work we hope to put the type-level functions in a
small seperate 'type-level programming' library, for common use.
Comments are very welcome.
View this message in context: http://www.nabble.com/Progress-in-StaticDTD-tf4106801.html#a11678520
Sent from the Haskell - Haskell mailing list archive at Nabble.com.
More information about the Haskell