|
Re: [GHC] #474: Debug.Trace.trace should work on Show: msg#00053lang.haskell.glasgow.bugs
#474: Debug.Trace.trace should work on Show ------------------------------+--------------------------------------------- Reporter: jch | Owner: nobody Type: feature request | Status: reopened Priority: lowest | Milestone: 6.4.2 Component: libraries/base | Version: None Severity: minor | Resolution: Keywords: | Os: Unknown Difficulty: Unknown | Architecture: Unknown ------------------------------+--------------------------------------------- Old description: > {{{ > Debug.Trace.trace has type > > trace :: String -> a -> a > > which forces me to insert calls to show. Could it be > generalised to > > trace :: Show a => a -> b -> b > > Thanks, > > Juliusz Chroboczek > > }}} New description: {{{ Debug.Trace.trace has type trace :: String -> a -> a which forces me to insert calls to show. Could it be generalised to trace :: Show a => a -> b -> b Thanks, Juliusz Chroboczek }}} Comment (by simonmar): This is similar to the difference between {{{print}}} and {{{putStr}}}, that is, there are good reasons to have both. I've no objection to adding {{{ traceShow :: Show a => a -> b -> b traceShow = trace . show }}} but that doesn't seem to save a whole lot of typing. Perhaps a different name? -- Ticket URL: <http://cvs.haskell.org/trac/ghc/ticket/474> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler_______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@xxxxxxxxxxx http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [GHC] #701: Better CSE optimisation, GHC |
|---|---|
| Next by Date: | Re: ghci command history broken under rxvt and xterm, Simon Marlow |
| Previous by Thread: | Re: [GHC] #474: Debug.Trace.trace should work on Show, GHC |
| Next by Thread: | Re: [GHC] #474: Debug.Trace.trace should work on Show, GHC |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |