Ticket #579 (closed task: fixed)

Opened 19 months ago

Last modified 19 months ago

kind of type variables must be given explicitely

Reported by: maeder Owned by: maeder
Priority: minor Milestone: 0.9
Component: logic-hascasl Version: 0.87
Keywords: Cc: lschrode, till

Description

currently "forall a . ..." or "var a" introduce a type variable of kind Type (without warning) that does not shadow a normal variable named "a".

The user is supposed to write "a : Type" explicitly. This needs to be adjusted in the language summary as well.

With forall and var both normal and type variables may be introduced. This (almost) forces the name space of classes and types to be disjoint in order to decide what kind of variable is declared.

I don't think the name space of types (incl. type variables) and functions (incl. normal variables) should be disjoint, but maybe a warning should be emitted for non-shadowing variables.

Another question is, if forall bindings of type variables may occur in subformulas like in

. true => forall a: Type ; x: a . x = x

Change History

Changed 19 months ago by maeder

  • status changed from new to closed
  • resolution set to fixed

type variable declaration within forall following a dot are now forbidden. Warnings are issued for overlapping identifiers for normal and type variables.

Note: See TracTickets for help on using tickets.