Commit f367727b authored by Rinus Plasmeijer's avatar Rinus Plasmeijer
Browse files

*** empty log message ***

parent 5d50b987
......@@ -7,11 +7,10 @@ import StdHtml
Start world = doHtmlServer MyPage world
MyPage hst
# (counter0,hst) = counterForm (nFormId "counter0") 0 hst
# (counter1,hst) = counterForm (nFormId "counter1") 0 hst
# (counter0,hst) = counterForm (nFormId "counter0") (Init 0) hst
# (counter1,hst) = counterForm (nFormId "counter1") (Init 0) hst
= mkHtml "Counter Example"
[ H1 [] "Counter Example"
, BodyTag counter0.form
, toBody counter0
, toBody counter1
, toHtml (counter0.value + counter1.value)
......
......@@ -8,7 +8,7 @@ derive gForm []
import tree
Start world = doHtml MyPage world
Start world = doHtmlServer MyPage world
MyPage hst
# (mycircuitf,hst) = startCircuit mycircuit [1] hst
......
......@@ -8,12 +8,12 @@ import tree
derive gForm []
derive gUpd []
Start world = doHtmlServer MyPage world
Start world = doHtmlServer MyPage3 world
//Start world = doHtml MyPage world
MyPage hst
# (balancedtree,hst) = mkSelfForm (nFormId "BalancedTree")
(fromListToBalTree [0]) balanceTree hst
(Init (fromListToBalTree [0])) balanceTree hst
= mkHtml "Balanced Tree"
[ H1 [] "Balanced Tree"
, BodyTag balancedtree.form
......@@ -21,7 +21,7 @@ MyPage hst
MyPage2 hst
# (sortedlist,hst) = mkSelfForm (nFormId "SortedList")
[0] sort hst
(Init [0]) sort hst
= mkHtml "Sorted List"
[ H1 [] "Sorted List"
, BodyTag sortedlist.form
......@@ -37,20 +37,4 @@ MyPage3 hst
where
mycircuit = feedback (edit (nFormId "tree")) (arr balanceTree)
MyPage4 hst
# (sortedlist,hst) = startCircuit mycircuit [1] hst
# (test,hst) = mkApplyEditForm (nFormId "test") 1 1 hst
# (test2,hst) = mkApplyEditForm (nFormId "test") 1 1 hst
= mkHtml "Self Balancing Tree"
[ H1 [] "Self Balancing Tree"
, toBody sortedlist
, toHtml sortedlist.changed
, toHtml sortedlist.value
, toBody test
, toBody test
, toHtml test.changed
, toHtml test2.changed
] hst
where
mycircuit = feedback (edit (nFormId "list")) (arr sort)
\ No newline at end of file
......@@ -6,12 +6,12 @@ module calculator
import StdEnv
import StdHtml
//Start world = doHtml arrowcalculator world
Start world = doHtmlServer calculator world
Start world = doHtmlServer arrowcalculator world
//Start world = doHtmlServer calculator world
calculator hst
# (calcfun,hst) = TableFuncBut (nFormId "calcbut") calcbuttons hst // shows buttons
# (display,hst) = mkStoreForm (nFormId "display") initcalc calcfun.value hst // calculates new values
# (calcfun,hst) = TableFuncBut (nFormId "calcbut") (Init calcbuttons) hst // shows buttons
# (display,hst) = mkStoreForm (nFormId "display") (Init initcalc) calcfun.value hst // calculates new values
= mkHtml "Calculator"
[ H1 [] "Calculator Example: "
, toBody display
......@@ -19,7 +19,7 @@ calculator hst
] hst
arrowcalculator hst
# (calcfun,hst) = TableFuncBut (nFormId "calcfun") calcbuttons hst // shows buttons
# (calcfun,hst) = TableFuncBut (nFormId "calcfun") (Init calcbuttons) hst // shows buttons
# (display,hst) = startCircuit circuit calcfun.value hst // calculates new values
= mkHtml "Calculator"
[ H1 [] "Calculator Example: "
......
Version: 1.4
Global
Built: False
Built: True
Target: Everything
Exec: {Project}\calculator.exe
CodeGen
......@@ -66,65 +66,9 @@ MainModule
Y: 0
SizeX: 932
SizeY: 680
IclOpen: False
IclOpen: True
LastModified: No 0 0 0 0 0 0
OtherModules
Module
Name: StdDebug
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
StrictnessAnalysis: True
ListTypes: StrictExportTypes
ListAttributes: True
Warnings: True
Verbose: True
ReadableABC: False
ReuseUniqueNodes: True
Dcl
WindowPosition
X: 0
Y: 0
SizeX: 500
SizeY: 300
DclOpen: False
Icl
WindowPosition
X: 0
Y: 0
SizeX: 500
SizeY: 300
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: MersenneTwister
Dir: {Application}\Libraries\MersenneTwister
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
StrictnessAnalysis: True
ListTypes: StrictExportTypes
ListAttributes: True
Warnings: True
Verbose: True
ReadableABC: False
ReuseUniqueNodes: True
Dcl
WindowPosition
X: 0
Y: 0
SizeX: 500
SizeY: 300
DclOpen: False
Icl
WindowPosition
X: 0
Y: 0
SizeX: 500
SizeY: 300
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: md5
Dir: {Application}\Libraries\Dynamics\general
......@@ -3205,34 +3149,6 @@ OtherModules
SizeY: 300
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: htmlEncodeDecode
Dir: {Application}\Libraries\htmlGEC
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
StrictnessAnalysis: True
ListTypes: NoTypes
ListAttributes: True
Warnings: True
Verbose: True
ReadableABC: False
ReuseUniqueNodes: True
Dcl
WindowPosition
X: 0
Y: 0
SizeX: 1132
SizeY: 516
DclOpen: True
Icl
WindowPosition
X: 47
Y: 20
SizeX: 775
SizeY: 596
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: GenParse
Dir: {Application}\Libraries\Generics
......@@ -4247,11 +4163,65 @@ OtherModules
SizeY: 300
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: iDataState
Dir: {Application}\Libraries\htmlGEC
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
StrictnessAnalysis: True
ListTypes: StrictExportTypes
ListAttributes: True
Warnings: True
Verbose: True
ReadableABC: False
ReuseUniqueNodes: True
Dcl
WindowPosition
X: 0
Y: 0
SizeX: 500
SizeY: 300
DclOpen: False
Icl
WindowPosition
X: 0
Y: 0
SizeX: 500
SizeY: 300
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: EncodeDecode
Dir: {Application}\Libraries\htmlGEC
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
StrictnessAnalysis: True
ListTypes: StrictExportTypes
ListAttributes: True
Warnings: True
Verbose: True
ReadableABC: False
ReuseUniqueNodes: True
Dcl
WindowPosition
X: 0
Y: 0
SizeX: 500
SizeY: 300
DclOpen: False
Icl
WindowPosition
X: 0
Y: 0
SizeX: 500
SizeY: 300
IclOpen: False
LastModified: No 0 0 0 0 0 0
Static
Mods
Path: {Project}\calculator.icl
Path: {Application}\Libraries\StdEnv\StdDebug.icl
Path: {Application}\Libraries\MersenneTwister\MersenneTwister.icl
Path: {Application}\Libraries\Dynamics\general\md5.icl
Path: {Application}\Libraries\Dynamics\implementation\DynID.icl
Path: {Application}\Libraries\Dynamics\implementation\windows\memory.icl
......@@ -4360,7 +4330,6 @@ Static
Path: {Application}\Libraries\htmlGEC\htmlStylelib.icl
Path: {Application}\Libraries\htmlGEC\htmlFormlib.icl
Path: {Application}\Libraries\htmlGEC\htmlTrivial.icl
Path: {Application}\Libraries\htmlGEC\htmlEncodeDecode.icl
Path: {Application}\Libraries\Generics\GenParse.icl
Path: {Application}\Libraries\StdLib\StdMaybe.icl
Path: {Application}\Libraries\Generics\GenPrint.icl
......@@ -4397,21 +4366,14 @@ Static
Path: {Application}\Libraries\htmlGEC\htmlFormData.icl
Path: {Application}\Libraries\Directory\Directory.icl
Path: {Application}\Libraries\StdLib\StdLibMisc.icl
Path: {Application}\Libraries\htmlGEC\iDataState.icl
Path: {Application}\Libraries\htmlGEC\EncodeDecode.icl
Objs
Path: {Application}\Libraries\StdEnv\Clean System Files\_startup0.o
Path: {Application}\Libraries\StdEnv\Clean System Files\_startup1Trace.o
Path: {Application}\Libraries\StdEnv\Clean System Files\_startup2.o
Path: {Application}\Libraries\StdEnv\Clean System Files\_system.o
Path: {Project}\Clean System Files\calculator.o
Path: {Application}\Libraries\GEC\GEC Implementation\Clean System Files\StdArrow.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlEncodeDecode.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlFormlib.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlStylelib.o
Path: {Application}\Libraries\ArgEnvWindows\Clean System Files\ArgEnv.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlPrintUtil.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlStyleDef.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdGeneric.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlDataDef.o
Path: {Application}\Libraries\Dynamics\extension\Clean System Files\StdCleanTypes.o
Path: {Application}\Libraries\Dynamics\implementation\windows\Clean System Files\_SystemDynamic.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdOverloaded.o
......@@ -4435,10 +4397,18 @@ Static
Path: {Application}\Libraries\StdEnv\Clean System Files\StdFunc.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\StdHtml.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlHandler.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlDataDef.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlStyleDef.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlPrintUtil.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdGeneric.o
Path: {Application}\Libraries\ArgEnvWindows\Clean System Files\ArgEnv.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlStylelib.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlFormData.o
Path: {Application}\Libraries\StdLib\Clean System Files\StdMaybe.o
Path: {Application}\Libraries\Generics\Clean System Files\GenParse.o
Path: {Application}\Libraries\Generics\Clean System Files\GenPrint.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlFormData.o
Path: {Application}\Libraries\Generics\Clean System Files\GenParse.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\iDataState.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\EncodeDecode.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlTrivial.o
Path: {Application}\Libraries\Directory\Clean System Files\Directory.o
Path: {Application}\Libraries\StdLib\Clean System Files\StdLibMisc.o
......@@ -4460,39 +4430,39 @@ Static
Path: {Application}\Libraries\Dynamics\general\Clean System Files\md5.o
Path: {Application}\Libraries\StdLib\Clean System Files\StdArrayExtensions.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\httpServer.o
Path: {Application}\Libraries\Tcp\Clean System Files\StdTCP.o
Path: {Application}\Libraries\Tcp\Clean System Files\StdChannels.o
Path: {Application}\Libraries\Tcp\Clean System Files\tcp.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\StdTime.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\ostick.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\ostoolbox.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\clCrossCall_12.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\ostime.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\ossystem.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\osdocumentinterface.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\id.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\device.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\systemid.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\StdIOCommon.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\StdBitmap.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\osbitmap.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\ospicture.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\osrgn.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\ostypes.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\rgnCCall_12.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\pictCCall_12.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\rgnCCall_12.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\osfont.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\StdPictureDef.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\StdIOBasic.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\StdPicture.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\StdKey.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\oskey.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\id.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\device.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\systemid.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\commondef.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\clCCall_12.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\osdocumentinterface.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\menuCrossCall_12.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\ostoolbar.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\windowCCall_12.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\ossystem.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\windowCrossCall_12.o
Path: {Application}\Libraries\Tcp\Clean System Files\StdTCP.o
Path: {Application}\Libraries\Tcp\Clean System Files\StdChannels.o
Path: {Application}\Libraries\Tcp\Clean System Files\tcp.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\ostime.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\StdId.o
Path: {Application}\Libraries\ObjectIO\Clean System Files\iostate.o
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\osactivaterequests.o
......@@ -4547,9 +4517,9 @@ Static
Path: {Application}\Libraries\htmlGEC\Clean System Files\httpUtil.o
Path: {Application}\Libraries\StdLib\Clean System Files\StdLib.o
Path: {Application}\Libraries\StdLib\Clean System Files\StdListExtensions.o
Path: {Application}\Libraries\MersenneTwister\Clean System Files\MersenneTwister.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdDebug.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlFormlib.o
Path: {Application}\Libraries\htmlGEC\Clean System Files\htmlArrow.o
Path: {Application}\Libraries\GEC\GEC Implementation\Clean System Files\StdArrow.o
Path: {Application}\Libraries\ArgEnvWindows\Clean System Files\ArgEnvC.obj
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\cCrossCallFileSelectors_121.obj
Path: {Application}\Libraries\ObjectIO\OS Windows\Clean System Files\cCrossCallFont_121.obj
......@@ -4618,11 +4588,17 @@ Static
Path: {Application}\Libraries\Tcp
Path: {Application}\Libraries\ExceptionsWindows
Path: {Application}\Libraries\MersenneTwister
Path: {Application}\Libraries\WrapDebug
Path: {Application}\Libraries\ExtendedArith\ExtendedArith
Path: {Application}\Libraries\GameLib
Path: {Application}\Libraries\GEC
Path: {Application}\Libraries\GEC\GEC Implementation
Path: {Application}\Libraries\WrapDebug
Path: {Application}\Libraries\htmlGEC
Path: {Application}\Libraries\htmlGEC\graph_copy
AppP: C:\Documents and Settings\rinus\Bureaublad\Current Work\Clean 2.1.1
PrjP: C:\Documents and Settings\rinus\Bureaublad\Current Work\Clean 2.1.1\Libraries\htmlGEC\Examples\Simple Examples
Path: {Application}\Libraries\Hilde
Path: {Application}\Libraries\Hilde\Loes 0.2
Path: {Application}\Libraries\Hilde\OS Windows\Foreign
Path: {Application}\Libraries\Hilde\OS Windows\NoDynamicFileSystem
Path: {Application}\Libraries\Hilde\Parser combinators 2002
AppP: C:\Documents and Settings\rinus\Desktop\Clean 2.1.1
PrjP: C:\Documents and Settings\rinus\Desktop\Recent Work\libraries\htmlGEC\Examples\Simple Examples
......@@ -23,13 +23,13 @@ coffeemachine hst
, B [] (displayoutput machine.value)
] hst
where
commandbuttons =
commandbuttons = Init
[ [(but "Insert_Coins", \m -> CoffeeMachine (InsertCoin, m))]
, [(but "Add_beans", \m -> CoffeeMachine (AddBeans, m))]
, [(but "Empty_Trash", \m -> CoffeeMachine (EmptyTrash, m))]
]
optionbuttons =
optionbuttons = Init
[ [(but "Coffee", \m -> CoffeeMachine (Ask Coffee, m))
,(but "Capuccino", \m -> CoffeeMachine (Ask Capuccino, m))
,(but "Espresso", \m -> CoffeeMachine (Ask Espresso, m))
......@@ -38,7 +38,7 @@ where
but s = LButton defpixel s
initmachine = {money=0,beans=6,trash=0,out=Message "Welcome."}
initmachine = Init {money=0,beans=6,trash=0,out=Message "Welcome."}
displayoutput {out} = toString out
......
......@@ -5,4 +5,4 @@ import StdEnv, StdHtml
Start world = doHtmlServer helloWorld world
helloWorld hst
= mkHtml "Hello World Example" [Txt "Hello World!"] hst
= mkHtml "Hello World Example " [Txt "Hello World!"] hst
......@@ -8,18 +8,15 @@ derive gForm []
import tree
Start world = doHtml MyPage world
//Start world = doHtmlServer MyPage world
//Start world = doHtml MyPage world
Start world = doHtmlServer MyPage world
MyPage hst
# (mycircuitf,hst) = startCircuit mycircuit [1,5,2] hst
# [list,tree:_] = mycircuitf.form
= mkHtml "Balancing Tree From List"
[ Txt "List :", Br
, list
, Txt "Balanced Tree :", Br
, tree
[ Txt "List to Balanced Tree", Br
, BodyTag mycircuitf.form
] hst
where
mycircuit :: GecCircuit [Int] (Tree Int)
......
......@@ -13,20 +13,18 @@ derive gForm []
// Different ways to define a simple spreadsheet
// Just pick out one of the following Start rules.
//Start world = doHtml spreadsheet world
//Start world = doHtmlServer spreadsheet world
//Start world = doHtml toHtmlFormspreadsheet world
//Start world = doHtml arrowsspreadsheet world
//Start world = doHtml spreadsheetM world
Start world = doHtmlServer spreadsheet world
//Start world = doHtmlServer arrowsspreadsheet world
Start world = doHtmlServer spreadsheetM world
// Classical way using Cleans # notation
spreadsheet hst
# (tablef, hst) = table_hv_Form (nFormId "table") (inittable 8 10) hst
# (rowsumf,hst) = vertlistForm (ndFormId "rsum") (rowsum tablef.value) hst
# (colsumf,hst) = horlistForm (ndFormId "csum") (colsum tablef.value) hst
# (totsumf,hst) = mkEditForm (ndFormId "tsum") (sum (rowsum tablef.value)) hst
# (tablef, hst) = table_hv_Form (nFormId "table") (Init (inittable 8 10)) hst
# (rowsumf,hst) = vertlistForm (ndFormId "rsum") (Set (rowsum tablef.value)) hst
# (colsumf,hst) = horlistForm (ndFormId "csum") (Set (colsum tablef.value)) hst
# (totsumf,hst) = mkEditForm (ndFormId "tsum") (Set (sum (rowsum tablef.value))) hst
= mkHtml "Spreadsheet"
[ H1 [] "Spreadsheet Example: "
, tablef.form <=> rowsumf.form
......@@ -36,16 +34,16 @@ spreadsheet hst
// Variant using only editable forms in the # notation, displaying rest using toHtmlForm
toHtmlFormspreadsheet hst
# (table, hst) = table_hv_Form (nFormId "table") (inittable 8 10) hst
# (table, hst) = table_hv_Form (nFormId "table") (Init (inittable 8 10)) hst
= mkHtml "Spreadsheet"
[ H1 [] "Simple Spreadsheet Example: "
, table.form <=> rowsumF table.value
, colsumF table.value <=> totsumF table.value
] hst
where
rowsumF table = toHtmlForm (vertlistForm (ndFormId "rsum") (rowsum table))
colsumF table = toHtmlForm (horlistForm (ndFormId "csum") (colsum table))
totsumF table = toHtmlForm (mkEditForm (ndFormId "tsum") (sum (rowsum table)))
rowsumF table = toHtmlForm (vertlistForm (ndFormId "rsum") (Set (rowsum table)))
colsumF table = toHtmlForm (horlistForm (ndFormId "csum") (Set (colsum table)))
totsumF table = toHtmlForm (mkEditForm (ndFormId "tsum") (Set (sum (rowsum table))))
// Variant using Arrow notation
......@@ -59,8 +57,8 @@ arrowsspreadsheet hst
] hst
where
mycircuit = lift (nFormId "table") table_hv_Form
>>> ( (arr rowsum >>> lift (nFormId "rsum") vertlistForm) &&&
(arr colsum >>> lift (nFormId "csum") horlistForm)
>>> ( (arr rowsum >>> lift (ndFormId "rsum") vertlistForm) &&&
(arr colsum >>> lift (ndFormId "csum") horlistForm)
)
>>> arr (sum o fst)
>>> display (nFormId "tsum")
......@@ -68,10 +66,10 @@ where
// Variant uding monads
spreadsheetM
= table_hv_Form (nFormId "table") (inittable 8 10) >>= \tablef ->
vertlistForm (ndFormId "rsum") (rowsum tablef.value) >>= \rowsumf ->
horlistForm (ndFormId "csum") (colsum tablef.value) >>= \colsumf ->
mkEditForm (ndFormId "tsum") (sum (rowsum tablef.value)) >>= \totsumf ->
= table_hv_Form (nFormId "table") (Init (inittable 8 10)) >>= \tablef ->
vertlistForm (ndFormId "rsum") (Set (rowsum tablef.value)) >>= \rowsumf ->
horlistForm (ndFormId "csum") (Set (colsum tablef.value)) >>= \colsumf ->
mkEditForm (ndFormId "tsum") (Set (sum (rowsum tablef.value))) >>= \totsumf ->
mkHtmlM "Spreadsheet"
[ H1 [] "Spreadsheet Example: "
, Br
......@@ -79,11 +77,6 @@ spreadsheetM
, colsumf.form <=> totsumf.form
]
// simple utility functions to calculate the sum of the rows, sum of columns, total sum
rowsum table = map sum table
......
......@@ -8,7 +8,6 @@ derive gForm Tree
derive gPrint Tree
derive gParse Tree
derive gUpd Tree
derive gHpr Tree
import StdClass
......
......@@ -8,7 +8,6 @@ derive gForm Tree
derive gPrint Tree
derive gParse Tree
derive gUpd Tree
derive gHpr Tree
balanceTree :: ((Tree a) -> (Tree a)) | Ord a
balanceTree = fromListToBalTree o fromTreeToList
......