Safe Haskell | None |
---|---|
Language | Haskell2010 |
PureSAT.DIMACS
Description
Parser for DIMACS CNF format
explained in e.g. https://jix.github.io/varisat/manual/0.2.0/formats/dimacs.html and https://users.aalto.fi/~tjunttil/2021-DP-AUT/notes-sat/solving.html#the-dimacs-cnf-file-format
Synopsis
- parseDimacsFile :: FilePath -> IO [[Int]]
- parseDimacs :: FilePath -> ByteString -> Either ParseError [[Int]]
- demo :: [[Int]] -> [Int]
Documentation
parseDimacsFile :: FilePath -> IO [[Int]] Source #
Parse DIMACS file
with parsec >= 3.1.17 the ParseError
is thrown on parse failure , otherwise UserError
.
parseDimacs :: FilePath -> ByteString -> Either ParseError [[Int]] Source #