packages feed

trackit 0.6 → 0.6.1

raw patch · 3 files changed

+44/−14 lines, 3 filesdep ~brickdep ~fsnotifydep ~mtl

Dependency ranges changed: brick, fsnotify, mtl, optparse-generic, process, process-extras, stm, text, time, vty

Files

README.md view
@@ -19,7 +19,7 @@  `trackit` can be installed from [Hackage](https://hackage.haskell.org/package/trackit) using Cabal: -    > cabal install trackit+    > cabal new-install trackit  ## Usage @@ -76,3 +76,26 @@     trackit -t . -c "git --no-optional-locks -c color.ui=always status"  This command also forces colored output, which is useful if this option hasn't been set globally.++### Haskell compilation++It is possible to use `trackit` to check Haskell code upon changes (emulating [`ghcid`](https://github.com/ndmitchell/ghcid)).++Using GHC directly:++    trackit -i -f -t . -c "ghc --make -O0 -fno-code -fdiagnostics-color=always file.hs 2>&1"++  * `-O0 -fno-code` are used to speed up compilation, assuming one is only interested in finding errors.+  * Consider also using [`cabal-cargs`](http://hackage.haskell.org/package/cabal-cargs) to pick up flags from the Cabal file and pass them to GHC.++Using Cabal:++    trackit -i -f -t . -c 'cabal new-build --ghc-options="-fdiagnostics-color=always" 2>&1'++### Dhall++It is possible to achieve [`ghcid`](https://github.com/ndmitchell/ghcid)-like+behavior for [`dhall`](https://github.com/dhall-lang/dhall-lang) files using+`trackit`:++    trackit -c "cat ./file.dhall | dhall 2>&1 " -d . -f
src/Main.hs view
@@ -307,8 +307,14 @@  appMain ::      Options -> TVar (Maybe UpdateRequest) -> BChan TrackitEvent -> IO AppState-appMain opts updReq updEv =-  customMain (mkVty defaultConfig) (Just updEv) (myApp opts updReq) initState+appMain opts updReq updEv = do+  vty <- mkVty defaultConfig+  customMain+    vty+    (mkVty defaultConfig)+    (Just updEv)+    (myApp opts updReq)+    initState  -- | A loop that continuously looks for events in the two variables and runs the -- given action in response. The variables are emptied whenever the action runs.
trackit.cabal view
@@ -1,5 +1,5 @@ name:                trackit-version:             0.6+version:             0.6.1 synopsis:            A command-line tool for live monitoring description:         @trackit@ is a command-line tool that listens for changes                      in a user-supplied directory. Whenever there is a change,@@ -41,16 +41,17 @@   other-modules:        Paths_trackit                         ParseANSI   build-depends:        base <5-                      , brick >=0.27-                      , fsnotify >=0.2-                      , mtl >=2.2-                      , optparse-generic >=1.2-                      , process >=1.4-                      , process-extras >=0.4-                      , stm >=2.4-                      , text >=1.2-                      , time >=1.5-                      , vty+                      , brick >= 0.47 && <0.48+                          -- 0.47 adds an argument to customMain+                      , fsnotify <0.4+                      , mtl <2.3+                      , optparse-generic >=1.2 && < 1.4+                      , process <1.7+                      , process-extras >=0.4 && <0.8+                      , stm <2.6+                      , text <1.3+                      , time <1.9+                      , vty <5.26   hs-source-dirs:       src   default-language:     Haskell2010   default-extensions:   BangPatterns