Below is the code I'm using. Does it need to be modified or is this a bug?
- Code: Select all
class GhcExpressionCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.window().run_command("save")
runexpr = lambda e: self.view.window().run_command("exec", {"cmd": "ghc.exe -e " + e})
self.view.window().show_input_panel("Evaluate:", self.view.substr(self.view.sel()[0]), runexpr, lambda s:s, 0)