The libcspm package

[Tags:bsd3, library, test]

[Skip to Readme]


Versions 0.1, 0.1.1, 0.1.2, 0.2.0, 0.2.1, 1.0.0
Dependencies array (>=0.3), base (==4.*), containers (>=0.4), directory (>=1.0), filepath (>=1.2), graph-wrapper (>=0.2), mtl (>=2.0), pretty (>=1.0) [details]
License BSD3
Copyright (c) 2011 Thomas Gibson-Robinson
Author Thomas Gibson-Robinson <>
Maintainer Thomas Gibson-Robinson <>
Category Concurrency
Home page
Bug tracker
Source repository head: git clone
this: git clone 0.1)
Uploaded Mon Oct 3 11:19:37 UTC 2011 by ThomasGibsonRobinson
Distributions NixOS:1.0.0
Downloads 1332 total (4 in the last 30 days)
0 []
Status Docs not available [build log]
All reported builds failed as of 2016-12-27 [all 6 reports]


  • CSPM
    • Compiler
      • CSPM.Compiler.Events
      • CSPM.Compiler.Map
      • CSPM.Compiler.Processes
      • CSPM.Compiler.Set
    • DataStructures
      • CSPM.DataStructures.Names
      • CSPM.DataStructures.Syntax
      • CSPM.DataStructures.Tokens
      • CSPM.DataStructures.Types
    • CSPM.Desugar
    • CSPM.Evaluator
      • CSPM.Evaluator.BuiltInFunctions
      • CSPM.Evaluator.DeclBind
      • CSPM.Evaluator.Environment
      • CSPM.Evaluator.Exceptions
      • CSPM.Evaluator.Expr
      • CSPM.Evaluator.Module
      • CSPM.Evaluator.Monad
      • CSPM.Evaluator.PatBind
      • CSPM.Evaluator.ValueSet
      • CSPM.Evaluator.Values
    • CSPM.Parser
      • CSPM.Parser.Exceptions
      • CSPM.Parser.Lexer
      • CSPM.Parser.Monad
      • CSPM.Parser.Parser
    • CSPM.PrettyPrinter
    • CSPM.TypeChecker
      • CSPM.TypeChecker.BuiltInFunctions
      • CSPM.TypeChecker.Common
      • CSPM.TypeChecker.Compressor
      • CSPM.TypeChecker.Decl
      • CSPM.TypeChecker.Dependencies
      • CSPM.TypeChecker.Environment
      • CSPM.TypeChecker.Exceptions
      • CSPM.TypeChecker.Expr
      • CSPM.TypeChecker.InteractiveStmt
      • CSPM.TypeChecker.Module
      • CSPM.TypeChecker.Monad
      • CSPM.TypeChecker.Pat
      • CSPM.TypeChecker.Unification
  • Util
    • Util.Annotated
    • Util.Exception
    • Util.HierarchicalMap
    • Util.List
    • Util.Monad
    • Util.PartialFunctions
    • Util.Prelude
    • Util.PrettyPrint


Maintainer's Corner

For package maintainers and hackage trustees

Readme for libcspm

Readme for libcspm-0.1


This library provides a FDR-compliant parser, type checker and (experimental) evaluator for machine CSP files.

There is also a program, cspmchecker, that makes use of this library to provide command line type checking.


The simplest method is to install via Hackage. cabal install cspmchecker will install cspmchecker and its dependencies.

Otherwise, if you obtain a source distribution then the following commands will install libcspm.

cabal configure
cabal build
cabal install

To install cspmchecker, firstly install libcspm as above, then change directory to cspmchecker and run the following commands.

cabal configure
cabal build
cabal install

This should make cspmchecker available from your command line shell (if not check that the location cabal installs binaries to is on your $PATH).

Usage of cspmchecker

From a command line shell simply do cspmchecker file.csp to type check the files. Any error messages will be printed out. For example:

$ cspmchecker ucsexamples/chapter04/abp.csp 
Checking ucsexamples/chapter04/abp.csp.....
    Couldn't match expected type Int.Int with actual type Int
    In the expression: bit
    In the expression: ack == bit
    In the expression: (ack == bit)

Documentation of the type system is forthcoming.

Usage of libcspm

See for documentation.


To test libcspm run the following commands.

cabal configure --enable-tests
cabal build
cabal test

Bug Reports

Please files bug reports at Please provide a minimal example script that exhibits the error (if possible).