forked from HeinrichApfelmus/threepenny-gui
-
Notifications
You must be signed in to change notification settings - Fork 3
/
TestSpeed.hs
25 lines (21 loc) · 810 Bytes
/
TestSpeed.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import Control.Monad (void)
import Data.Maybe
import Text.Printf
import Safe (readMay)
import qualified Graphics.UI.Threepenny as UI
import Graphics.UI.Threepenny.Core
{-----------------------------------------------------------------------------
Main
------------------------------------------------------------------------------}
main :: IO ()
main = startGUI defaultConfig setup
setup :: Window -> UI ()
setup window = void $ do
return window # set title "Test Speed"
let msg = "This program tries to measure the speed at which HTML elements can be built."
getBody window #+ [UI.string msg, UI.br]
UI.timestamp
getBody window #+ replicate 200 (UI.string "Haskell-")
UI.timestamp
getBody window #+ [UI.string $ concat $ replicate 200 "Haskell-"]
UI.timestamp