packages feed

project-template 0.1.0.0 → 0.1.0.1

raw patch · 2 files changed

+6/−7 lines, 2 filesdep +conduitdep −resourcet

Dependencies added: conduit

Dependencies removed: resourcet

Files

Text/ProjectTemplate.hs view
@@ -19,10 +19,9 @@ import           ClassyPrelude.Conduit import           Control.Monad.Writer      (MonadWriter, tell) import qualified Data.ByteString.Base64    as B64-import           Data.Functor.Identity     (runIdentity) import           Data.Typeable             (Typeable) import           Filesystem                (createTree)-import           Filesystem.Path.CurrentOS (directory, encode, fromText)+import           Filesystem.Path.CurrentOS (directory, encode, fromText, toText)  -- | Create a template file from a stream of file/contents combinations. --@@ -32,16 +31,16 @@     => GInfConduit (FilePath, m ByteString) m ByteString createTemplate = awaitForever $ \(fp, getBS) -> do     bs <- lift getBS-    case runIdentity $ runExceptionT $ yield bs $$ decodeUtf8 =$ sinkNull of+    case runException $ yield bs $$ decodeUtf8 =$ sinkNull of         Left{} -> do             yield "{-# START_FILE BASE64 "-            yield $ encode fp+            yield $ encodeUtf8 $ either id id $ toText fp             yield " #-}\n"             yield $ B64.encode bs             yield "\n"         Right{} -> do             yield "{-# START_FILE "-            yield $ encode fp+            yield $ encodeUtf8 $ either id id $ toText fp             yield " #-}\n"             yield bs             yield "\n"
project-template.cabal view
@@ -1,5 +1,5 @@ name:                project-template-version:             0.1.0.0+version:             0.1.0.1 synopsis:            Specify Haskell project templates and generate files description:         See initial blog post for explanation: <http://www.yesodweb.com/blog/2012/09/project-templates> homepage:            https://github.com/fpco/haskell-ide@@ -22,7 +22,7 @@                      , bytestring                   >= 0.9                      , transformers                 >= 0.2                      , mtl                          >= 2.0-                     , resourcet                    >= 0.4.1+                     , conduit                      >= 0.5.4   ghc-options:     -Wall  test-suite test