packages feed

browse 0.5.0.0 → 0.5.0.1

raw patch · 2 files changed

+19/−14 lines, 2 filesdep ~basedep ~directorydep ~filepath

Dependency ranges changed: base, directory, filepath, text

Files

Browse.hs view
@@ -15,6 +15,8 @@   ) where  import Control.Exception+import Data.List.NonEmpty (nonEmpty)+import Data.Maybe (fromMaybe) import Web.Browser (openBrowser) import System.IO import System.Directory (createDirectory)@@ -22,6 +24,8 @@ import qualified Data.Text as T import qualified Data.Text.IO as T +import qualified Data.List.NonEmpty as NonEmpty+ -- | Writes its argument to a file and opens the user's browser  -- to show that file browse content = do@@ -51,12 +55,13 @@ -- are written there, and the browser is opened on the first resource -- passed as an argument to this function browseLinked :: [Asset] -> IO ()-browseLinked resources = do+browseLinked resources' = do   let containing = "browse"+      resources = fromMaybe (error "empty asset list") $ nonEmpty resources'   try $ createDirectory containing :: IO (Either SomeException ())+  let combined dir = fmap (applyLocation (combine dir)) resources   mapM_ writeAsset (combined containing)-  (openBrowser . location . head) (combined containing)+  (openBrowser . location . NonEmpty.head) (combined containing)   pure ()   where-    combined dir = map (applyLocation (combine dir)) resources     applyLocation f (Asset a b) = Asset (f a) b
browse.cabal view
@@ -2,9 +2,9 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                browse-version:             0.5.0.0+version:             0.5.0.1 synopsis:            Library to present content to an user via their browser-description:         Library to present content to an user via their browser+-- description:         Library to present content to an user via their browser homepage:            https://github.com/danse/browse license:             PublicDomain license-file:        LICENSE@@ -20,22 +20,22 @@   exposed-modules:     Browse   -- other-modules:          -- other-extensions:    -  build-depends:       base >= 4.17.2 && < 4.18,-                       directory >= 1.3.7 && < 1.4,-                       filepath >= 1.4.2 && < 1.5,+  build-depends:       base >= 4.19.2 && < 4.20,+                       directory >= 1.3.8 && < 1.4,+                       filepath >= 1.4.301 && < 1.5,                        open-browser >= 0.4.0 && < 0.5,-                       text >= 2.0.2 && < 2.1+                       text >= 2.1.1 && < 2.2   -- hs-source-dirs:         default-language:    Haskell2010                         Test-Suite test            type: exitcode-stdio-1.0            main-is: test.hs-           build-depends: base >= 4.17.2 && < 4.18,-                          directory >= 1.3.7 && < 1.4,-                          filepath >= 1.4.2 && < 1.5,-                          open-browser >= 0.4.0 && < 0.5,-                          text >= 2.0.2 && < 2.1+           build-depends:       base >= 4.19.2 && < 4.20,+                                directory >= 1.3.8 && < 1.4,+                                filepath >= 1.4.301 && < 1.5,+                                open-browser >= 0.4.0 && < 0.5,+                                text >= 2.1.1 && < 2.2            default-language:    Haskell2010            other-modules: Browse