From db9f6dbde0c57ac4ca878a9e758f4a87687591ca Mon Sep 17 00:00:00 2001 From: Pierre Krafft Date: Mon, 2 Apr 2018 16:42:17 +0200 Subject: [PATCH] Add trace debugging --- src/Debug.agda | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/Debug.agda diff --git a/src/Debug.agda b/src/Debug.agda new file mode 100644 index 0000000..417a03f --- /dev/null +++ b/src/Debug.agda @@ -0,0 +1,14 @@ +module Debug where +open import Data.String using (String) public +open import Level public + +{-# FOREIGN GHC import qualified Data.Text #-} +{-# FOREIGN GHC import qualified Debug.Trace as Trace #-} + +{-# FOREIGN GHC +debug' :: Data.Text.Text -> c -> c +debug' txt c = Trace.trace (Data.Text.unpack txt) c +#-} + +postulate debug : {a : Level} {A : Set a} → String → A → A +{-# COMPILE GHC debug = (\x -> (\y -> debug')) #-}