Cogent Logo
docs-import-manual

Table of contents

  • 1. Preamble
    • 1.1. The purpose of this documentation
    • 1.2. How to read this documentation?
    • 1.3. Other materials
  • 2. Cogent Quick-Start Guide
    • 2.1. Environment
    • 2.2. Installation
    • 2.3. Your first program
    • 2.4. A more complicated example
    • 2.5. Example: abstract types and polymorphic functions
    • 2.6. Example: polymorphic abstract types
    • 2.7. Example: building Isabelle proofs
  • 3. Cogent Installation Guide
    • 3.1. In a Nutshell
    • 3.2. Detailed Instructions
      • 3.2.1. Dependencies
      • 3.2.2. Install Cogent dependencies
        • 3.2.2.1. The GHC compiler and Cabal
        • 3.2.2.2. alex and happy
        • 3.2.2.3. z3 SMT-solver
      • 3.2.3. Install Cogent
        • 3.2.3.1. Optional features
        • 3.2.3.2. Build with Makefile (simple, but can be fragile)
        • 3.2.3.3. Build with Cabal (more advanced)
        • 3.2.3.4. Build with Stack (simple, more robust)
      • 3.2.4. Test your installation
        • 3.2.4.1. Testing on macOS
    • 3.3. Common Issues and Troubleshooting
      • 3.3.1. Cabal Version
      • 3.3.2. Missing Dependencies
      • 3.3.3. Could not resolve dependency isa-parser
  • 4. Cogent Surface Syntax
    • 4.1. Types
      • 4.1.1. Record types
      • 4.1.2. Unboxed records
      • 4.1.3. Unboxed abstract types
      • 4.1.4. Bang (!)
      • 4.1.5. Product Types
      • 4.1.6. Variant Types
      • 4.1.7. Polymorphic types
        • 4.1.7.1. Permissions
    • 4.2. Type synonyms
    • 4.3. Constants and top-level definitions
    • 4.4. Effects
    • 4.5. Expression language
      • 4.5.1. Matching and Error Handling
      • 4.5.2. Biased pattern matching
      • 4.5.3. Patterns
      • 4.5.4. Let-binding
      • 4.5.5. Observation and let!
      • 4.5.6. If
      • 4.5.7. Sequencing
      • 4.5.8. Take/put
      • 4.5.9. Arithmetic and comparison operators
      • 4.5.10. Type annotations
    • 4.6. Experimental features
      • 4.6.1. Static arrays
      • 4.6.2. Lambda expressions
  • 5. Antiquoted C
    • 5.1. Cheatsheet
    • 5.2. Overview
    • 5.3. Modes in the compiler
    • 5.4. Function definitions
    • 5.5. Type declarations / Typedef’s
    • 5.6. Escape sequences
    • 5.7. Expressions
  • 6. How To Use The Cogent Compiler
    • 6.1. Command-line Arguments
      • 6.1.1. Commands
      • 6.1.2. All Flags
  • 7. Verification
    • 7.1. Dependencies
    • 7.2. Generated Theory Files
    • 7.3. Building/Running The Generated Files
      • 7.3.1. In Jedit
      • 7.3.2. On the command line
    • 7.4. Examples
      • 7.4.1. A Simple Example
      • 7.4.2. A More Involved Example
    • 7.5. Common Errors
      • 7.5.1. ACInstall
  • 8. Meta-Documentation
    • 8.1. How to build and publish this documentation?
    • 8.2. How to build this documentation locally?
Cogent
  • Docs »
  • Search
  • Edit on GitHub


© Copyright 2020, CSIRO's Data61 Revision 7561dc30.

Built with Sphinx using a theme provided by Read the Docs.