CPL: An interpreter of Hagino's Categorical Programming Language (CPL).

[ bsd3, compilers-interpreters, program ] [ Propose Tags ] [ Report a vulnerability ]

CPL is a functional programming language based on category theory. Data types are declared in a categorical manner by adjunctions. Data types that can be handled include the terminal object, the initial object, the binary product functor, the binary coproduct functor, the exponential functor, the natural number object, the functor for finite lists, and the functor for infinite lists. Each data type is declared with its basic operations or morphisms. Programs consist of these morphisms, and execution of programs is the reduction of elements (i.e. special morphisms) to their canonical form.


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
linuxstatic

build statically linked binaries

Disabled
Automatic Flags
NameDescriptionDefault
readline

Use Readline

Enabled
haskeline

Use Haskeline

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.1.0
Change log CHANGELOG.markdown
Dependencies array, base (>=4 && <5), containers, haskeline, mtl (>=2.2.1), parsec, readline [details]
License BSD-3-Clause
Author Masahiro Sakai (masahiro.sakai@gmail.com)
Maintainer masahiro.sakai@gmail.com
Category Compilers/Interpreters
Home page https://github.com/msakai/cpl
Source repo head: git clone git://github.com/msakai/cpl.git
Uploaded by MasahiroSakai at 2025-10-30T00:28:39Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables cpl
Downloads 4978 total (13 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2025-10-30 [all 2 reports]

Readme for CPL-0.1.0

[back to package description]

An implementation of "A Categorical Programming Language"

Build Status Hackage Hackage Deps License

This package is an implementation of "A Categorical Programming Language" (CPL for short)[1][2] written in Haskell.

CPL is a functional programming language based on category theory. Data types are declared in a categorical manner by adjunctions. Data types that can be handled include the terminal object, the initial object, the binary product functor, the binary coproduct functor, the exponential functor, the natural number object, the functor for finite lists, and the functor for infinite lists. Each data type is declared with its basic operations or morphisms. Programs consist of these morphisms, and execution of programs is the reduction of elements (i.e. special morphisms) to their canonical form.

Install

De-Compress the archive and enter its top directory. Then type:

$ cabal configure
$ cabal build
$ cabal install

If you want to compile with readline or haskeline, add -fReadline or -fHaskeline respectively to the configure command.

Usage

See chapter 5 of [1]

License

This program is licensed under the BSD-style license. (See the file COPYING.)

Copyright (C) 2004-2014 Masahiro Sakai masahiro.sakai@gmail.com

Author

Masahiro Sakai masahiro.sakai@gmail.com

Bibliography

  1. Tatsuya Hagino, “A Categorical Programming Language”. Ph.D. Thesis, University of Edinburgh, 1987. available at http://web.sfc.keio.ac.jp/~hagino/index.html.en

  2. Tatsuya Hagino, “Categorical Functional Programming Language”. Computer Software, Vol 7, No.1. Advances in Software Science and Technology 4, 1992. ISBN 0-12-037104-9.