EnglishFrenchSpanish

Ad


OnWorks favicon

MkOneOf - Online in the Cloud

Run MkOneOf in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command MkOneOf that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


MkOneOf - a helper program to use with DtdToHaskell

SYNOPSIS


MkOneOf n [m]

DESCRIPTION


DtdToHaskell translates XML DTD into equivalent Haskell types. When there is a choice
between different tags, DtdToHaskell 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 OneOfM.

EXAMPLES


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)
where
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)
where
fromElem cs =
(choice OneOf2 $ choice TwoOf2
$ ( toElem (OneOf2 x) = toElem x
toElem (TwoOf2 x) = toElem x

----

COPYRIGHT


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

The library incorporates the module Text.ParserCombinators.HuttonMeijerWallace
Copyright © 1996 Graham Hutton and Erik Meijer

with modifications
Copyright © 1998 – 2000 Malcolm Wallace

and may also use or incorporate the module Text.PrettyPrint.HughesPJ
Copyright © 1996 – 1997 John Hughes and Simon Peyton Jones

The HaXml library is licensed under the terms of the GNU Lesser General Public Licence
(LGPL), with the following special 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 modify 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
PARTICULAR PURPOSE. See the GNU Licences for more details.

Use MkOneOf online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    VASSAL Engine
    VASSAL Engine
    VASSAL is a game engine for creating
    electronic versions of traditional board
    and card games. It provides support for
    game piece rendering and interaction,
    and...
    Download VASSAL Engine
  • 2
    OpenPDF - Fork of iText
    OpenPDF - Fork of iText
    OpenPDF is a Java library for creating
    and editing PDF files with a LGPL and
    MPL open source license. OpenPDF is the
    LGPL/MPL open source successor of iText,
    a...
    Download OpenPDF - Fork of iText
  • 3
    SAGA GIS
    SAGA GIS
    SAGA - System for Automated
    Geoscientific Analyses - is a Geographic
    Information System (GIS) software with
    immense capabilities for geodata
    processing and ana...
    Download SAGA GIS
  • 4
    Toolbox for Java/JTOpen
    Toolbox for Java/JTOpen
    The IBM Toolbox for Java / JTOpen is a
    library of Java classes supporting the
    client/server and internet programming
    models to a system running OS/400,
    i5/OS, o...
    Download Toolbox for Java/JTOpen
  • 5
    D3.js
    D3.js
    D3.js (or D3 for Data-Driven Documents)
    is a JavaScript library that allows you
    to produce dynamic, interactive data
    visualizations in web browsers. With D3
    you...
    Download D3.js
  • 6
    Shadowsocks
    Shadowsocks
    A fast tunnel proxy that helps you
    bypass firewalls This is an application
    that can also be fetched from
    https://sourceforge.net/projects/shadowsocksgui/.
    It ha...
    Download Shadowsocks
  • More »

Linux commands

Ad