Changeset 13359 for src/Pugs/Val
- Timestamp:
- 09/16/06 11:19:16 (2 years ago)
- Files:
-
- 1 modified
-
src/Pugs/Val/Code.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Val/Code.hs
r13353 r13359 161 161 162 162 prettyParam :: Param -> Bool -> Bool -> Doc 163 prettyParam p isReq isPos = sep [ staticTypes, varDecl, traits, unpacking, constraints, debugDump ]163 prettyParam p isReq isPos = sep [ staticTypes, varDecl, defaultVal, traits, unpacking, constraints, debugDump ] 164 164 where 165 165 varDecl = varName <> defaultHint … … 168 168 | v_name (p_variable p) == p_label p = text $ ":" ++ (cast $ p_variable p) 169 169 | otherwise = text ":" <> text (cast p_label p) <> (parens $ text (cast p_variable p)) 170 -- staticTypes = hsep $ map (text . (cast :: Types.Type -> String)) $ p_types p XXX: why is this wrong? 171 staticTypes = hsep $ map (text . show) $ p_types p 170 staticTypes = hsep $ map (text . Types.showType) $ p_types p 172 171 defaultHint = if not isReq && not haveDefault then text "?" else empty 173 172 haveDefault = isJust $ unDefault $ p_default p 174 defaultVal = if haveDefault then equals <+> text " ..." else empty173 defaultVal = if haveDefault then equals <+> text "{...}" else empty -- FIXME: pretty the exp, if we lift into Eval? 175 174 traits = sep [acc, ref, lazy, slots] 176 175 unpacking = case p_unpacking p of
