We planned to upgrade GitLab and Mattermost to the latest version this Friday morning (early). You may experience some downtime!

Verified Commit 395c2ef4 authored by Camil Staps's avatar Camil Staps 🚀

Open HTML file in browser after generation

parent 59d2e47c
......@@ -11,6 +11,7 @@ import System.File
import System.FilePath
import System.Options
import System.OS
import System.Process
import System._Pointer
from Text import class Text(concat,join), instance Text String, <+
import qualified Text.HTML
......@@ -62,6 +63,7 @@ Start w
= exit "Could not open output file" w
# f = write_profile css js profile f
# (_,w) = fclose f w
# w = open_file_in_browser args.output w
= w
usage prog = concat
......@@ -247,3 +249,9 @@ where
push_a_b 0
pop_a 1
open_file_in_browser :: !String !*World -> *World
open_file_in_browser file w = snd (callProcess open args Nothing w)
open = IF_LINUX "xdg-open" (IF_WINDOWS "C:\\Windows\\System32\\cmd.exe" "open")
args = IF_WINDOWS ["/c","start",file] [file]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment