Cupid documentation
Cupid is a small Haskell interpreter, written in C and descended from Hugs.
It implements Haskell 2010 with documented deviations and a fixed set of
extensions, the language reference says which, its
libraries are a subset of GHC's base, and it evaluates expressions at an
interactive prompt or runs a program's main from a script. It's also small
enough to read, and these pages are for both kinds of reader.
Start here
New to Cupid? Install a release, then work
through Getting started with Cupid: it evaluates
a few expressions, loads a module and runs a program with cupid. To build
from source instead, see Build Cupid on Linux and
macOS or Build Cupid on
Windows.
Using Cupid
- Write a script that runs with cupid
- Call C functions from Haskell
- Make
:editopen your editor - Preprocess source files before loading
- Add a library to the search path
- Measure time and memory use
Inside Cupid
A guided tour of the source. Begin with Reading Cupid in a day, which gives a route through the main stages for a first day, and the order for the whole tour after that.
Reference
Running it:
- Running cupid — the command: prompt, run a file,
load with
-i, compile stubs with--ffi - Interpreter commands —
:load,:type,:setand the rest - Options — toggles and parameters, and where they are read from
- Environment variables
- Build options and install layout
The language and libraries:
- The language Cupid accepts — what the language is, the deviations a program is most likely to meet, and known bugs
- Language extensions — each feature beyond Haskell 2010, and what is not accepted
- Haskell 2010 conformance — the Report chapter by chapter, language and libraries
- The libraries — packages and modules shipped
Background:
- Differences from Hugs 98 — the programs, options, variables, modules and extensions that changed
- Further reading — the Report, the Hugs manuals and the papers the implementation follows
Contributing
Manual page
cupid.1.in is the source of the cupid(1) manual page, which meson
fills in with the install paths and installs under share/man.