home *** CD-ROM | disk | FTP | other *** search
/ PSION CD 2 / PsionCDVol2.iso / Programs / 876 / hugs.sis / Trace.hs < prev    next >
Encoding:
Text File  |  2000-09-21  |  744 b   |  19 lines

  1. -----------------------------------------------------------------------------
  2. -- Trace primitive: import this library as a simple way to access the
  3. -- impure trace primitive.  This is sometimes useful for debugging,
  4. -- although understanding the output that it produces can sometimes be
  5. -- a major challenge unless you are familiar with the intimate details
  6. -- of how programs are executed.
  7. --
  8. -- Suitable for use with Hugs 98
  9. -----------------------------------------------------------------------------
  10.  
  11. module Trace( trace, traceShow ) where
  12.  
  13. primitive trace :: String -> a -> a
  14.  
  15. traceShow :: Show a => String -> a -> a
  16. traceShow msg x = trace (msg ++ show x) x
  17.  
  18. -----------------------------------------------------------------------------
  19.