Skip to content

Compiling Coalton with CLASP (Windows WSL) #1729

@hyperZphere

Description

@hyperZphere

Coalton compilation not possible

CLASP 2.7.0-310-g9dace4c00 -- FAIL

Symptom

caught COMMON-LISP:ERROR:
  ERROR during macroexpansion:
    COMMON-LISP:VALUES is not a valid type specifier.

Error while trying to load definition for system coalton from pathname
  coalton-20260207-326c3d3/coalton.asd:
    ERROR during macroexpansion:
      VALUES is not a valid type specifier.

Root Cause

Coalton's code generator emits (the (values TYPE &optional) EXPR) forms for
type declarations. CLASP does not accept VALUES as a type specifier in THE
special forms during macroexpansion, despite this being valid per the ANSI CL
standard (CLHS 4.2.3).

Exact Location in Coalton Source

File: coalton-20260207-326c3d3/src/codegen/codegen-expression.lisp:205

`(the (values ,@return-types &optional)
      ,@(mapcar #'compile-expression body))

File: coalton-20260207-326c3d3/src/codegen/codegen-expression.lisp:626

(values ,@return-types &optional))

Triggered during compilation of:
coalton-20260207-326c3d3/src/intrinsic-applications.lisp

The (coalton-toplevel ...) macro expands to CL code containing (the (values ...) ...) forms that CLASP rejects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions