statebox / cql

CQL: Categorical Query Language implementation in Haskell
GNU Affero General Public License v3.0
162 stars 14 forks source link

Pretty-printing #71

Open epost opened 5 years ago

epost commented 5 years ago

Current situation

Output looks something like this:

algebra
"E" (2)
-------------
"e"."f": "f" = "e", "a1" = Right ("e"."f","a2"),"a2" = Right ("e"."f","a2")
"e": "f" = "e"."f", "a1" = Right ("e","a2"),"a2" = Right ("e","a2")

Here, algebra is a section heading, and show-like output, such as Right ("e","a2") is mixed with pretty-printed output like the section heading and -------.

TODO

Ryan's suggestions:

Fix Show instances:

wisnesky commented 5 years ago

todo:

wisnesky commented 5 years ago

Desired output:

Department (1) | secretary | name
----------------------------------
a.worksIn a a.worksIn.name

Employee (2) | manager | worksIn | age | first | last
--------------------------------------------------------
a a a.worksIn a.age a.first a.last
b b b.worksIn b.age b.first b.last

nat (2)
--------
a.age
b.age

string (5)
-----------
a.worksIn.name