Ticket #1148: test.hs
| File test.hs, 341 bytes (added by guest, 5 years ago) |
|---|
| Line | |
|---|---|
| 1 | import Graphics.UI.Gtk |
| 2 | import Control.Exception |
| 3 | |
| 4 | test_bad :: Ordering |
| 5 | test_bad = compare (0.3 :: Float) 0.4 |
| 6 | |
| 7 | test_good :: Ordering |
| 8 | test_good = compare (0.5 :: Float) 0.4 |
| 9 | |
| 10 | main = do |
| 11 | initGUI |
| 12 | w <- windowNew |
| 13 | b <- buttonNew |
| 14 | evaluate test_bad |
| 15 | buttonSetLabel b "Hello" |
| 16 | widgetShow b |
| 17 | containerAdd w b |
| 18 | widgetShow w |
| 19 | mainGUI |