mirror of
https://github.com/simonmichael/hledger.git
synced 2025-01-01 06:41:55 +03:00
more utils, Control.Monad
This commit is contained in:
parent
19fbe17ff4
commit
3458d1f379
@ -6,6 +6,7 @@ Standard always-available imports and utilities.
|
|||||||
|
|
||||||
module Ledger.Utils (
|
module Ledger.Utils (
|
||||||
module Char,
|
module Char,
|
||||||
|
module Control.Monad,
|
||||||
module Data.List,
|
module Data.List,
|
||||||
--module Data.Map,
|
--module Data.Map,
|
||||||
module Data.Maybe,
|
module Data.Maybe,
|
||||||
@ -22,6 +23,7 @@ module Test.HUnit,
|
|||||||
)
|
)
|
||||||
where
|
where
|
||||||
import Char
|
import Char
|
||||||
|
import Control.Monad
|
||||||
import Data.List
|
import Data.List
|
||||||
--import qualified Data.Map as Map
|
--import qualified Data.Map as Map
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
@ -96,6 +98,7 @@ splitAtElement e l =
|
|||||||
-- trees
|
-- trees
|
||||||
|
|
||||||
root = rootLabel
|
root = rootLabel
|
||||||
|
subs = subForest
|
||||||
branches = subForest
|
branches = subForest
|
||||||
|
|
||||||
-- remove all nodes past a certain depth
|
-- remove all nodes past a certain depth
|
||||||
@ -126,4 +129,4 @@ showtree = unlines . filter (containsRegex (mkRegex "[^ |]")) . lines . drawTree
|
|||||||
-- debugging
|
-- debugging
|
||||||
|
|
||||||
strace a = trace (show a) a -- trace a showable expression
|
strace a = trace (show a) a -- trace a showable expression
|
||||||
|
p = putStr
|
||||||
|
Loading…
Reference in New Issue
Block a user