iris-0.0.0.0: Haskell CLI framework
Copyright(c) 2020 Kowainik
(c) 2022 Dmitrii Kovanikov
LicenseMPL-2.0
MaintainerDmitrii Kovanikov <kovanikov@gmail.com>
StabilityExperimental
PortabilityPortable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Iris.Browse

Description

Implements a function that opens a given file in a browser.

Since: 0.0.0.0

Synopsis

Documentation

openInBrowser :: FilePath -> IO () Source #

Open a given file in a browser. The function has the following algorithm:

  • Check the BROWSER environment 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

Instances details
Exception BrowseException Source #

Since: 0.0.0.0

Instance details

Defined in Iris.Browse

Show BrowseException Source #

Since: 0.0.0.0

Instance details

Defined in Iris.Browse

Eq BrowseException Source #

Since: 0.0.0.0

Instance details

Defined in Iris.Browse