Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#147 closed defect (fixed)

Parse error on let

Reported by: erikd Owned by: erikd
Priority: blocker Milestone:
Component: Source Parser Version: 0.1.2
Keywords: Cc:


For the function:

fun x
 = do  let b () = x + 1
       x + b ()

ddc gives an error message "unexpected x" about the 'x' in the function's parameter list.

Unlike Haskell, Disciple doesn't need the 'let' and the above function should be written as:

fun x
 = do  b () = x + 1
       x + b ()

Obviously, the error message should be improved to point to the 'let'.

Change History (4)

comment:1 Changed 10 years ago by erikd

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

Test is T147-SuperfluousLet?.

comment:2 Changed 10 years ago by erikd

  • Summary changed from Need better error msg on superfluous let to Parse error on let

Discussion with Ben suggested we need to accept this usage of let to be compatible with Haskell so we can run code from the haskell test suite.

comment:3 Changed 10 years ago by erikd

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

Fixed in:

Thu Mar 4 21:18:13 EST 2010 Erik de Castro Lopo <erikd@…> Fix #147 : Parse error on let.

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.