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

View File

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