Skip to content

Commit 8eb94c8

Browse files
author
jared
committed
Changed the empty sum to print never
1 parent 6ce7e66 commit 8eb94c8

File tree

1 file changed

+4
-1
lines changed
  • lambda-buffers-codegen/src/LambdaBuffers/Codegen/Typescript/Print

1 file changed

+4
-1
lines changed

lambda-buffers-codegen/src/LambdaBuffers/Codegen/Typescript/Print/Ty.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ printSum pkgMap tyN (PC.Sum ctors _) = do
8989
return $
9090
group $
9191
if null ctors
92-
then mempty
92+
then -- TODO(jaredponn): is this what we want? The empty sum
93+
-- corresponds to the `never` type in the sense that there are no
94+
-- values which satisfy this type
95+
"never"
9396
else align $ vsep $ map (pipe <+>) ctorDocs
9497

9598
-- | The name of the field which specifies a type constructor

0 commit comments

Comments
 (0)