Skip to content

Coding conventions

Björn edited this page Apr 26, 2023 · 4 revisions

Haskell

The code of HETS should follow the principles defined in the Haskell programming guidelines. In particular:

  • Function names are written in lowerCamelCase
  • If conflicting with a selector name (e.g. name), a function doing some computation to obtain the value should be prefixed with get (e.g. getName)
  • Type, type class, and constructor names are written in UpperCamelCase
  • For each top-level folder SubModules/ there has to be top-level module SubModule.hs describing the content of the folder
  • Each module has to have module description at least including the license and a short description of the module. See a template here.

Starting comment template

Minimum template:

{- |
Description :  <short description of the module>
Copyright   :  (c) Otto-von-Guericke University of Magdeburg
License     :  GPLv2 or higher, see LICENSE.txt
-}

There are also optional field. The following contains all currently used fields:

{- |
Module      :  <path to the module from project root>
Description :  <short description
Copyright   :  <copy right>
License     :  GPLv2 or higher, see LICENSE.txt
Maintainer  :  <email of the maintainer>
Stability   :  <stable|provisional|experimental|unstable> [short explanation why]
Portability :  <non-portable [list feature making the module non-portable] | portable [limitations] | unknown>

<detailed description, examples, literature, etc.>
-}

Python

The python parts of Hets follow the Style Guide for Python Code.

Clone this wiki locally