-
-
Save dustinlacewell/63953e45061087725388cc0b387c288f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.FSNotify | |
import Control.Concurrent (threadDelay) | |
import Control.Monad (forever) | |
main = | |
withManager $ \mgr -> do | |
-- start a watching job (in the background) | |
watchDir | |
mgr -- manager | |
"." -- directory to watch | |
(const True) -- predicate | |
print -- action | |
-- sleep forever (until interrupted) | |
forever $ threadDelay 1000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Graphics.Gloss | |
windowDisplay :: Display | |
windowDisplay = InWindow "Window" (200, 200) (10, 10) | |
main :: IO () | |
main = animate windowDisplay white animationFunc | |
animationFunc :: Float -> Picture | |
animationFunc time = Circle (1 * time) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment