-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | abular
--   
--   Happy is a parser generator for Haskell. Given a grammar specification
--   in BNF, Happy generates Haskell code to parse the grammar. Happy works
--   in a similar way to the <tt>yacc</tt> tool for C.
--   
--   This library provides the following functionality:
--   
--   <ul>
--   <li>Data type definitions for the Grammar AST type, capturing the
--   information in .y-files (Happy.Grammar)</li>
--   <li>A parser for happy grammar files (.y) to produce a Grammar
--   (Happy.Frontend.*)</li>
--   <li>Implementations of the text book algorithms that compute the LR
--   action and goto tables for the given <a>Grammar</a>
--   (Happy.Tabular.*)</li>
--   <li>An LALR code generator to produce table-driven, deterministic
--   parsing code in Haskell (Happy.Backend.LALR.*)</li>
--   <li>A (less maintained) GLR code generator to produce table-driven,
--   non-deterministic parsing code in Haskell, where ambiguous parses
--   produce multiple parse trees (Happy.Backend.GLR.*)</li>
--   </ul>
@package happy-lib:tabular
@version 2.1.7

module Happy.Tabular.NameSet
newtype NameSet
MkNameSet :: IntSet -> NameSet
empty :: NameSet
singleton :: Name -> NameSet
fromList :: [Name] -> NameSet
delete :: Name -> NameSet -> NameSet
member :: Name -> NameSet -> Bool
null :: NameSet -> Bool
union :: NameSet -> NameSet -> NameSet
unions :: [NameSet] -> NameSet
difference :: NameSet -> NameSet -> NameSet
(\\) :: NameSet -> NameSet -> NameSet
foldr :: (Name -> b -> b) -> b -> NameSet -> b
toAscList :: NameSet -> [Name]
instance GHC.Internal.Classes.Eq Happy.Tabular.NameSet.NameSet
instance GHC.Internal.Classes.Ord Happy.Tabular.NameSet.NameSet
instance GHC.Internal.Read.Read Happy.Tabular.NameSet.NameSet
instance GHC.Internal.Show.Show Happy.Tabular.NameSet.NameSet

module Happy.Tabular.First
mkFirst :: Grammar e -> [Name] -> NameSet
mkClosure :: (a -> a -> Bool) -> (a -> a) -> a -> a

module Happy.Tabular.LALR
genActionTable :: Grammar e -> ([Name] -> NameSet) -> [Lr1State] -> ActionTable
genGotoTable :: Grammar e -> [ItemSetWithGotos] -> GotoTable
genLR0items :: Grammar e -> (Name -> RuleList) -> [ItemSetWithGotos]
precalcClosure0 :: Grammar e -> Name -> RuleList
propLookaheads :: Grammar e -> [ItemSetWithGotos] -> ([Name] -> NameSet) -> ([(Int, Lr0Item, NameSet)], Array Int [(Lr0Item, Int, Lr0Item)])
calcLookaheads :: Int -> [(Int, Lr0Item, NameSet)] -> Array Int [(Lr0Item, Int, Lr0Item)] -> Array Int [(Lr0Item, NameSet)]
mergeLookaheadInfo :: Array Int [(Lr0Item, NameSet)] -> [ItemSetWithGotos] -> [Lr1State]
countConflicts :: ActionTable -> (Array Int (Int, Int), (Int, Int))
data Lr0Item
Lr0 :: Int -> Int -> Lr0Item
data Lr1Item
Lr1 :: Int -> Int -> NameSet -> Lr1Item
type ItemSetWithGotos = (Set Lr0Item, [(Name, Int)])
data LRAction
LR'Shift :: Int -> Priority -> LRAction
LR'Reduce :: Int -> Priority -> LRAction
LR'Accept :: LRAction
LR'Fail :: LRAction
LR'MustFail :: LRAction
LR'Multiple :: [LRAction] -> LRAction -> LRAction
type Lr1State = ([Lr1Item], [(Name, Int)])
type ActionTable = Array Int Array Name LRAction
type GotoTable = Array Int Array Name Goto
data Goto
Goto :: Int -> Goto
NoGoto :: Goto
instance GHC.Internal.Classes.Eq Happy.Tabular.LALR.Goto
instance GHC.Internal.Classes.Eq Happy.Tabular.LALR.LRAction
instance GHC.Internal.Classes.Eq Happy.Tabular.LALR.Lr0Item
instance GHC.Internal.Classes.Ord Happy.Tabular.LALR.Lr0Item
instance GHC.Internal.Show.Show Happy.Tabular.LALR.Goto
instance GHC.Internal.Show.Show Happy.Tabular.LALR.LRAction
instance GHC.Internal.Show.Show Happy.Tabular.LALR.Lr0Item
instance GHC.Internal.Show.Show Happy.Tabular.LALR.Lr1Item

module Happy.Tabular.Info
genInfoFile :: [Set Lr0Item] -> Grammar e -> ActionTable -> GotoTable -> Array Int (Int, Int) -> String -> [Int] -> [String] -> Version -> String

module Happy.Tabular
data Tables
Tables :: [ItemSetWithGotos] -> [(Int, Lr0Item, NameSet)] -> Array Int [(Lr0Item, Int, Lr0Item)] -> Array Int [(Lr0Item, NameSet)] -> [([Lr1Item], [(Name, Int)])] -> GotoTable -> ActionTable -> (Array Int (Int, Int), (Int, Int)) -> ([Int], [String]) -> Tables
[lr0items] :: Tables -> [ItemSetWithGotos]
[la_spont] :: Tables -> [(Int, Lr0Item, NameSet)]
[la_prop] :: Tables -> Array Int [(Lr0Item, Int, Lr0Item)]
[lookaheads] :: Tables -> Array Int [(Lr0Item, NameSet)]
[lr1items] :: Tables -> [([Lr1Item], [(Name, Int)])]
[gotoTable] :: Tables -> GotoTable
[actionTable] :: Tables -> ActionTable
[conflicts] :: Tables -> (Array Int (Int, Int), (Int, Int))
[redundancies] :: Tables -> ([Int], [String])
genTables :: SelectReductions -> Grammar e -> Tables
type SelectReductions = LRAction -> [Int]
select_all_reductions :: SelectReductions
select_first_reduction :: SelectReductions


-- | overwritten if the module is regenerated.
--   
--   This module exports a function to locate data files, and values that
--   record the version of the package and some directories which the
--   package has been configured to be installed into.
--   
--   For further information about Cabal's options for its configuration
--   step, and their default values, see the Cabal User Guide.
module Paths_happy_lib

-- | The package version.
version :: Version

-- | The location of the directory specified by Cabal's <tt>--bindir</tt>
--   option (where executables that the user might invoke are installed).
--   This can be overridden at runtime using the environment variable
--   happy_lib_bindir.
getBinDir :: IO FilePath

-- | The location of the directory specified by Cabal's <tt>--libdir</tt>
--   option (where object libraries are installed). This can be overridden
--   at runtime using the environment variable happy_lib_libdir.
getLibDir :: IO FilePath

-- | The location of the directory specified by Cabal's
--   <tt>--dynlibdir</tt> option (where dynamic libraries are installed).
--   This can be overridden at runtime using the environment variable
--   happy_lib_dynlibdir.
getDynLibDir :: IO FilePath

-- | The location of the directory specified by Cabal's <tt>--datadir</tt>
--   option (where architecture-independent data files are installed). This
--   can be overridden at runtime using the environment variable
--   happy_lib_datadir.
getDataDir :: IO FilePath

-- | The location of the directory specified by Cabal's
--   <tt>--libexedir</tt> option (where executables that are not expected
--   to be invoked directly by the user are installed). This can be
--   overridden at runtime using the environment variable
--   happy_lib_libexedir.
getLibexecDir :: IO FilePath

-- | If the argument is a filename, the result is the name of a
--   corresponding file on the system on which the program is running, if
--   the file were listed in the <tt>data-files</tt> field of the package's
--   Cabal package description file. No check is performed that the given
--   filename is listed in that field.
getDataFileName :: FilePath -> IO FilePath

-- | The location of the directory specified by Cabal's
--   <tt>--sysconfdir</tt> option (where configuration files are
--   installed). This can be overridden at runtime using the environment
--   variable happy_lib_sysconfdir.
getSysconfDir :: IO FilePath
