Opened 6 years ago

Last modified 18 months ago

#303 new feature

Allow builtin type names to be reused as data constructor names.

Reported by: benl Owned by: steggles
Priority: low Milestone: _|_
Component: Core Parser Version: 0.4.1
Keywords: Cc:

Description (last modified by benl)

We're using a unified readName function to read constructor names at both the type and the value level. This means we can't reuse, say Region and Effect as data constructor names.

Example:

module Test
data Foo where
        Region : Foo
        Effect : Foo
with letrec
foo (x : Foo) : Foo
 = case x of
        Region -> Effect
        Effect -> Region

Builtin type constructor names cannot be reused as data constructor names, though user-defined type constructor names can be reused.

It might be better to leave this as-is, at least without a clear and present reason not to. Setting the milestone to _|_

Change History (8)

comment:1 Changed 6 years ago by benl

  • Milestone changed from 0.3.2 to 0.3.3

comment:2 Changed 5 years ago by benl

  • Milestone changed from 0.3.3 to 0.4.0

comment:3 Changed 5 years ago by benl

  • Milestone changed from 0.4.0 to 0.4.1

comment:4 Changed 5 years ago by benl

  • Description modified (diff)
  • Milestone changed from 0.4.1 to _|_
  • Priority changed from normal to low
  • Summary changed from Split type and value namespaces to Allow builtin type names to be reused as data constructor names.
  • Type changed from defect to enhancement

comment:5 Changed 5 years ago by benl

  • Owner set to steggles

comment:6 Changed 5 years ago by benl

  • Version 0.3.1 deleted

comment:7 Changed 5 years ago by benl

  • Version set to 0.4.1

comment:8 Changed 18 months ago by benl

  • Type changed from enhancement to feature
Note: See TracTickets for help on using tickets.