mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Changed IOExts import to Debug.Trace
This commit is contained in:
@@ -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",
|
||||
"----------------------------------------------------",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user