1
0
forked from GitHub/gf-core

Changed IOExts import to Debug.Trace

This commit is contained in:
bringert
2005-04-26 08:54:11 +00:00
parent 8f84c1934c
commit 8b7e450f1c
2 changed files with 12 additions and 12 deletions

View File

@@ -5,9 +5,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
-- > CVS $Date: 2005/04/21 16:21:06 $
-- > CVS $Date: 2005/04/26 09:54:11 $
-- > CVS $Author: bringert $
-- > CVS $Revision: 1.6 $
-- > CVS $Revision: 1.7 $
--
-- to write a GF abstract grammar into a Haskell module with translations from
-- data objects into GF trees. Example: GSyntax for Agda.
@@ -36,11 +36,11 @@ haskPreamble =
[
"module GSyntax where",
"",
"import Ident",
"import Grammar",
"import PrGrammar",
"import Macros",
"import Operations",
"import GF.Infra.Ident",
"import GF.Grammar.Grammar",
"import GF.Grammar.PrGrammar",
"import GF.Grammar.Macros",
"import GF.Data.Operations",
"----------------------------------------------------",
"-- automatic translation from GF to Haskell",
"----------------------------------------------------",

View File

@@ -6,9 +6,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
-- > CVS $Date: 2005/04/16 05:40:50 $
-- > CVS $Author: peb $
-- > CVS $Revision: 1.3 $
-- > CVS $Date: 2005/04/26 09:54:11 $
-- > CVS $Author: bringert $
-- > CVS $Revision: 1.4 $
--
-- Tracing utilities for debugging purposes.
-- If the CPP symbol TRACING is set, then the debugging output is shown.
@@ -18,7 +18,7 @@
module GF.System.Tracing
(trace, trace2, traceM, traceCall, tracePrt, traceCalcFirst) where
import qualified IOExts
import qualified Debug.Trace as Trace
-- | emit a string inside braces, before(?) calculating the value:
-- @{str}@
@@ -44,7 +44,7 @@ tracePrt :: String -> (a -> String) -> a -> a
traceCalcFirst :: a -> b -> b
#if TRACING
trace str a = IOExts.trace (bold ++ "{" ++ normal ++ str ++ bold ++ "}" ++ normal) a
trace str a = Trace.trace (bold ++ "{" ++ normal ++ str ++ bold ++ "}" ++ normal) a
trace2 fun str a = trace (bold ++ fgcol 1 ++ fun ++ ": " ++ normal ++ str) a
traceM fun str = trace2 fun str (return ())
traceCall fun start prt val