Conceptual modelling support for Haskell https://github.com/MarekSuchanek/hCM

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

MIT licensed by Marek Suchánek
Maintained by suchama4@fit.cvut.cz


Conceptual modelling support library for Haskell.

License Build Status


This library is the result of finding a suitable way how to support conceptual modelling within Haskell programming language in the most simple but smart manner. hCM should allow you to build conceptual model with Haskell freely without any restrictions about selected representation of entities, relationships and model itself.

Advantages gained by applying hCM are:

  • Compiler-driven modelling = GHC guides you through implementing conceptual model via writing instances and mandatory functions.
  • Visualization = you can generate visualization of model and its instances (DOT format, see Graphviz)
  • Verification = correctness of model-implementation consistency is guaranteed by using conceptual model as part of implementation (model-is-a-code)
  • Validation = you can validate the conceptual model with domain expert thanks to visualization, instance generation (use QuickCheck’s Arbitrary) and easy constraint construction as pure functions


  • Use standard Haskell way with stack.
  • Optionally you can use prepared Makefile.


There is very simple example of trivial model within app/Example.hs file. For more complex example, try to check hCM-CaseStudy.

If you have used this library and want to share your project, feel free to let me know via issues.

Sharing ideas and reporting bugs is more than welcome as well via issues!


This project is licensed under the MIT license - see the LICENSE file for more details.


Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[] - 2017-05-08

First prototype of conceptual modelling support for Haskell as entry for future development and enhancements.


  • Metamodel as type classes and data types provided with helper functions and validity handling
  • Visualization via to DOT translation of meta level elements

[] https://github.com/MarekSuchanek/hCM/releases/tag/v0.1.0.0

Depends on 4 packages:
Used by 1 package:
comments powered byDisqus