-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | DIMACS CNF parser library -- -- A DIMACS CNF parser library, implemented with Parsec 3, using -- ByteStrings. DIMACS CNF is a file format for describing constraint -- problems in conjunctive normal form. @package parse-dimacs @version 1.2 -- | A simple module for parsing CNF files in DIMACS format. module Language.CNF.Parse.ParseDIMACS -- | Parse a byte string containing DIMACS CNF data. The source name is -- only | used in error messages and may be the empty string. parseByteString :: SourceName -> ByteString -> Either ParseError CNF -- | Parse a file containing DIMACS CNF data. parseFile :: FilePath -> IO (Either ParseError CNF) data CNF CNF :: !Int -> !Int -> ![Clause] -> CNF -- | The number of variables in the problem as reported by the cnf header. numVars :: CNF -> !Int -- | The number of clauses in the problem as reported by the cnf header. numClauses :: CNF -> !Int clauses :: CNF -> ![Clause] type Clause = UArray Int Int instance Show CNF