on master help sign in
fix display of relations with empty tuple sets
commite9350a5e925a446f20a08e3793e5f11c59cd8769 authorAgentM <agentm@themactionfaction.com> dateThu 5 Feb 2015, 11:36 (12 years ago) parentf86177e
1 file changed+4−4
RelationTerm.hs+4−4
RelationTerm.hs+4−4
@@ -74,12 +74,12 @@ renderTable table = renderHeader table (fst cellLocs) ++ renderBody (snd table)
7474 cellLocs = cellLocations table
7575
7676renderHeader :: Table -> [Int] -> String
77−renderHeader (header, body) columnLocations = renderTopBar ++ renderHeaderNames ++ renderBottomBar ++ "\n"
77+renderHeader (header, body) columnLocations = renderTopBar ++ renderHeaderNames ++ renderBottomBar
7878 where
7979 renderTopBar = boxTL ++ concat (L.intersperse boxTB (map (\x -> repeatString x boxH) columnLocations)) ++ boxTR ++ "\n"
8080 renderHeaderNames = renderRow header columnLocations 1 boxV
8181 renderBottomBar = if length body == 0 then ""
82− else renderHBar boxLB boxC boxRB columnLocations
82+ else renderHBar boxLB boxC boxRB columnLocations ++ "\n"
8383
8484renderHBar :: String -> String -> String -> [Int] -> String
8585renderHBar left middle end columnLocations = left ++ concat (L.intersperse middle (map (\x -> repeatString x boxH) columnLocations)) ++ end
@@ -116,6 +116,6 @@ showRelation rel
116116 | otherwise = renderTable (relationAsTable rel)
117117
118118
119−simpleExample = s
120−groupedExample = case group (S.fromList ["CITY"]) "CITYREL" s of {Right rel -> rel}
119+--simpleExample = s
120+--groupedExample = case group (S.fromList ["CITY"]) "CITYREL" s of {Right rel -> rel}
121121