Skip to content

Explicit polarity annotation #570

Closed
Closed

Description

@GoogleCodeExporter

This code does not work since polarity of Nat (monotone in i) is only inferred when the constructors are given. But it is already needed for checking sub.

  data Nat : {i : Size} -> Set

  sub : {i : Size} -> Nat {i} → Nat {↑ i}
  sub x = x

  data Nat where
    zero : {i : Size}            -> Nat {↑ i}
    suc  : {i : Size} -> Nat {i} -> Nat {↑ i}

Original issue reported on code.google.com by [email protected] on 19 Feb 2012 at 10:21

Attachments:

Activity

  1. added
    positivity
    type: enhancement
    sized types
    on Aug 8, 2015
  2. andreasabel commented on Jan 17, 2017

    @andreasabel
    Member

    For another example, see #2411.

  3. UlfNorell commented on May 24, 2018

    @UlfNorell
    Member

    Syntax discussion in #2513.

  4. added this to the 2.6.0 milestone on May 24, 2018
  5. modified the milestones: , 2.5.5 on Jun 20, 2018
  6. modified the milestones: 2.6.0, icebox on Nov 15, 2018
  7. modified the milestones: icebox, 2.8.0 on Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

polaritypositivitysized typestype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions