Giter Club home page Giter Club logo

Comments (9)

nh2 avatar nh2 commented on May 18, 2024

In the meantime, I use this Build system:

{
  "cmd": ["/home/niklas/.cabal/bin/hdevtools", "check", "-g", "-Wall", "$file"],
  "file_regex": "^(.*?):(\\d+):(\\d+):", // Don't end with $ to also parse Warnings
  "selector": "source.haskell"
}

Update: Made it parse warnings
Update: Made it recognize the column number

You can jump through the errors with Sublime's inbuilt F4 / Shift+F4 keyboard shortcuts.

from sublimehaskell.

mvoidex avatar mvoidex commented on May 18, 2024

There are hdevtools.py module with call_hdevtools_and_wait same as call_ghcmod_and_wait
It can be easily used to check file.
But seems that hdevtools check shows only errors, does it?

from sublimehaskell.

nh2 avatar nh2 commented on May 18, 2024

If you pass -g -Wall you will get warnings.

However, we have to watch out that like in ghci, the warnings will only be shown once (at the first successful compile), and then only as soon as you change something in the file (doing that and re-checking is super fast in hdevtools though).

from sublimehaskell.

nh2 avatar nh2 commented on May 18, 2024

Also relevant: bitc/hdevtools#18 (Using multiple files with same htdevtools instance)

from sublimehaskell.

mvoidex avatar mvoidex commented on May 18, 2024

What kind of cache do you mean there? hdevtools doesn't make any special caches, the only benefit is that it doesn't initialize&configure ghc every time.

from sublimehaskell.

nh2 avatar nh2 commented on May 18, 2024

I just mean the information that is loaded into memory - probably the same as would be loaded in a ghci session:

:l Module1 -- takes long to load
:l Module2 -- takes long
:l Module1 -- takes long again

It would be nice if you could load both modules at the same time, getting the speed benefit hdevtools gives you across multiple modules.

from sublimehaskell.

mvoidex avatar mvoidex commented on May 18, 2024

GHC.setTarget allows to specify several modules, but I don't know If

setTarget ["Module1"]
...
setTarget ["Module1", "Module2"]

will reload "Module1" or just add "Module2".

from sublimehaskell.

nh2 avatar nh2 commented on May 18, 2024

@mvoidex I implemented your suggestion for hdevtools and ghc-mod.

nh2/hdevtools@e9fced6

nh2/ghc-mod@3f9c1c2

This allows us to type check whole projects really fast.

from sublimehaskell.

bscottm avatar bscottm commented on May 18, 2024

Closing this issue. Assuming it was implemented.

from sublimehaskell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.