beastaugh/hatt — pull request #6 by psibi (2014-08-06 20:40:57+00:00)
Title: Making truthTable function to generate string without colour

Making the truthTable function to generate string without color as it seems the sensible default. (although it's debatable)

Added a function truthTablewithColor which will handle the coloured situations.

The primary motivation was for cases something like this:

```
import Data.Logic.Propositional
import System.IO

p = Variable (Var 'p')
q = Variable (Var 'q')

exp1 = (Negation p) `Disjunction` q
exp1T = truthTable exp1

main = writeFile "Table.txt" exp1T
```

The output produced earlier was like this:

p q | (¬p ∨ q)
--------------
[92mT[0m [92mT[0m | [92mT[0m
[92mT[0m [91mF[0m | [91mF[0m
[91mF[0m [92mT[0m | [92mT[0m
[91mF[0m [91mF[0m | [92mT[0m

After the patch, it will produce like this:

p q | (¬p ∨ q)
--------------
T T | T
T F | F
F T | T
F F | T