Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d5b92c4266
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (21 sloc) 0.819 kb
-----------------------------------------------------------------------------
-- |
-- Module : Ministg.CallStack
-- Copyright : (c) 2009-2012 Bernie Pope
-- License : BSD-style
-- Maintainer : florbitous@gmail.com
-- Stability : experimental
-- Portability : ghc
--
-- Stack of program annotations. Simulate a call stack.
-----------------------------------------------------------------------------
module Ministg.CallStack (CallStack, push, showCallStack, prettyCallStack) where
import Ministg.Pretty
type CallStack = [String]
push :: String -> CallStack -> CallStack
push = (:)
showCallStack :: CallStack -> String
showCallStack = unlines
prettyCallStack :: CallStack -> Doc
prettyCallStack [] = empty
prettyCallStack stack = char '<' <> hcat (punctuate (text "|") (map text stack)) <> char '>'
Jump to Line
Something went wrong with that request. Please try again.