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
    ExpressLuke GSI
    ExpressLuke GSI
    This SourceForge download page was to
    grant users to download my source built
    GSIs, based upon phhusson's great
    work. I build both Android Pie and
    Android 1...
    Download ExpressLuke GSI
  • 2
    PyQt
    PyQt
    PyQt is the Python bindings for
    Digia's Qt cross-platform
    application development framework. It
    supports Python v2 and v3 and Qt v4 and
    Qt v5. PyQt is avail...
    Download PyQt
  • 3
    garlic3
    garlic3
    Gambas3* coding tools and examples for
    use in SMB or other organizations that
    make internal programs. E.g. from
    database fields to class sourcecode with
    DbInfo...
    Download garlic3
  • 4
    Sardi
    Sardi
    Sardi is a complete restyling and
    optimisation of svg code. 6 choices for
    your applications and 10 kind of folders
    to use in your file manager. The sardi
    icons...
    Download Sardi
  • 5
    LMMS Digital Audio Workstation
    LMMS Digital Audio Workstation
    LMMS is a free cross-platform software
    which allows you to produce music with
    your computer. If you like this project
    consider getting involved in the project
    h...
    Download LMMS Digital Audio Workstation
  • 6
    FreeRTOS Real Time Kernel (RTOS)
    FreeRTOS Real Time Kernel (RTOS)
    FreeRTOS is a market-leading real-time
    operating system (RTOS) for
    microcontrollers and small
    microprocessors. Distributed freely
    under the MIT open source lice...
    Download FreeRTOS Real Time Kernel (RTOS)
  • 7
    Avogadro
    Avogadro
    Avogadro is an advanced molecular
    editor designed for cross-platform use
    in computational chemistry, molecular
    modeling, bioinformatics, materials
    science and ...
    Download Avogadro
  • More »

Linux commands

  • 1
    abidiff
    abidiff
    abidiff - compare ABIs of ELF files
    abidiff compares the Application Binary
    Interfaces (ABI) of two shared libraries
    in ELF format. It emits a meaningful
    repor...
    Run abidiff
  • 2
    abidw
    abidw
    abidw - serialize the ABI of an ELF
    file abidw reads a shared library in ELF
    format and emits an XML representation
    of its ABI to standard output. The
    emitted ...
    Run abidw
  • 3
    cppo
    cppo
    cppo - lightweight cpp-like
    preprocessor for OCaml ...
    Run cppo
  • 4
    cppunit-config
    cppunit-config
    cppunit-config - script to get
    information about the installed version
    of cppunit ...
    Run cppunit-config
  • 5
    fwb_iosacl
    fwb_iosacl
    fwb_ipt - Policy compiler for Cisco IOS
    ACL ...
    Run fwb_iosacl
  • 6
    fwb_ipf
    fwb_ipf
    fwb_ipf - Policy compiler for ipfilter ...
    Run fwb_ipf
  • More »

Ad