mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-19 02:08:01 +03:00
imp: lib: Hledger.Utils.Debug: re-export Debug.Breakpoint
And add breakpoint as a dependency and enable its GHC plugin in all the hledger packages, so that breakpoint's helpers can be used easily.
This commit is contained in:
parent
6a4680d561
commit
9584ebb439
@ -44,6 +44,8 @@ module Hledger.Utils.Debug (
|
|||||||
,pprint'
|
,pprint'
|
||||||
,pshow
|
,pshow
|
||||||
,pshow'
|
,pshow'
|
||||||
|
,useColorOnStdout
|
||||||
|
,useColorOnStderr
|
||||||
-- * Tracing
|
-- * Tracing
|
||||||
,traceWith
|
,traceWith
|
||||||
-- * Pretty tracing
|
-- * Pretty tracing
|
||||||
@ -92,9 +94,7 @@ module Hledger.Utils.Debug (
|
|||||||
-- ** Trace the state of hledger parsers
|
-- ** Trace the state of hledger parsers
|
||||||
,traceParse
|
,traceParse
|
||||||
,dbgparse
|
,dbgparse
|
||||||
,module Debug.Trace
|
-- ** Debug-logging to a file
|
||||||
,useColorOnStdout
|
|
||||||
,useColorOnStderr
|
|
||||||
,dlogTrace
|
,dlogTrace
|
||||||
,dlogTraceAt
|
,dlogTraceAt
|
||||||
,dlogAt
|
,dlogAt
|
||||||
@ -108,6 +108,9 @@ module Hledger.Utils.Debug (
|
|||||||
,dlog7
|
,dlog7
|
||||||
,dlog8
|
,dlog8
|
||||||
,dlog9
|
,dlog9
|
||||||
|
-- ** Re-exports
|
||||||
|
,module Debug.Breakpoint
|
||||||
|
,module Debug.Trace
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
|
||||||
@ -117,6 +120,7 @@ import Control.Monad.IO.Class
|
|||||||
import Data.List hiding (uncons)
|
import Data.List hiding (uncons)
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import qualified Data.Text.Lazy as TL
|
import qualified Data.Text.Lazy as TL
|
||||||
|
import Debug.Breakpoint
|
||||||
import Debug.Trace
|
import Debug.Trace
|
||||||
import Hledger.Utils.Parse
|
import Hledger.Utils.Parse
|
||||||
import Safe (readDef)
|
import Safe (readDef)
|
||||||
|
@ -38,6 +38,7 @@ dependencies:
|
|||||||
- ansi-terminal >=0.9
|
- ansi-terminal >=0.9
|
||||||
- array
|
- array
|
||||||
- blaze-markup >=0.5.1
|
- blaze-markup >=0.5.1
|
||||||
|
- breakpoint
|
||||||
- bytestring
|
- bytestring
|
||||||
- call-stack
|
- call-stack
|
||||||
- cmdargs >=0.10
|
- cmdargs >=0.10
|
||||||
|
@ -55,6 +55,7 @@ dependencies:
|
|||||||
- hledger >=1.26.99 && <1.27
|
- hledger >=1.26.99 && <1.27
|
||||||
- ansi-terminal >=0.9
|
- ansi-terminal >=0.9
|
||||||
- async
|
- async
|
||||||
|
- breakpoint
|
||||||
- cmdargs >=0.8
|
- cmdargs >=0.8
|
||||||
- containers >=0.5.9
|
- containers >=0.5.9
|
||||||
- data-default
|
- data-default
|
||||||
|
@ -106,6 +106,7 @@ library:
|
|||||||
- base64
|
- base64
|
||||||
- blaze-html
|
- blaze-html
|
||||||
- blaze-markup
|
- blaze-markup
|
||||||
|
- breakpoint
|
||||||
- bytestring
|
- bytestring
|
||||||
- case-insensitive
|
- case-insensitive
|
||||||
- clientsession
|
- clientsession
|
||||||
|
@ -101,6 +101,7 @@ dependencies:
|
|||||||
- hledger-lib >=1.26.99 && <1.27
|
- hledger-lib >=1.26.99 && <1.27
|
||||||
- aeson >=1
|
- aeson >=1
|
||||||
- ansi-terminal >=0.9
|
- ansi-terminal >=0.9
|
||||||
|
- breakpoint
|
||||||
- bytestring
|
- bytestring
|
||||||
- cmdargs >=0.10
|
- cmdargs >=0.10
|
||||||
- containers >=0.5.9
|
- containers >=0.5.9
|
||||||
|
@ -10,6 +10,7 @@ packages:
|
|||||||
|
|
||||||
extra-deps:
|
extra-deps:
|
||||||
# for hledger-lib:
|
# for hledger-lib:
|
||||||
|
- breakpoint-0.1.0.0
|
||||||
# for hledger:
|
# for hledger:
|
||||||
# for hledger-ui:
|
# for hledger-ui:
|
||||||
- brick-1.0
|
- brick-1.0
|
||||||
@ -20,6 +21,9 @@ nix:
|
|||||||
pure: false
|
pure: false
|
||||||
packages: [perl gmp ncurses zlib]
|
packages: [perl gmp ncurses zlib]
|
||||||
|
|
||||||
|
ghc-options:
|
||||||
|
"$locals": -fplugin Debug.Breakpoint
|
||||||
|
|
||||||
# # for precise profiling, per https://www.tweag.io/posts/2020-01-30-haskell-profiling.html:
|
# # for precise profiling, per https://www.tweag.io/posts/2020-01-30-haskell-profiling.html:
|
||||||
# # apply-ghc-options: everything
|
# # apply-ghc-options: everything
|
||||||
# # rebuild-ghc-options: true
|
# # rebuild-ghc-options: true
|
||||||
|
@ -14,6 +14,7 @@ packages:
|
|||||||
|
|
||||||
extra-deps:
|
extra-deps:
|
||||||
# for hledger-lib:
|
# for hledger-lib:
|
||||||
|
- breakpoint-0.1.0.0
|
||||||
- doctest-0.20.0
|
- doctest-0.20.0
|
||||||
# for hledger:
|
# for hledger:
|
||||||
# for hledger-ui:
|
# for hledger-ui:
|
||||||
@ -24,6 +25,9 @@ extra-deps:
|
|||||||
# for hledger-web:
|
# for hledger-web:
|
||||||
# for Shake.hs:
|
# for Shake.hs:
|
||||||
|
|
||||||
|
ghc-options:
|
||||||
|
"$locals": -fplugin Debug.Breakpoint
|
||||||
|
|
||||||
# for precise profiling, per https://www.tweag.io/posts/2020-01-30-haskell-profiling.html:
|
# for precise profiling, per https://www.tweag.io/posts/2020-01-30-haskell-profiling.html:
|
||||||
# apply-ghc-options: everything
|
# apply-ghc-options: everything
|
||||||
# rebuild-ghc-options: true
|
# rebuild-ghc-options: true
|
||||||
|
@ -18,6 +18,7 @@ packages:
|
|||||||
|
|
||||||
extra-deps:
|
extra-deps:
|
||||||
# for hledger-lib:
|
# for hledger-lib:
|
||||||
|
- breakpoint-0.1.0.0
|
||||||
# for hledger:
|
# for hledger:
|
||||||
# for hledger-ui:
|
# for hledger-ui:
|
||||||
- brick-1.0
|
- brick-1.0
|
||||||
@ -27,6 +28,9 @@ extra-deps:
|
|||||||
# for hledger-web:
|
# for hledger-web:
|
||||||
# for Shake.hs:
|
# for Shake.hs:
|
||||||
|
|
||||||
|
ghc-options:
|
||||||
|
"$locals": -fplugin Debug.Breakpoint
|
||||||
|
|
||||||
# for precise profiling, per https://www.tweag.io/posts/2020-01-30-haskell-profiling.html:
|
# for precise profiling, per https://www.tweag.io/posts/2020-01-30-haskell-profiling.html:
|
||||||
# apply-ghc-options: everything
|
# apply-ghc-options: everything
|
||||||
# rebuild-ghc-options: true
|
# rebuild-ghc-options: true
|
||||||
|
Loading…
Reference in New Issue
Block a user