| Copyright | (c) 2022 Dmitrii Kovanikov |
|---|---|
| License | MPL-2.0 |
| Maintainer | Dmitrii Kovanikov <kovanikov@gmail.com> |
| Stability | Experimental |
| Portability | Portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Iris.Browse
Description
Implements a function that opens a given file in a browser.
Since: 0.0.0.0
Synopsis
- openInBrowser :: FilePath -> IO ()
- newtype BrowseException = BrowserNotFoundException String
Documentation
openInBrowser :: FilePath -> IO () Source #
Open a given file in a browser. The function has the following algorithm:
- Check the
BROWSERenvironment variable - If it's not set, try to guess browser depending on OS
- If unsuccsessful, print a message
Throws: BrowseException if can't find a browser.
Since: 0.0.0.0
newtype BrowseException Source #
Exception thrown by openInBrowser.
Since: 0.0.0.0
Constructors
| BrowserNotFoundException String | Can't find a browser application. Stores the current OS inside. Since: 0.0.0.0 |
Instances
| Exception BrowseException Source # | Since: 0.0.0.0 |
Defined in Iris.Browse Methods toException :: BrowseException -> SomeException # | |
| Show BrowseException Source # | Since: 0.0.0.0 |
Defined in Iris.Browse Methods showsPrec :: Int -> BrowseException -> ShowS # show :: BrowseException -> String # showList :: [BrowseException] -> ShowS # | |
| Eq BrowseException Source # | Since: 0.0.0.0 |
Defined in Iris.Browse Methods (==) :: BrowseException -> BrowseException -> Bool # (/=) :: BrowseException -> BrowseException -> Bool # | |