Install this package:
emerge -a dev-haskell/plugins-auto
If the package is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask dev-haskell/plugins-auto
Or alternatively:
emerge --autounmask-write -a dev-haskell/plugins-auto
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 0.0.4 | 8 | ~amd64 | 0/0.0.4 |
<pkgmetadata>
<maintainer type="project">
<email>haskell@gentoo.org</email>
<name>Gentoo Haskell</name>
</maintainer>
<longdescription>
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
> interactiveLoop
> where
> 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)
</longdescription>
</pkgmetadata>
| Type | File | Size | Versions |
|---|---|---|---|
| DIST | plugins-auto-0.0.4.tar.gz | 8736 bytes | 0.0.4 |
| Type | File | Size |
|---|