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

[ bsd3, compilers-interpreters, program ] [ Propose Tags ]

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.

Versions [faq] 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9 CHANGELOG.markdown array, base (==4.*), containers, haskeline, mtl (>=2.0.0.0), parsec, readline [details] BSD-3-Clause Masahiro Sakai (masahiro.sakai@gmail.com) masahiro.sakai@gmail.com Compilers/Interpreters https://github.com/msakai/cpl head: git clone git://github.com/msakai/cpl.git by MasahiroSakai at Fri Feb 16 04:01:31 UTC 2018 NixOS:0.0.9 cpl 2610 total (99 in the last 30 days) (no votes yet) [estimated by rule of succession] λ λ λ Docs not available Last success reported on 2018-02-16

## Flags

NameDescriptionDefaultType

EnabledAutomatic

EnabledAutomatic
linuxstatic

DisabledManual

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

#### Maintainer's Corner

For package maintainers and hackage trustees

[back to package description]

# An implementation of "A Categorical Programing Language"

This package is an implementation of "A Categorical Programing 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 archive and enter its top directory. Then type:

$cabal configure$ cabal build
\$ cabal install

## Usage

See chapter 5 of [1]

This program is licenced 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 Languge”. 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