@rae: Basics of Haskell instance selection

Поделиться
HTML-код
  • Опубликовано: 19 сен 2024

Комментарии • 10

  • @jordankaye6802
    @jordankaye6802 3 года назад +5

    I'm sure you're probably aware, but most (all?) of the nice features available in VS Code for Haskell are also available in Emacs. If anyone would like some pointers on how to set that up, I'd be happy to help.

  • @wojciechgac
    @wojciechgac 3 года назад

    The default keybinding for the eval feature is Shift+Return if you prefer not to use the mouse. BTW, I love your videos. Your explanations are very, very clear.

    • @wojciechgac
      @wojciechgac 3 года назад

      @Richard Eisenberg First, you need the name of the function (inline-repl-run in this case). If you then go to the keybinding editor (Ctrl+K Ctrl+S) and search for that function, you'll get the relevant entry. For MacOS you probably need to replace Ctrl with Cmd.

    • @wojciechgac
      @wojciechgac 3 года назад

      @Richard Eisenberg Well, the extension that provides that function is called "Simple GHC (Haskell) Integration" (ext install dramforever.vscode-ghc-simple). And I learned about it... from your video, of all places :). What you can also try is open your key binding settings in JSON form (Ctrl+Shift+P -> Open Keyboard Shortcuts (JSON)) and add an entry similar to this one:
      {
      "key": "",
      "command": "vscode-ghc-simple.inline-repl-run",
      "when": "editorLangId == haskell && editorTextFocus && config.ghcSimple.feature.inlineRepl"
      }
      This is taken almost verbatim from the extension's repo.

  • @MrMomoro123
    @MrMomoro123 3 года назад

    You may want to disable hlint suggestions in the Haskell extension settings. You can open settings with `Cmd-,` open the Haskell settings from the tree on the left (under `Extensions`), and the relevant setting to disable is `Plugin › Hlint: Diagnostics On
    `.
    If you want to disable brackets just search in the top bar (in settings) for `Auto Closing Brackets
    ` and choose `Never`.

  • @hantuchblau
    @hantuchblau 3 года назад +2

    I think the default binding to trigger a quickfix is Ctrl+. and I find it much nicer than using mouse or track pad.
    Is there some formal semantics of instance selection? Once fundeps, overlapping/incoherent instances, and recursive /undecidable superclasses are in the mix I find it really hard to predict when it breaks coherence in the way I want instead of some random other way.

  • @typesafety
    @typesafety 3 года назад +1

    I'd suggest looking at different color themes, since I find that the number of colors used in Code's default theme is a bit lacking for Haskell (I have used One Monokai a lot)

  •  3 года назад +2

    I don't know if this helps you out but you asked ...
    Personally I like to use the VIM emulation for VS.code - it's sadly not as good as EVIL mode but it has most features and is reasonably quick.