tuura / plato

A DSL for asynchronous circuits specification
Other
12 stars 2 forks source link

boolean: show instances for Literal, CNF, DNF. Self-dual functions. #81

Closed ARandomOWL closed 6 years ago

ARandomOWL commented 7 years ago

The show instances are useful when manipulating boolean equations directly.

snowleopard commented 7 years ago

@ARandomOWL Thanks! I've left a bunch of comments above.

ARandomOWL commented 7 years ago

I have addressed most comments. I will look into dealing with the parsing errors, I'm not too clear on it at the moment.

ARandomOWL commented 7 years ago

@snowleopard Parse errors are now handled

ARandomOWL commented 6 years ago

@snowleopard I have changed over to the PrettyPrint library. I'm still not happy with the code. Problems stem from the pPrint String instance being implemented as text . show. I would be grateful of suggestions for improvement.

snowleopard commented 6 years ago

@ARandomOWL What about defining only the Pretty (Literal String) instance? If you drop the more general Pretty a => Pretty (Literal a) there will be no overlapping. Users can then define Pretty instances for literals of their favourite types themselves. Same for DNF/CNF.

ARandomOWL commented 6 years ago

@snowleopard I agree it makes sense to remove the generic instances for now. I have pushed that but Appveyor seems to be having problems unrelated to my code.

snowleopard commented 6 years ago

OK, looks good -- just one minor comment.

ARandomOWL commented 6 years ago

I've addressed the comment, and now the checks pass :)

snowleopard commented 6 years ago

👍