[curry] How to interpret a data type with no RHS

From: Andy Jost <Andrew.Jost_at_synopsys.com>
Date: Fri, 24 May 2019 19:06:45 +0000

I can define an empty data type in Curry, e.g.:

data A

The built-in types such as Char, Int and Float are defined this way in the =
Prelude. Prior to the introduction of typeclasses the Curry frontend would=
 translate this to a FlatCurry Type with no constructors. Newer versions p=
roduce a type with one constructor named "_Constr#A".

I'd like to understand how to interpret this. Is the above legal Curry? I=
s this perhaps a forward declaration or opaque type? Can the type, A, be d=
efined later? If so, would it have to be defined in the same module? Is t=
his documented somewhere?

I'm tempted to reject such a declaration unless the system can find a built=
-in definition but I don't want to reject legal programs.


curry mailing list -- curry_at_lists.rwth-aachen.de
To unsubscribe send an email to curry-leave_at_lists.rwth-aachen.de
Received on Mo Mai 27 2019 - 15:11:40 CEST

This archive was generated by hypermail 2.3.0 : Mi Sep 30 2020 - 07:15:04 CEST