The plugins-auto package

[ Tags: bsd3, library, system ] [ Propose Tags ]

This library provides support for automatically recompiling and reloading modules into your programs when the source code is modified.

Any program called ghc in your PATH will be used for recompiling.

module Main where
import System.IO           (hSetBuffering,stdout,BufferMode(..))
import System.Plugins.Auto (withMonadIO,initPlugins)
import Answer

main :: IO ()
main = do ph<-initPlugins
        hSetBuffering stdout NoBuffering
        putStrLn "This program interacts with you in a loop."
        putStrLn "Type something, and the program will respond when you hit the Enter Key."
        putStrLn "Modify Answer.hs while interacting and you should see the answers"
        putStrLn "change accordingly."
        let interactiveLoop = prompt ph >> interactiveLoop
  prompt ph = do
     putStr "> "
     input <- getLine
     $(withMonadIO 'getAnswer) ph id notLoaded$ \errs getAnswer ->
         mapM_ putStrLn errs  >> getAnswer input

  notLoaded errs =
     if null errs then putStrLn "Plugin not loaded yet."
       else putStrLn "Errors found:" >> mapM_ (putStrLn . ("  "++)) errs
              >> putStrLn "Try fixing the errors and come back here."
module Answer where

getAnswer :: String -> IO ()
getAnswer input = putStrLn ("What you typed: "++input)


Versions 0.0.1, 0.0.2, 0.0.3, 0.0.4
Dependencies base (>=3 && <5), containers, filepath, hinotify (>=0.3.2), mtl, plugins (>=, template-haskell [details]
License BSD3
Author Happstack team, HAppS LLC
Maintainer Happstack team <>
Category System
Source repository head: darcs get --tag 0.0.2
Uploaded Sat Dec 10 20:33:55 UTC 2011 by FacundoDominguez
Distributions NixOS:0.0.4
Downloads 1413 total (291 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-26 [all 7 reports]
Hackage Matrix CI


  • System
    • Plugins
      • System.Plugins.Auto
        • System.Plugins.Auto.FileSystemWatcher
        • System.Plugins.Auto.LiftName
        • System.Plugins.Auto.Reloader


Maintainer's Corner

For package maintainers and hackage trustees