Safe Haskell | None |
---|---|
Language | Haskell2010 |
The base constructors for generic backtracing.
NOTE this currently can capture dot-bracket notation, but not deep semantics.
Synopsis
- data Backtraced ty where
- Epsilon :: Backtraced ty
- Cons :: ty -> Backtraced ty -> Backtraced ty
- Snoc :: Backtraced ty -> ty -> Backtraced ty
- Append :: Backtraced ty -> Backtraced ty -> Backtraced ty
- (<|) :: ty -> Backtraced ty -> Backtraced ty
- (|>) :: Backtraced ty -> ty -> Backtraced ty
- (><) :: Backtraced ty -> Backtraced ty -> Backtraced ty
Documentation
data Backtraced ty where Source #
This is a bit like a lazy Data.Sequence in terms of constructors. We can
not be spine-strict, otherwise we'd use Data.Sequence
and enjoy the better
performance.
Epsilon :: Backtraced ty | This backtrace is done |
Cons :: ty -> Backtraced ty -> Backtraced ty | Expand a backtrace to the left. This is lazy, since backtracing relies on laziness. |
Snoc :: Backtraced ty -> ty -> Backtraced ty | Expand lazily to the right. |
Append :: Backtraced ty -> Backtraced ty -> Backtraced ty | concatenate two structures |
Instances
(<|) :: ty -> Backtraced ty -> Backtraced ty infixr 5 Source #
(|>) :: Backtraced ty -> ty -> Backtraced ty infixl 5 Source #
(><) :: Backtraced ty -> Backtraced ty -> Backtraced ty infixr 5 Source #