Ticket #147 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

Parse error on let

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

Description

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

Changed 5 years ago by erikd

  • owner set to erikd
  • status changed from new to assigned

Test is T147-SuperfluousLet?.

Changed 5 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.

Changed 4 years ago by erikd

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in:

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

Note: See TracTickets for help on using tickets.