Compiler crash using DSL
benhutchison opened this issue · 5 comments
Example: https://scastie.scala-lang.org/SlTwPE1YRLCunXVXudnyxQ
It complains about needing the compiler plugin (which is installed), but I think that is hiding a deeper problem, as changing the code to uncomment the other alternative makes problem go away.
I first hit a more complex example in larger codebase which I've tried to minimize above:
[error] == Source file context for tree position ==
[error]
[error] 96 } yield ((event, detail))
[error] 97
[error] 98 def tryResolveNext2[R: GamS: Err: Log: Rng: _option]: Eff[R, (Event, Any)] = {
[error] 99 val (intent: Intent, params: Any) = !fromOptionEff(nextIntent(!turnEndedTime))
[error] 100 val eventTime = !intent.character cata(_.timepointL.effget, endOfTurnTime)
[error] 101 !advanceTime(eventTime)
[error] 102
[error] scala.reflect.internal.Reporting.abort(Reporting.scala:61)
[error] scala.reflect.internal.Reporting.abort$(Reporting.scala:57)
[error] scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:18)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInPatternMode$1(Typers.scala:5534)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5594)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$38(Typers.scala:4752)
[error] scala.tools.nsc.typechecker.Typers$Typer$$Lambda$5996/1812978567.apply(Unknown Source)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$silent$2(Typers.scala:714)
[error] scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:714)
[error] scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4754)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4801)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5586)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.PatternTypers$PatternTyper.typedInPattern(PatternTypers.scala:157)
[error] scala.tools.nsc.typechecker.PatternTypers$PatternTyper.typedInPattern$(PatternTypers.scala:153)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInPattern(Typers.scala:111)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedTyped$1(Typers.scala:5341)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5589)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$38(Typers.scala:4752)
[error] scala.tools.nsc.typechecker.Typers$Typer$$Lambda$5996/1812978567.apply(Unknown Source)
[error] scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:700)
[error] scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4754)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4801)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5586)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedBind$1(Typers.scala:4352)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5585)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedArg$1(Typers.scala:3290)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:477)
[error] scala.tools.nsc.typechecker.PatternTypers$PatternTyper.typedArgWithFormal$1(PatternTypers.scala:108)
[error] scala.tools.nsc.typechecker.PatternTypers$PatternTyper.$anonfun$typedArgsForFormals$4(PatternTypers.scala:122)
[error] scala.tools.nsc.typechecker.PatternTypers$PatternTyper.typedArgsForFormals(PatternTypers.scala:122)
[error] scala.tools.nsc.typechecker.PatternTypers$PatternTyper.typedArgsForFormals$(PatternTypers.scala:103)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedArgsForFormals(Typers.scala:111)
[error] scala.tools.nsc.typechecker.Typers$Typer.handleMonomorphicCall$1(Typers.scala:3635)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$doTypedApply$31(Typers.scala:3661)
[error] scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3661)
[error] scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4773)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4801)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5586)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedPattern$2(Typers.scala:5760)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedPattern$1(Typers.scala:5760)
[error] scala.tools.nsc.typechecker.Typers$Typer$$Lambda$6025/1854663879.apply(Unknown Source)
[error] scala.tools.nsc.typechecker.TypeDiagnostics.typingInPattern(TypeDiagnostics.scala:63)
[error] scala.tools.nsc.typechecker.TypeDiagnostics.typingInPattern$(TypeDiagnostics.scala:60)
[error] scala.tools.nsc.Global$$anon$1.typingInPattern(Global.scala:448)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedPattern(Typers.scala:5760)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedCase(Typers.scala:2517)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedCases$1(Typers.scala:2551)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedCases(Typers.scala:2550)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedMatch(Typers.scala:2562)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedVirtualizedMatch$1(Typers.scala:4483)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5565)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5596)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5714)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedFunction(Typers.scala:3076)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$96(Typers.scala:5527)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedFunction$1(Typers.scala:486)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5564)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5596)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedArg$1(Typers.scala:3290)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:477)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedArgToPoly$1(Typers.scala:3680)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$doTypedApply$34(Typers.scala:3688)
[error] scala.tools.nsc.typechecker.Typers$Typer.handlePolymorphicCall$1(Typers.scala:3688)
[error] scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3699)
[error] scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4773)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4801)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5586)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5714)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedFunction(Typers.scala:3076)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$96(Typers.scala:5527)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedFunction$1(Typers.scala:486)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5564)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5596)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedArg$1(Typers.scala:3290)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:477)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedArgToPoly$1(Typers.scala:3680)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$doTypedApply$34(Typers.scala:3688)
[error] scala.tools.nsc.typechecker.Typers$Typer.handlePolymorphicCall$1(Typers.scala:3688)
[error] scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3699)
[error] scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4773)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4801)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5586)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:2476)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$97(Typers.scala:5561)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:486)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5596)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5603)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5717)
[error] com.thoughtworks.dsl.compilerplugins.BangNotation$TreeResetter$$anonfun$1.$anonfun$applyOrElse$3(BangNotation.scala:94)
[error] com.thoughtworks.dsl.compilerplugins.BangNotation$TreeResetter$$anonfun$1$$Lambda$8560/2124872789.apply(Unknown Source)
[error] scala.tools.nsc.typechecker.Contexts$Context.withMode(Contexts.scala:392)
[error] com.thoughtworks.dsl.compilerplugins.BangNotation$TreeResetter$$anonfun$1.$anonfun$applyOrElse$2(BangNotation.scala:94)
[error] com.thoughtworks.dsl.compilerplugins.BangNotation$TreeResetter$$anonfun$1$$Lambda$8559/2011261733.apply(Unknown Source)
[error] com.thoughtworks.dsl.compilerplugins.BangNotation.com$thoughtworks$dsl$compilerplugins$BangNotation$$deactAnalyzerPlugins(BangNotation.scala:42)
[error] com.thoughtworks.dsl.compilerplugins.BangNotation$TreeResetter$$anonfun$1.applyOrElse(BangNotation.scala:93)
[error] scala.collection.TraversableOnce.collectFirst(TraversableOnce.scala:145)
[error] scala.collection.TraversableOnce.collectFirst$(TraversableOnce.scala:132)
[error] scala.collection.AbstractTraversable.collectFirst(Traversable.scala:104)
[error] com.thoughtworks.dsl.compilerplugins.BangNotation$TreeResetter.adaptAnnotations(BangNotation.scala:87)
[error] com.thoughtworks.dsl.compilerplugins.BangNotation$TreeResetter.adaptAnnotations$(BangNotation.scala:85)
[error] com.thoughtworks.dsl.compilerplugins.BangNotation$$anon$1.adaptAnnotations(BangNotation.scala:484)
[error] scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$6.$anonfun$accumulate$6(AnalyzerPlugins.scala:363)
[error] scala.tools.nsc.typechecker.AnalyzerPlugins$$anon$6$$Lambda$7325/1941837849.apply(Unknown Source)
[error] scala.tools.nsc.typechecker.AnalyzerPlugins.$anonfun$invoke$1(AnalyzerPlugins.scala:318)
[error] scala.tools.nsc.typechecker.AnalyzerPlugins.invoke(AnalyzerPlugins.scala:317)
[error] scala.tools.nsc.typechecker.AnalyzerPlugins.adaptAnnotations(AnalyzerPlugins.scala:360)
[error] scala.tools.nsc.typechecker.AnalyzerPlugins.adaptAnnotations$(AnalyzerPlugins.scala:360)
[error] scala.tools.nsc.Global$$anon$1.adaptAnnotations(Global.scala:448)
[error] scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1197)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5654)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:5854)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:2306)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5551)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5602)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5703)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:3129)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$10(Typers.scala:3274)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3274)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:2006)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1829)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5552)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5602)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5703)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:3129)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$10(Typers.scala:3274)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3274)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5262)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5555)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5602)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5703)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:3129)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$10(Typers.scala:3274)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3274)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5262)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5555)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5602)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5703)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:3129)
[error] scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$10(Typers.scala:3274)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3274)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5262)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5555)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5602)
[error] scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5640)
[error] scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5672)
[error] scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5613)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5618)
[error] scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5699)
[error] scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:104)
[error] scala.tools.nsc.Global$GlobalPhase.$anonfun$applyPhase$1(Global.scala:426)
[error] scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:419)
[error] scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.$anonfun$run$1(Analyzer.scala:94)
[error] scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.$anonfun$run$1$adapted(Analyzer.scala:93)
[error] scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$Lambda$5900/1074926829.apply(Unknown Source)
[error] scala.collection.Iterator.foreach(Iterator.scala:944)
[error] scala.collection.Iterator.foreach$(Iterator.scala:944)
[error] scala.collection.AbstractIterator.foreach(Iterator.scala:1432)
[error] scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:93)
[error] scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1446)
[error] scala.tools.nsc.Global$Run.compileUnits(Global.scala:1430)
[error] scala.tools.nsc.Global$Run.compileSources(Global.scala:1423)
[error] scala.tools.nsc.Global$Run.compile(Global.scala:1539)
[error] xsbt.CachedCompiler0.run(CompilerInterface.scala:130)
[error] xsbt.CachedCompiler0.run(CompilerInterface.scala:105)
[error] xsbt.CompilerInterface.run(CompilerInterface.scala:31)
[error] sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
[error] sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] java.lang.reflect.Method.invoke(Method.java:497)
[error] sbt.internal.inc.AnalyzingCompiler.call(AnalyzingCompiler.scala:237)
[error] sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:111)
[error] sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:90)
[error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$3(MixedAnalyzingCompiler.scala:83)
[error] sbt.internal.inc.MixedAnalyzingCompiler$$Lambda$5469/592402057.apply$mcV$sp(Unknown Source)
[error] scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:134)
[error] sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:74)
[error] sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:117)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:305)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:305)
[error] sbt.internal.inc.IncrementalCompilerImpl$$Lambda$2322/344417316.apply(Unknown Source)
[error] sbt.internal.inc.Incremental$.doCompile(Incremental.scala:101)
[error] sbt.internal.inc.Incremental$.$anonfun$compile$4(Incremental.scala:82)
[error] sbt.internal.inc.Incremental$$$Lambda$2358/1037604318.apply(Unknown Source)
[error] sbt.internal.inc.IncrementalCommon.recompileClasses(IncrementalCommon.scala:110)
[error] sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:57)
[error] sbt.internal.inc.Incremental$.$anonfun$compile$3(Incremental.scala:84)
[error] sbt.internal.inc.Incremental$$$Lambda$2355/218083500.apply(Unknown Source)
[error] sbt.internal.inc.Incremental$.manageClassfiles(Incremental.scala:129)
[error] sbt.internal.inc.Incremental$.compile(Incremental.scala:75)
[error] sbt.internal.inc.IncrementalCompile$.apply(Compile.scala:61)
[error] sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:309)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:267)
[error] sbt.internal.inc.IncrementalCompilerImpl$$Lambda$2271/2146427165.apply(Unknown Source)
[error] sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:158)
[error] sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:237)
[error] sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:68)
[error] sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:1429)
[error] sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:1403)
[error] sbt.Defaults$$$Lambda$1213/621449265.apply(Unknown Source)
[error] scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] scala.Function1$$Lambda$594/732688777.apply(Unknown Source)
[error] sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error] sbt.internal.util.$tilde$greater$$Lambda$1831/270261532.apply(Unknown Source)
[error] sbt.std.Transform$$anon$4.work(System.scala:66)
[error] sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error] sbt.Execute$$Lambda$1848/1518265612.apply(Unknown Source)
[error] sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] sbt.Execute.work(Execute.scala:271)
[error] sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error] sbt.Execute$$Lambda$1839/287933084.apply(Unknown Source)
[error] sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error] sbt.ConcurrentRestrictions$$anon$4$$Lambda$1846/2133612542.apply(Unknown Source)
[error] sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error] java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error] java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error] java.lang.Thread.run(Thread.java:745)
[error]
[error] scala.reflect.internal.FatalError:
[error] unexpected tree in pattern mode: class scala.reflect.internal.Trees$TypeApply
[error] ClassTag.apply[Long with shapeless.tag.Tagged[TurnModule.this.IntentTag]]
Wow! that's a fast fix for a complex problem
Ive hit some more issues, will write up some tickets once I can minimize. But maybe ... can you guess what Domain
might mean in the error below. I have no such type in my codebase:
[error] found : org.atnos.eff.Eff[R,(TurnModule.this.Event, TurnModule.this.EventData#Detail)]
[error] required: Domain
[error] (event, detail).pureEff[R]
[error] ^
Thank you for your report!
Domain
is the return type of the enclosing @reset
block or function (if ResetEverywhere
is enabled).
You can check out Section 2.1 in https://thoughtworksinc.github.io/Dsl.scala/ldk.pdf
More generally, all LDKs are domain-specific, where the word “domain” stands for the return type of the enclosing function.
So Domain
represents an underlying type from my program? Is there any way I can get scalac to tell me what that underlying type is?
Because in the case above, Eff[R,(TurnModule.this.Event, TurnModule.this.EventData#Detail)]
is the original declared type of the method, and so I want to understand why scalac doesn't agree post-transform, and what type it thinks it needs.
Do you have a reproducible example?
Will try to minimize... get back to you
Separately, I read your paper about LDK. I have a comment about the section on Eff:
[Kiselyov et al. 2013] introduced effect handlers to solve the collaboration problem. However,
the solution is heavy weight, only expressions written in the special Eff language are able to use
DSLs defined in effect handlers
I use Eff heavily, so obviously I am a fan. But I agree there are some problems, but I think you can describe it more precisely.
In my experience, Eff works well, but when you use it alot, all your code becomes monadic. Monads everywhere shows up the limitations of for {... } yield {}
syntax. For expressions feel very heavyweight just to refer to a monadic value once.
So in my experience, for-notation is the most "heavyweight" part of Eff, which Im trying to get away from.
I agree with Edwin Brady's conclusion that "In many cases, using do-notation can make programs unnecessarily verbose".