unison-prelude-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Debug

Synopsis

Documentation

debug :: Show a => DebugFlag -> String -> a -> a Source #

Use for trace-style selective debugging. E.g. 1 + (debug Sync "The second number" 2)

Or, use in pattern matching to view arguments. E.g. myFunc (debug Sync "argA" -> argA) = ...

debugM :: (Show a, Monad m) => DebugFlag -> String -> a -> m () Source #

Use for selective debug logging in monadic contexts. E.g. do debugM Sync "source repo" srcRepo ...

whenDebug :: Monad m => DebugFlag -> m () -> m () Source #

A when block which is triggered if the given flag is being debugged.

debugLog :: DebugFlag -> String -> a -> a Source #

debugLogM :: Monad m => DebugFlag -> String -> m () Source #

data DebugFlag Source #

Constructors

Auth 
Codebase 
Integrity 
Merge 
Migration 
Sqlite 
Sync 
LSP 
Timing

Timing how long things take

Temp

Useful for adding temporary debugging statements during development. Remove uses of Debug.Temp before merging to keep things clean for the next person :)

Annotations

Shows Annotations when printing terms

Server

Debug endpoints of the local UI (or Share) server

PatternCoverage 
PatternCoverageConstraintSolver 
KindInference 
Update