Changeset 13494 for src/Pugs/Val

Show
Ignore:
Timestamp:
09/20/06 13:29:34 (2 years ago)
Author:
audreyt
Message:

* Prettyprinting for signature default expressions.

(Doesn't prettyprint back to Perl6 yet.)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Val/Code.hs

    r13488 r13494  
    170170    staticTypes = hsep $ map (text . Types.showType) $ p_types p 
    171171    defaultHint = if not isReq && not haveDefault then text "?" else empty 
    172     haveDefault = isJust $ unDefault $ p_default p 
    173     defaultVal  = if haveDefault then equals <+> text "{...}" else empty -- FIXME: pretty the exp, if we lift into Eval? 
     172    defaultExp  = fromJust .  unDefault $ p_default p 
     173    haveDefault = isJust . unDefault $ p_default p 
     174    defaultVal  = if haveDefault then equals <+> prettyExp defaultExp else empty 
    174175    traits      = sep [acc, ref, lazy, slots] 
    175176    unpacking   = case p_unpacking p of