show() of nullary terms omits parens

Bug #587787 reported by Matt Giuca
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mars
Fix Released
Low
Matt Giuca

Bug Description

type Nullary:
    Null()

?> Null
<constructor function Null>
?> Null()
Null

Expected result:
?> Null()
Null()

Printing "Null" implies that the expression Null evaluates to the same value, which it does not. Empty parens are required in the output.

This is a deficiency in the val_term constructor of interpret -- it cannot distinguish between parameterless and nullary terms. Change the list to a maybe(list), and remove the special case for the empty list when displaying.

Tags: interpreter

Related branches

Revision history for this message
Matt Giuca (mgiuca) wrote :

Fixed in trunk r1086.

Changed in mars:
status: Triaged → Fix Committed
Matt Giuca (mgiuca)
Changed in mars:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.