Opened 14 years ago

Last modified 4 years ago

#107 new enhancement

Add assertions

Reported by: Owned by: none
Priority: normal Milestone:
Version: Keywords: assertion
Cc: Meta Owner:
State: discussion Section: N/A or multiple
Related Tickets:


GHC currently has a nice feature for assertions, which allow the programmer to insert a condition which is asserted to be true. If the condition is in fact false, an error is raised which contains the source code line of the assertion. A compiler flag allows all assertions to be disabled.

Possible variations:

  1. Have a form of 'assert' which can take an arbitrary string to which the source file location is prepended.
  2. assert can tie in to imprecise exceptions, if they are adopted, or a failed assertion can be bottom
  3. Remove the source line feature (makes the proposal simpler, but less useful because now all you get is the compiler flag to turn assertions off)

Change History (3)

comment:1 Changed 14 years ago by

component: HaskellPrimeProposal
Owner: changed from ijones to none

comment:2 Changed 4 years ago by Herbert Valerio Riedel


moving non-milestoned many year old legacy tickets out of the way

comment:3 Changed 4 years ago by Herbert Valerio Riedel

Priority: minornormal

Set default priority (as this confuses Trac otherwise)

Note: See TracTickets for help on using tickets.