Skip to content

runghc (runhaskell) should be able to reload code on editing

Hot code reloading on file edit is an incredibly useful feature for server development.

Right now several Haskell web frameworks are able to reload code on file edits, however there does not seem to be a simple way to use code reloader from one of them without finding yourself up to the neck in the framework.

It seems to me that the best thing what can be done is a flag to runghc / runhaskell:

runghc --reload MyServer.hs

It should watch for changes in the main file and all imported modules (or at least imported modules in the current folder).

A nice addition would be an ability to specify more files to watch

runghc --reload-watch *.some.weird.haskell.js  --reload MyServer.hs 
Trac metadata
Trac field Value
Version 7.6.1
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information