effekt icon indicating copy to clipboard operation
effekt copied to clipboard

Future Work: Special support for effects and handlers in the IDE

Open b-studios opened this issue 4 years ago • 1 comments

Some unstructured notes about things we might want to support at some point:

Possible IDE features:

  • infer effects from effect holes
  • update effects (fix effects refactoring)
  • display inferred effects / types
  • what are better alternatives to stack traces?

Questions:

  • what effects are required by this function?
  • effect provenance: where does this effect come from? (racket like) -- since we already translate to capabilities, we can easily show this particular binding information to the user
  • what are potential handlers (call site analysis, called from)
  • given a handler: which calls to operations might be handled?
def bar(x: Int) = {
    ...
}

def foo(): Int / Print = <?
  val x = foo();
  x
?> // ?? =. <? () ?>

def bar() = {
    val position = 42
    position.<? { x => x + 1 } ?>
    ({ x => 42 })(5)
    ()
}

b-studios avatar Apr 21 '20 11:04 b-studios

This was addressed by @timmy-newtron in his BSc thesis, but sadly never merged

b-studios avatar Jan 28 '24 12:01 b-studios