[clean-list] Clean compiler exited abnormally

G.W.M. Vissers vissers@theochem.kun.nl
Thu, 13 Sep 2001 12:23:29 +0200 (CEST)


Sorry about the last message (the one without the subject), please ignore
it. Here's what I meant to say:

Inspired by the "pretty[Row/Column]Vector" and the "prettyMatrix"
functions in the CLAS library I wrote something similar for
general arrays:

//////////////////////////////////////////////////////////////////////////

module bla

import StdArray, StdString, StdClass, StdInt

str1d :: {t} -> String | ArrayElem, toString t
str1d x = str1d` 0
where
  n = size x
  str1d` i
  | i == n = ""
  = toString x.[i] +++ " " +++ str1d` (inc i)

str2d :: {{t}} -> String | ArrayElem, toString t
str2d xx = str2d` 0
where
  n = size xx
  str2d` i
  | i == n = ""
  = str1d xx.[i] +++ "\n" +++ str2d` (inc i)

Start = str2d {{1,2,3},{3,4,5},{5,6,7}}

///////////////////////////////////////////////////////////////////////////

which works OK. But when I put the function str1d and str2d in a separate
module, say bla2, and try to use these in the main module by importing
bla2, the compiler (clm 1.3.3 on Linux/x86, 2.2.16 kernel, glibc 2.1.3)
bails out on me with

"Clean compiler exited abnormally"

The question is then of course: is this a compiler bug or am I doing
something wrong? And if it is a bug in the compiler, is there a way to
work around it?

Thanks for any hints,

Gé Vissers