Changelog for hatt-126.96.36.199
If this renders badly as markdown, see the plain text version
- Breaking API change: variables are now represented by a newtype wrapper
Chars, rather than just a
String. This made it easier to write a
good QuickCheck instance for this type.
- Added QuickCheck instances for the
- Added a module to perform conversions of expressions to various normal forms,
including negation normal form, conjunctive normal form and disjunctive normal
form. Its use is supported in interactive mode by prefixing an expression with
"nnf", "cnf" or "dnf". Tests for the module are included and can be run with
cabal test. The module is exported as
and must be imported separately.
Data.Logic.Propositional.Tables module is now exported by the library.
truthTableP functions are still exported by the main
Data.Logic.Propositional module (as well as by the newly exposed module) for
values function is now exported.
- Make the parser slightly more liberal: unparenthesised expressions with a
binary connective as their primary connective such as "a | b" are now parsed
correctly, as are expressions with superfluous spaces such as " ( c -> ~ d )".
- Added command history and better text input handling with Haskeline.
- Add the
--coloured command-line flag and
colour command in interactive
mode to make truth value colouring optional.
- Relax containers dependency to >= 0.3 && < 0.5.
- Use truth table and parsing code to produce the example console session in
the interactive mode help text.
- Truth values are coloured green (T) and red (F) when printed.
- Correct semantics for interpreting conditionals. Fixes an operator precedence
bug in the previous implementation.
- Allow variables to be lower case ASCII letters as well as upper case.
- Pretty-printing can now be enabled and disabled when in the interactive mode
by using the
- Added an interactive mode.
- Made interactive mode the default: it's only not entered if the
flag is passed and the
--interactive flag is not.
- Added the
--pretty option to pretty-print expressions.
--evaluate option now prints ASCII truth tables by default.
truthTableP function to allow configurable expression printing.
variables function now returns a list of unique elements.
base loosened to >= 4 && < 5 so it will build with GHC 7.
- Exposed and other modules now correctly differentiated in cabal file.