Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#208 closed defect (fixed)

Trying to define suspend function causes Prelude.read: no parse

Reported by: benl Owned by: erikd
Priority: normal Milestone:
Component: Source Desugarer Version: 0.1.2
Keywords: Cc:

Description (last modified by benl)

The following causes "Prelude.read: no parse" when compiled. It works when we change "suspend" to "suspend1". It'll be because we "suspend1" has special meaning to the compiler, and the VarId for it contains the arity of the function. If there is no trailing number, then the renamer will try to read the empty string as an Int, hence the error.

foreign import "primSuspend1"
 suspend
	:: forall a b !e1 $c0
	.  (a -(!e1 $c0)> b) -> a -($c1)> b
	:- $c1	= ${f : $c0}
	,  Pure  !e1
	,  LazyH b
	:$ Obj -> Obj -> Obj

Change History (4)

comment:1 Changed 9 years ago by benl

  • Description modified (diff)

comment:2 Changed 9 years ago by erikd

  • Owner set to erikd
  • Status changed from new to assigned

comment:3 Changed 9 years ago by erikd

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in:

Sun Apr 10 15:46:05 EST 2011  Erik de Castro Lopo <erikd@mega-nerd.com>
  * Fix #208 : Fix renamer name clash on function 'suspend'.

comment:4 Changed 8 years ago by benl

  • Milestone 0.1.3 deleted

Milestone 0.1.3 deleted

Note: See TracTickets for help on using tickets.