[clean-list] StdString's instance == {#Char} conflicts with
instance == {#Real}
David C. Norris
David_Norris at brown.edu
Mon Dec 3 08:57:33 MET 2007
Hello,
I find clm (on Linux) complains:
"Error [Eq.icl,4,import]: == multiply defined"
if StdString is imported in the following program:
--- file Eq.icl ---
module Eq
import StdClass, StdList, StdArray
import StdString // must comment this line to avoid conflict with
instance == {#Real} below
instance == {#Real}
where
(==) infix 2:: !{#Real} !{#Real} -> Bool
(==) v1 v2 = and [e1 == e2 \\ e1 <-: v1 & e2 <-: v2]
Start :: Bool
Start = v1 == v1
where
v1 :: {#Real}
v1 = {1.0,2.0,3.0}
v2 :: {#Real}
v2 = {1.0,2.0,3.0}
---
Why does these instance declarations clash? How may I import StdString,
yet still define == instance for arrays?
- David
More information about the clean-list
mailing list