Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
This module provides simple utility functions useful to present web
content to the user via their default browser, creating temporary
files. Use toTheBrowser
in order to simply show some markup (HTML)
to the user, and use manyToTheBrowser
with an array of Resource
in
order to show a page linking to multiple files, for example a page
linking to a local style file and a local Javascript file
Documentation
toTheBrowser :: String -> IO Bool Source #
Writes its argument to a temporary file and opens the user's browser to show that file. The returned boolean can be ignored
Use the Resource type to create resources that are linking to each other, and you want to show to the user all together. For example one resource could contain some HTML linking to another resource containing Javascript or other.
manyToTheBrowser :: [Resource] -> IO Bool Source #
Present multiple files via the user's browser, so that they can reference each other. A temporary directory is created, the files are written there, and the browser is opened on the first resource passed as an argument to this function. The returned boolean can be ignored