Skip to content

Commit

Permalink
Core: try to fix pretty-printing of passed caps
Browse files Browse the repository at this point in the history
  • Loading branch information
jiribenes authored Jan 22, 2025
1 parent 1cc4a4f commit b3ca299
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions effekt/shared/src/main/scala/effekt/core/PrettyPrinter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ object PrettyPrinter extends ParenPrettyPrinter {
def argsToDoc(targs: List[core.ValueType], vargs: List[core.Pure], bargs: List[core.Block]): Doc =
val targsDoc = if targs.isEmpty then emptyDoc else brackets(targs.map(toDoc))
//val cargsDoc = if cargs.isEmpty then emptyDoc else brackets(cargs.map(toDoc))
val vargsDoc = vargs.map(toDoc)
val vargsDoc = if vargs.isEmpty && !bargs.isEmpty then emptyDoc else vargs.map(toDoc)
val bargsDoc = bargs.map(toDoc)
targsDoc <> parens(vargsDoc ++ bargsDoc)
targsDoc <> parens(vargsDoc) <> braces(bargsDoc)

def paramsToDoc(tps: List[symbols.Symbol], vps: List[ValueParam], bps: List[BlockParam]): Doc = {
val tpsDoc = if (tps.isEmpty) emptyDoc else brackets(tps.map(toDoc))
Expand Down

0 comments on commit b3ca299

Please sign in to comment.