The harmony package

[ Tags: development, gpl, library, program ] [ Propose Tags ]

A parser of web service specification that is able to generate servers, clients and tests.

[Skip to Readme]


Versions,,,, (info)
Dependencies array, base (>=4.6 && <5), BNFC, containers, derive, directory, harmony, hastache, hslogger, mtl, process, QuickCheck, text [details]
License GPL-3
Author Santiago Munín
Category Development
Bug tracker
Source repo head: git clone
Uploaded Wed Aug 19 06:41:53 UTC 2015 by SantiMunin
Distributions NixOS:
Executables harmony
Downloads 1159 total (21 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-08-19 [all 1 reports]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for harmony-

[back to package description]

Harmony Hackage version Build Status

Harmony is a web service specification compiler that generates implementation (server and client) and tests.

Targets supported

  • Server
    • Node.js (-sjs)
  • Client
    • Python (-cpython)
    • Java (-cjava)


  • From Hackage: cabal install harmony
  • From source code: git clone && cd harmony && cabal install


After installing the package (cabal install), you will get the harmony executable. Afterwards:

Usage: harmony [OPTION...] input_file
  -c[CLIENTS]     --client[=CLIENTS]         Desired output for the client: {-cpython, -cjava}
  -s[SERVERS]     --server[=SERVERS]         Desired output for the server: {-sjs}
  -o[OUTPUT_DIR]  --output_dir[=OUTPUT_DIR]  Output path

Check the Targets supported section to figure out the code related to each target. Also, refer to the wiki for more information.


The input file should follow the syntax specified in language_spec/ Example:

service_name: HouseworkService
service_version: 1.0.0

enum Color { RED, BLUE, BLACK }

struct Task {
   // Primary key
   name : String,
   color : Color

struct Person {
  name: String,
  age: Int,
  tasks: [Task]

resource Person ("/person")


See the wiki.