Skip to content

Commit

Permalink
Add trace debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Zalastax committed Apr 2, 2018
1 parent f3797ff commit db9f6db
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Debug.agda
Original file line number Diff line number Diff line change
@@ -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')) #-}

0 comments on commit db9f6db

Please sign in to comment.