Index: src/winhugs/DlgOptions.c
===================================================================
RCS file: /cvs/hugs98/src/winhugs/DlgOptions.c,v
retrieving revision 1.2
diff -u -r1.2 DlgOptions.c
--- src/winhugs/DlgOptions.c	5 Sep 2005 09:48:40 -0000	1.2
+++ src/winhugs/DlgOptions.c	5 Sep 2005 11:09:29 -0000
@@ -334,6 +334,16 @@
 /////////////////////////////////////////////////////////////////////
 // OPTCOMPILE related code
 
+void EnableHaskellExts(HWND hDlg)
+{
+    BOOL Ext = GetDlgItemBool(hDlg, optExtensions);
+
+    EnableWindow(GetDlgItem(hDlg, chkOverlap), Ext);
+    EnableWindow(GetDlgItem(hDlg, chkHereDocs), Ext);
+    EnableWindow(GetDlgItem(hDlg, chkOverlapUnsafe),
+	Ext && GetDlgItemBool(hDlg, chkOverlap));
+}
+
 LRESULT CALLBACK OptionsCompileProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     switch (msg) {
@@ -341,6 +351,13 @@
 	    SetDlgItemText(hDlg, txtPath, hugsPath);
 	    SetDlgItemBool(hDlg, chkListLoading, listScripts);
 	    SetDlgItemBool(hDlg, chkAutoReload, autoLoadFiles);
+
+	    SetDlgItemBool(hDlg, optCompatible, haskell98);
+	    SetDlgItemBool(hDlg, optExtensions, !haskell98);
+	    SetDlgItemBool(hDlg, chkOverlap, allowOverlap);
+	    SetDlgItemBool(hDlg, chkOverlapUnsafe, allowUnsafeOverlap);
+	    SetDlgItemBool(hDlg, chkHereDocs, hereDocs);
+	    EnableHaskellExts(hDlg);
 	    break;
 
 	case WM_NOTIFY:
@@ -353,10 +370,21 @@
 
 		listScripts = GetDlgItemBool(hDlg, chkListLoading);
 		autoLoadFiles = GetDlgItemBool(hDlg, chkAutoReload);
+		haskell98 = GetDlgItemBool(hDlg, optCompatible);
+		allowOverlap = GetDlgItemBool(hDlg, chkOverlap);
+		allowUnsafeOverlap = GetDlgItemBool(hDlg, chkOverlapUnsafe);
+		hereDocs = GetDlgItemBool(hDlg, chkHereDocs);
 
 		WriteOptions();
 	    }
 	    break;
+
+	case WM_COMMAND:
+	    if (LOWORD(wParam) == chkOverlap ||
+		LOWORD(wParam) == optExtensions ||
+		LOWORD(wParam) == optCompatible)
+		EnableHaskellExts(hDlg);
+	    break;
     }
     return 0;
 }
Index: src/winhugs/resrc1.h
===================================================================
RCS file: /cvs/hugs98/src/winhugs/resrc1.h,v
retrieving revision 1.1
diff -u -r1.1 resrc1.h
--- src/winhugs/resrc1.h	1 Sep 2005 12:22:19 -0000	1.1
+++ src/winhugs/resrc1.h	5 Sep 2005 10:54:40 -0000
@@ -14,8 +14,11 @@
 #define txtPath                         1005
 #define ID_RTF                          1006
 #define IDC_CHECK1                      1012
+#define chkOverlap                      1012
 #define IDC_CHECK2                      1013
+#define chkOverlapUnsafe                1013
 #define IDC_CHECK3                      1014
+#define chkHereDocs                     1014
 #define lstFontFace                     1016
 #define chkUserShow                     1016
 #define lstEditor                       1017
@@ -31,6 +34,9 @@
 #define chkPrintType                    1031
 #define chkListLoading                  1034
 #define chkAutoReload                   1035
+#define optCompatible                   1036
+#define IDC_RADIO2                      1037
+#define optExtensions                   1037
 #define DLG_MAIN                        28445
 #define DLG_OPTHUGS                     28446
 #define ID_USERSGUIDE                   40007
@@ -44,7 +50,7 @@
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NEXT_RESOURCE_VALUE        110
 #define _APS_NEXT_COMMAND_VALUE         40015
-#define _APS_NEXT_CONTROL_VALUE         1036
+#define _APS_NEXT_CONTROL_VALUE         1037
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif
Index: src/winhugs/winhugs.rc
===================================================================
RCS file: /cvs/hugs98/src/winhugs/winhugs.rc,v
retrieving revision 1.15
diff -u -r1.15 winhugs.rc
--- src/winhugs/winhugs.rc	2 Sep 2005 14:02:17 -0000	1.15
+++ src/winhugs/winhugs.rc	5 Sep 2005 11:06:16 -0000
@@ -330,29 +330,31 @@
                     ES_NUMBER | WS_VSCROLL,48,34,70,72,WS_EX_CLIENTEDGE
 END
 
-DLG_OPTCOMPILE DIALOGEX 0, 0, 291, 131
+DLG_OPTCOMPILE DIALOGEX 0, 0, 291, 150
 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
     WS_SYSMENU
 CAPTION "Compile Time"
 FONT 8, "MS Shell Dlg", 400, 0, 0x1
 BEGIN
-    GROUPBOX        "Haskell Extensions [Not Implemented Yet]",IDC_STATIC,7,
-                    64,277,60,WS_DISABLED
+    GROUPBOX        "Haskell Extensions [Requires restart]",IDC_STATIC,7,68,
+                    277,74
     LTEXT           "Path:",IDC_STATIC,12,21,42,13
     EDITTEXT        txtPath,58,17,219,12,ES_AUTOHSCROLL
-    LTEXT           "These extensions are only available in Haskell Extension mode (-98)",
-                    IDC_STATIC,14,76,217,8,WS_DISABLED
-    CONTROL         "Overlapping instances",IDC_CHECK1,"Button",
-                    BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,13,88,230,12
-    CONTROL         "Unsafe overlapping instances",IDC_CHECK2,"Button",
-                    BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,24,99,230,12
-    CONTROL         "Here documents",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | 
-                    WS_DISABLED | WS_TABSTOP,13,109,230,12
+    CONTROL         "Overlapping instances",chkOverlap,"Button",
+                    BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,23,104,230,12
+    CONTROL         "Unsafe overlapping instances",chkOverlapUnsafe,"Button",
+                    BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,32,115,230,12
+    CONTROL         "Here documents",chkHereDocs,"Button",BS_AUTOCHECKBOX | 
+                    WS_DISABLED | WS_TABSTOP,23,125,230,12
     CONTROL         "Show list of scripts being loaded",chkListLoading,
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,34,261,11
     CONTROL         "Automatically reload modified files",chkAutoReload,
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,45,265,10
     GROUPBOX        "Loading Files",IDC_STATIC,7,7,277,53
+    CONTROL         "Haskell 98 Compatability",optCompatible,"Button",
+                    BS_AUTORADIOBUTTON,12,80,252,10
+    CONTROL         "Allow Hugs/Ghc Extensions",optExtensions,"Button",
+                    BS_AUTORADIOBUTTON,11,92,252,10
 END
 
 DLG_OPTRUNTIME DIALOGEX 0, 0, 304, 113
