Re: Bug in PAKCS data inspection ¿?

From: Wolfgang Lux <>
Date: Thu, 25 Oct 2007 10:20:44 +0200

Juan Carlos González Moreno wrote:

> The question is why PAKCS no detect that the problem is with data
> definition ¿?
> data Seq a = a | a :< Seq a

While this error may look obvious to you, it isn't so. In fact, there
is not
really an error in the declaration. When parsing the first
alternative of the
data declaration, the parser looks for
   DataConstrID SimpleTypeExpr_1 ... SimpleTypeExpr_n
Thanks to the absence of a capitalization convention in Curry, the
lower case a
is accepted as a valid data constructor identifier. It does not
matter that a
type variable with the same name is in scope because type identifiers
and value
identifiers live in different name spaces.

<shameless plug>
MCC can report case mode violations of the kind above. For instance,
if you compile
the module with MCC's -Whaskell option, you get the warning

"Test.curry", line 2.14: Warning: name of data constructor a starts
with a lower case letter

</shameless plug>


PS: Thanks for the example. IMHO, it is just another good argument to
a capitalization convention in Curry.

curry mailing list
Received on Do Okt 25 2007 - 12:24:51 CEST

This archive was generated by hypermail 2.3.0 : Di Nov 28 2023 - 07:15:10 CET