Filewatcher File Search File Search
Content Search
» » » » » haxml_1.22.5-2+b2_s390x.deb » Content »
pkg://haxml_1.22.5-2+b2_s390x.deb:13509940/usr/share/man/man1/  info  control  downloads

haxml - utilities for using XML documents with Haskell…  more info»


MkOneOf(1)                  User Commands                 MkOneOf(1)

       MkOneOf - a helper program to use with DtdToHaskell

       MkOneOf n [m]

       DtdToHaskell  translates  XML  DTD  into  equivalent  Haskell
       types.  When there is a choice between different tags, DtdTo‐
       Haskell  uses  types  like  OneOf2, OneOf3, OneOf4, etc.  The
       module Text.XML.HaXml.OneOfN currently defines these types up
       OneOf20.   If  your  DTD requires larger choices, you can use
       this program to generate them.

       MkOneOf takes an integer N or an integer range N M and writes
       to the standard output a Haskell module with respectively the
       datatype OneOfN or the datatypes OneOfN up to  and  including

       If we run "MkOneOf 1 2", the program will print
       module Text.XML.HaXml.OneOfN where

       import Text.XML.HaXml.Xml2Haskell

       data OneOf1 a
           = OneOf1 a
           deriving (Eq,Show)

       instance (XmlContent a)
           => XmlContent (OneOf1 a)
           fromElem cs =
               (choice OneOf1
               $ (    toElem (OneOf1 x) = toElem x

       data OneOf2 a b
           = OneOf2 a | TwoOf2 b
           deriving (Eq,Show)

       instance (XmlContent a,XmlContent b)
           => XmlContent (OneOf2 a b)
           fromElem cs =
               (choice OneOf2 $ choice TwoOf2
               $ (    toElem (OneOf2 x) = toElem x
           toElem (TwoOf2 x) = toElem x


       The HaXml library and tools were written by and are copyright
              Copyright © 1998 – 2006    Malcolm Wallace  and  Colin

       The   library  incorporates  the  module  Text.ParserCombina‐
              Copyright © 1996           Graham Hutton and Erik Mei‐

       with modifications
              Copyright © 1998 – 2000    Malcolm Wallace

       and  may  also  use  or  incorporate  the  module  Text.Pret‐
              Copyright © 1996 – 1997    John Hughes and Simon  Pey‐
              ton Jones

       The  HaXml  library  is  licensed  under the terms of the GNU
       Lesser General Public Licence (LGPL), with the following spe‐
       cial exception:

              As a relaxation of clause 6 of the LGPL, the copyright
              holders of this library give permission to use,  copy,
              link,  modify, and distribute, binary-only object-code
              versions of an executable  linked  with  the  Library,
              without  requiring the supply of any mechanism to mod‐
              ify or replace the Library and relink (clauses 6a, 6b,
              6c,  6d,  6e),  provided  that  all the other terms of
              clause 6 are complied with.

       The HaXml tools Xtract, Validate, DtdToHaskell, and  MkOneOf,
       are  licensed  under  the  terms  of  the  GNU General Public
       Licence (GPL).

       This library and toolset is distributed in the hope  that  it
       will  be  useful,  but WITHOUT ANY WARRANTY; without even the
       implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICU‐
       LAR PURPOSE.  See the GNU Licences for more details.


       This  contents  of  this manual page was copied from the HTML
       documentation  and   slightly   edited   by   Arjan   Oosting
       <>  for the Debian system (but may be used by

MkOneOf, version 1.17       October 2007                  MkOneOf(1)
Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017