Skip to content

Clean sandbox fails to compile, possibly problem with new array representation

Problem to solve

In the Clean sandbox, the following program fails to compile:

module sandbox

import Text.YAML

Start = ()

This is with base-stdenv 1.0.1, clean-platform 0.3.43, and yaml 1.1.2:

Compiling sandbox...
Compiling Control.Applicative...
Warning [Control.Applicative,]: not all derived strictness information is exported
Compiling Control.Monad...
Compiling Control.Monad.Fail...
Compiling Control.Monad.Trans...
Compiling Data.Bifunctor...
Compiling Data.Either...
Warning [Data.Either,]: not all derived strictness information is exported
Compiling Data.Error...
Parse error [StdOverloadedList.dcl,584;41,Type]: ordinary type variable expected
Parse error [StdOverloadedList.dcl,586;1,want definitions]: End of file expected instead of offside token (end group)
Compilation failed.

Proposal

Setting ABC_DEBUG=true shows that the error shortly follows a garbage collection cycle, which is only the second garbage collection cycle.

When you recompile the sandbox module, another compilation error appears. This is because some modules have now been compiled and will not be recompiled, so GC is triggered at a different point. The error still appears shortly after GC, however.

I suspect a problem with !206 (merged) given that it is the last real change, also because that MR involves arrays which are used frequently in the compiler but not so much in other code.

If there is a problem with the GC, this may be Wasm-specific.

Documentation

None.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information