Ticket #5399: compilerbug.hs

File compilerbug.hs, 1.3 KB (added by ian.duncan, 4 years ago)

File for reproducing issue.

Line 
1{-# OPTIONS -fglasgow-exts #-}
2
3module Main where
4
5import Qtc.Classes.Qccs
6import Qtc.Classes.Gui
7import Qtc.ClassTypes.Gui
8import Qtc.Core.Base
9import Qtc.Core.QCoreApplication
10import Qtc.Gui.Base
11import Qtc.Gui.QApplication
12import Qtc.Gui.QWidget
13import Qtc.Gui.QPushButton
14import Qtc.Gui.QAbstractButton
15import Qtc.Gui.QMessageBox
16import Qtc.Gui.QCheckBox
17import Qtc.Gui.QLineEdit
18import Qtc.Gui.QVBoxLayout
19import Qtc.Gui.QGroupBox
20import Qtc.Gui.QDoubleSpinBox
21import Qtc.Gui.QSpinBox
22import Qtc.Gui.QMenu
23import Qtc.Enums.Base
24import Qtc.Gui.QLabel
25import Qtc.Gui.QMenuBar
26import Qtc.Gui.QSizePolicy
27import Qtc.Gui.QMainWindow
28import Qtc.Enums.Gui.QSizePolicy
29import Qtc.Enums.Gui.QFrame
30import Qtc.Gui.QFrame
31
32main = do 
33  win <- setupApplication     
34  qshow win ()
35  qApplicationExec ()
36
37setupApplication = do
38  app <- qApplication ()
39 
40  mainWindow <- qMainWindow ()
41  setWindowTitle mainWindow "Heyo!!!!"
42  centralWidget <- qWidget ()
43 
44  topFiller <- qWidget ()
45  topPolicy <- qSizePolicy (eExpanding, eExpanding)
46  setSizePolicy topFiller topPolicy
47 
48  infoLabel <- qLabel "<i> Choose a menu option </i>"
49  setFrameStyle infoLabel (qEnum_toInt eStyledPanel)
50
51  layout <- qVBoxLayout ()
52  addWidget layout topFiller
53  addWidget layout infoLabel
54
55  setCentralWidget mainWindow centralWidget
56  return mainWindow
57