Strange Compiler Message

Philip Matthews philip_matthews@qmail.newbridge.com
26 Mar 1996 08:18:06 -0500


        Reply to:   RE>Strange Compiler Message

I don't know where the "Int" and "uniqueness" error messages
came from, but if you change the name of the constructor "F"
in "ATYPE" so that it doesn't conflict with the function named "F"
then the program compiles without errors (at least on my machine).

- Philip Matthews
philip@Newbridge.com

--------------------------------------
Date: 26/3/96 04:14
To: Philip Matthews
From: Gert Veltink
Dear Fellow-Cleaners, ;-)

I have the following somewhat peculiar error situation.
I might well be that I am trying to do something that's not allowed,
but still I don't understand the compiler message.

Taking the following (simplified) Clean 1.0 program

---
module Test

//
// Just a small Test
//

::ATYPE =       A
        |       F ATYPE


F :: ATYPE -> ATYPE
F x     = A


// The start of the program

Start::ATYPE
Start = F A
---

I got the following error messages from the compiler:

---
Type error [Test.icl,12,F]: specified uniqueness attributes conflict with
derived uniqueness attributes
Type error [Test.icl,18,Start]: "Start" cannot unify demanded type ATYPE
with Int
---

I'm wondering: "where did the 'Int' come from?"
Any clues?


Gert Veltink.

---
Gert Veltink                        phone:   +49 30 3044193   (home)
Eichenallee 33a                              +49 30 6104.5109 (office)
14050 Berlin                        fax:     +49 30 6104.2467 (office)
Germany                             e-mail:  veltink@oakalley.in-berlin.de