-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Labels
codegenCode generation matters (Coalton -> Lisp)Code generation matters (Coalton -> Lisp)type systemThe Coalton type systemThe Coalton type system
Description
(Reported by @Jason94.)
I'm getting a strange error when I try to compile a file in release mode. In dev mode, it compiles and runs fine. Here is the error:
; compiling file "/home/jason/programming/workspace/coalton-simple-io/examples/channels-threading.lisp" (written 19 DEC 2025 11:45:43 AM):
;
; caught COMMON-LISP:ERROR:
; COMMON-LISP:READ error during COMMON-LISP:COMPILE-FILE:
;
; The value
; #T71411
; is not of type
; COALTON-IMPL/TYPECHECKER/TYPES:TYCON
;
; (in form starting at line: 34, column: 0, position: 1005)
;
; compilation unit aborted
; caught 1 fatal ERROR condition
; caught 1 ERROR condition
This is the file in question. L102 seems to be the offending line. This compiles:
(declare sum-file (IO Integer))
(define sum-file
(do
write-data-file
(_input-chan <- mv:new-empty-chan)
(_ints-chan <- mv:new-empty-chan)
(write-line "Forking threads...")
;; (fork-thread (reader-thread input-chan))
;; ...
(pure 0)))But with 102 uncommented, it fails:
(declare sum-file (IO Integer))
(define sum-file
(do
write-data-file
(_input-chan <- mv:new-empty-chan)
(_ints-chan <- mv:new-empty-chan)
(write-line "Forking threads...")
(fork-thread (reader-thread _input-chan))
;; ...
(pure 0)))(And again, that compiles just fine in development mode. The whole thing does.
I'm pretty sure this is a bug, because if it compiles in dev mode it should be compiling in release mode. Plus it shouldn't leak TVars.
The steps I took switching between modes:
- Switch mode in my init
- Run
rm **/*.faslin my repo root - Delete
~/.cache/common_lispto force - Restart my REPL
Metadata
Metadata
Assignees
Labels
codegenCode generation matters (Coalton -> Lisp)Code generation matters (Coalton -> Lisp)type systemThe Coalton type systemThe Coalton type system