-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A compiler front-end generator.
--
-- The BNF Converter is a compiler construction tool generating a
-- compiler front-end from a Labelled BNF grammar. It was originally
-- written to generate Haskell, but starting from Version 2.0, it can
-- also be used for generating Java, C++, and C.
--
-- Given a Labelled BNF grammar the tool produces: an abstract syntax as
-- a HaskellC++C module or Java directory, a case skeleton for the
-- abstract syntax in the same language, an Alex, JLex, or Flex lexer
-- generator file, a Happy, CUP, or Bison parser generator file, a
-- pretty-printer as a HaskellJavaC++/C module, a Latex file
-- containing a readable specification of the language.
@package BNFC
@version 2.8.1
module Data.Pair
data Pair a
(:/:) :: a -> a -> Pair a
[leftOf] :: Pair a -> a
[rightOf] :: Pair a -> a
instance GHC.Show.Show a => GHC.Show.Show (Data.Pair.Pair a)
instance GHC.Base.Functor Data.Pair.Pair
instance GHC.Base.Applicative Data.Pair.Pair
module Algebra.RingUtils
class AbelianGroup a
zero :: AbelianGroup a => a
(+) :: AbelianGroup a => a -> a -> a
class AbelianGroup a => AbelianGroupZ a
isZero :: AbelianGroupZ a => a -> Bool
class AbelianGroupZ a => Ring a
(*) :: Ring a => a -> a -> a
class (AbelianGroupZ a) => RingP a
mul :: RingP a => Bool -> a -> a -> Pair a
data Pair a
(:/:) :: a -> a -> Pair a
[leftOf] :: Pair a -> a
[rightOf] :: Pair a -> a
select :: Bool -> [t] -> Pair [t]
onlyLeft :: [t] -> Pair [t]
onlyRight :: [t] -> Pair [t]
newtype O f g a
O :: f (g a) -> O f g a
[fromO] :: O f g a -> f (g a)
sum :: AbelianGroup a => [a] -> a
mulDefault :: RingP a => a -> a -> a
instance GHC.Show.Show (f (g a)) => GHC.Show.Show (Algebra.RingUtils.O f g a)
instance Algebra.RingUtils.AbelianGroupZ (f (g a)) => Algebra.RingUtils.AbelianGroupZ (Algebra.RingUtils.O f g a)
instance Algebra.RingUtils.AbelianGroup (f (g a)) => Algebra.RingUtils.AbelianGroup (Algebra.RingUtils.O f g a)
instance Algebra.RingUtils.AbelianGroup GHC.Types.Int
instance Algebra.RingUtils.AbelianGroupZ GHC.Types.Int
instance (GHC.Base.Functor f, GHC.Base.Functor g) => GHC.Base.Functor (Algebra.RingUtils.O f g)
instance Algebra.RingUtils.AbelianGroup a => Algebra.RingUtils.AbelianGroup (Data.Pair.Pair a)
instance Algebra.RingUtils.AbelianGroupZ a => Algebra.RingUtils.AbelianGroupZ (Data.Pair.Pair a)
instance Algebra.RingUtils.Ring GHC.Types.Int
instance Algebra.RingUtils.AbelianGroup GHC.Types.Bool
module Data.Matrix.Quad
data Shape
Bin :: Shape -> Shape -> Shape
Leaf :: Shape
data Shape' :: Shape -> *
Bin' :: !Int -> Shape' s -> Shape' s' -> Shape' (Bin s s')
Leaf' :: Shape' Leaf
data SomeShape
S :: Shape' s -> SomeShape
data Mat :: Shape -> Shape -> * -> *
Quad :: !(Mat x1 y1 a) -> !(Mat x2 y1 a) -> !(Mat x1 y2 a) -> !(Mat x2 y2 a) -> Mat (Bin x1 x2) (Bin y1 y2) a
Zero :: Mat x y a
One :: !a -> Mat Leaf Leaf a
Row :: Mat x1 Leaf a -> Mat x2 Leaf a -> Mat (Bin x1 x2) Leaf a
Col :: Mat Leaf y1 a -> Mat Leaf y2 a -> Mat Leaf (Bin y1 y2) a
data Vec :: Shape -> * -> *
Z :: Vec s a
O :: a -> Vec Leaf a
(:!) :: Vec s a -> Vec s' a -> Vec (Bin s s') a
row :: Mat x1 Leaf a -> Mat x2 Leaf a -> Mat (Bin x1 x2) Leaf a
col :: Mat Leaf y1 a -> Mat Leaf y2 a -> Mat Leaf (Bin y1 y2) a
quad :: Mat x1 y1 a -> Mat x2 y1 a -> Mat x1 y2 a -> Mat x2 y2 a -> Mat (Bin x1 x2) (Bin y1 y2) a
one :: AbelianGroupZ a => a -> Mat Leaf Leaf a
(.+.) :: AbelianGroupZ a => Mat x y a -> Mat x y a -> Mat x y a
mult :: RingP a => Bool -> Mat x y a -> Mat z x a -> Mat z y (Pair a)
trav :: AbelianGroupZ a => Mat y x (Pair a) -> Pair (Mat y x a)
q0 :: Mat (Bin x x') (Bin y y') a
closeDisjointP :: RingP a => Bool -> Mat x x a -> Mat y x (Pair a) -> Mat y y a -> Pair (Mat y x a)
showR :: Mat x y a -> String
bin' :: Shape' s -> Shape' s' -> Shape' (Bin s s')
mkShape :: Int -> SomeShape
mkSing :: AbelianGroupZ a => Shape' x -> Shape' y -> a -> Mat x y a
data SomeTri a
T :: Shape' s -> Pair (Mat s s a) -> SomeTri a
type Q a = SomeTri a
mkUpDiag :: AbelianGroupZ a => [a] -> Shape' s -> Mat s s a
close :: RingP a => Bool -> Mat s s (Pair a) -> Pair (Mat s s a)
mkTree :: RingP a => [Pair a] -> SomeTri a
quad' :: Applicative f => f (Mat x1 y1 a) -> f (Mat x2 y1 a) -> f (Mat x1 y2 a) -> f (Mat x2 y2 a) -> f (Mat (Bin x1 x2) (Bin y1 y2) a)
mergein :: RingP a => Bool -> SomeTri a -> Pair a -> SomeTri a -> SomeTri a
-- | A variant of zipWith on vectors
zw :: (AbelianGroup a, AbelianGroup b) => (a -> b -> c) -> Vec y a -> Vec y b -> Vec y c
-- | Lookup in a vector
lk :: AbelianGroup a => Int -> Shape' x -> Vec x a -> a
-- | Linearize a matrix
lin' :: AbelianGroup a => Mat x y a -> Vec y (Vec x a)
-- | Contents of a vector
contents :: Shape' x -> Vec x a -> [(Int, a)]
first :: (t -> t1) -> (t, t2) -> (t1, t2)
second :: (t -> t2) -> (t1, t) -> (t1, t2)
data Path :: Shape -> *
Here :: Path Leaf
Low :: Path s -> Path (Bin s s')
High :: Path s -> Path (Bin s' s)
(<||>) :: Maybe (a, Path x) -> Maybe (a, Path x') -> Maybe (a, Path (Bin x x'))
-- | What is, and where is the rightmost non-zero element on a given line
-- of the matrix?
rightmostOnLine :: Path y -> Mat x y a -> Maybe (a, Path x)
-- | Is this the rightmost path?
isRightmost :: Path x -> Bool
results' :: AbelianGroup a => Mat y y a -> Path y -> [(Path y, a, Path y)]
results :: AbelianGroupZ a => SomeTri a -> [(Int, a, Int)]
leftMost :: Shape' s -> Path s
fromPath :: Shape' y -> Path y -> Int
root' :: AbelianGroup a => Mat x y a -> a
root :: AbelianGroup t => SomeTri t -> t
single :: AbelianGroupZ a => Pair a -> SomeTri a
square2 :: AbelianGroupZ a => Pair a -> SomeTri a
square3 :: RingP a => Bool -> Pair a -> Pair a -> SomeTri a
sz' :: Shape' s -> Int
(|+|) :: [[a]] -> [[a]] -> [[a]]
(-+-) :: [a] -> [a] -> [a]
lin :: AbelianGroup a => Shape' x -> Shape' y -> Mat x y a -> [[a]]
sparse :: AbelianGroup a => Shape' x -> Shape' y -> Mat x y a -> [(Int, Int, a)]
shiftX :: Shape' s -> [(Int, t, t1)] -> [(Int, t, t1)]
shiftY :: Shape' s -> [(t, Int, t1)] -> [(t, Int, t1)]
fingerprint :: AbelianGroupZ t => SomeTri t -> [[Char]]
scatterplot :: AbelianGroup t => SomeTri t -> [Char]
instance Algebra.RingUtils.AbelianGroupZ a => Algebra.RingUtils.AbelianGroup (Data.Matrix.Quad.Mat x y a)
instance Algebra.RingUtils.AbelianGroup a => Algebra.RingUtils.AbelianGroup (Data.Matrix.Quad.Vec x a)
module Data.Matrix.Class
fingerprint :: (AbelianGroupZ a, Matrix m) => m a -> [[Char]]
(***) :: (t -> t2) -> (t1 -> t3) -> (t, t1) -> (t2, t3)
data Dimension
XD :: Dimension
YD :: Dimension
quad :: (AbelianGroup a, Matrix m) => m a -> m a -> m a -> m a -> m a
nextDim :: Dimension -> Dimension
type Extent = (Int, Int)
ext :: Dimension -> (t, t) -> t
glueExt :: (AbelianGroup t, AbelianGroup t1) => Dimension -> (t, t1) -> (t, t1) -> (t, t1)
splitExt :: Num t => Dimension -> t -> (t, t) -> ((t, t), (t, t))
class Matrix m
at :: (Matrix m, AbelianGroupZ a) => Int -> Int -> m a -> a
extent :: Matrix m => m a -> Extent
-- | Sigleton matrix
singleton :: (Matrix m, AbelianGroupZ a) => a -> m a
glue :: (Matrix m, AbelianGroup a) => Dimension -> m a -> m a -> m a
split :: (Matrix m, AbelianGroupZ a) => Dimension -> Int -> m a -> (m a, m a)
zeroMatrix :: (Matrix m, AbelianGroup a) => Int -> Int -> m a
(<|>) :: (AbelianGroup a, Matrix m) => m a -> m a -> m a
(<->) :: (AbelianGroup a, Matrix m) => m a -> m a -> m a
countColumns :: Matrix m => m a -> Int
countRows :: Matrix m => m a -> Int
chopLastColumn :: (AbelianGroupZ a, Matrix m) => m a -> m a
chopFirstRow :: (AbelianGroupZ a, Matrix m) => m a -> m a
chopFirstColumn :: (AbelianGroupZ a, Matrix m) => m a -> m a
chopLastRow :: (AbelianGroupZ a, Matrix m) => m a -> m a
lastColumn :: (AbelianGroupZ a, Matrix m) => m a -> m a
firstRow :: (AbelianGroupZ a, Matrix m) => m a -> m a
instance GHC.Show.Show Data.Matrix.Class.Dimension
instance GHC.Classes.Eq Data.Matrix.Class.Dimension
instance Data.Matrix.Class.Matrix m => Data.Matrix.Class.Matrix (Algebra.RingUtils.O Data.Pair.Pair m)
module Parsing.Chart
fingerprint :: AbelianGroupZ t => SomeTri t -> [[Char]]
mkTree2 :: RingP a => Bool -> [Pair a] -> Q a
mkTree :: RingP a => [Pair a] -> Q a
mkTree' :: RingP a => [Pair a] -> Q a
type Set a = [a]
type MT2 a = Q a
genXPM :: [String] -> String
root :: AbelianGroup t => SomeTri t -> t
mergein :: RingP a => Bool -> SomeTri a -> Pair a -> SomeTri a -> SomeTri a
single :: AbelianGroupZ a => Pair a -> SomeTri a
instance Algebra.RingUtils.AbelianGroup (Parsing.Chart.Set a)
instance Algebra.RingUtils.AbelianGroupZ (Parsing.Chart.Set a)
module Parsing.TestProgram
type Verbosity = Int
putStrV :: Verbosity -> String -> IO ()
mainTest :: (RingP [(category, Any)], Eq category) => ((category, Any) -> String) -> (Bool -> token -> Pair [(category, Any)]) -> (String -> [token]) -> (token -> (Int, Int)) -> (category -> String) -> (category -> [category]) -> IO ()
pairs :: [t] -> [(t, t)]
resSz :: Num a => (a, t, a) -> a