We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a41a27 commit eca7730Copy full SHA for eca7730
effekt/shared/src/main/scala/effekt/core/Show.scala
@@ -201,7 +201,7 @@ object Show extends Phase[CoreTransformed, CoreTransformed] {
201
declarations flatMap generateShowInstance
202
203
def generateShowInstance(decl: Declaration)(using ctx: ShowContext)(using DeclarationContext): Option[Toplevel.Def] = decl match {
204
- case dataDecl: Declaration.Data =>
+ case dataDecl: Declaration.Data if dataDecl.constructors.size > 0 =>
205
val freshId = freshShowId
206
val toplevel = generateShowInstance(dataDecl, freshId)
207
ctx.showDefns += (ValueType.Data(dataDecl.id, List.empty) -> freshId)
0 commit comments