web-output-0.4.0.0: Library to present content to an user via their browser

Safe HaskellSafe
LanguageHaskell2010

WebOutput

Description

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

Synopsis

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

data Resource Source #

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.

Constructors

Resource 

Fields

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