-- Copyright 2013 Evan Laforge
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or http://www.gnu.org/licenses/gpl-3.0.txt

-- | A @.ghci@ file makes sure this module is in scope when debugging
-- interactively.
module D where
import qualified Data.Text as Text

import qualified Util.PPrint as PPrint
import qualified Util.Pretty as Pretty
import qualified Ui.Id as Id
import Types


-- | Rename 'Pretty.pprint' so it doesn't conflict with "Util.Test".
ppr :: Pretty.Pretty a => a -> IO ()
ppr :: forall a. Pretty a => a -> IO ()
ppr = forall a. Pretty a => a -> IO ()
Pretty.pprint

pp :: Show a => a -> IO ()
pp :: forall a. Show a => a -> IO ()
pp = forall a. Show a => a -> IO ()
PPrint.pprint

mkid :: Text.Text -> Id.Id
mkid :: Text -> Id
mkid Text
name = Namespace -> Text -> Id
Id.read_short Namespace
_default_ns Text
name

bid :: Text.Text -> BlockId
bid :: Text -> BlockId
bid = Id -> BlockId
Id.BlockId forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Id
mkid

vid :: Text.Text -> ViewId
vid :: Text -> ViewId
vid = Id -> ViewId
Id.ViewId forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Id
mkid

tid :: Text.Text -> TrackId
tid :: Text -> TrackId
tid = Id -> TrackId
Id.TrackId forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Id
mkid

rid :: Text.Text -> RulerId
rid :: Text -> RulerId
rid = Id -> RulerId
Id.RulerId forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Id
mkid

-- | Change this to whatever namespace you're debugging.
_default_ns :: Id.Namespace
_default_ns :: Namespace
_default_ns = Text -> Namespace
Id.namespace Text
""