Commit 163eaa28 authored by Peter Achten's avatar Peter Achten
Browse files

*** empty log message ***

parent 1c091f0f
......@@ -504,10 +504,8 @@ toBody :: (Form a) -> BodyTag
toBody form = BodyTag form.form
createDefault :: a | gUpd{|*|} a
createDefault = hd (mkNewList [])
where
mkNewList _ = snd (gUpd {|*|} (UpdSearch (UpdC "_Cons") 0) []) // generates a new list with one element of required type
derive gUpd []
createDefault = fromJust (snd (gUpd {|*|} (UpdSearch (UpdC "Just") 0) Nothing))
derive gUpd Maybe
setCntr :: InputId *HSt -> *HSt
setCntr i hst = {hst & cntr = i}
......
......@@ -19,11 +19,9 @@ where
(==)(Ref2 file1) (Ref2 file2) = file1 == file2
ref2EditForm :: !(InIDataId a) !(InIDataId (Ref2 a)) !*HSt -> (Form a,!*HSt) | gForm{|*|}, gUpd{|*|}, gPrint{|*|}, gParse{|*|}, TC a
ref2EditForm (inita,formida) (initra,formidra) hst
ref2EditForm (inita,formida) (_,{ival=Ref2 refname}) hst
| refname == "" = mkEditForm (Init,reuseFormId formida createDefault) hst
= mkEditForm (inita,{formida & id = refname}) hst
where
(Ref2 refname) = formidra.ival
| otherwise = mkEditForm (inita,{formida & id = refname}) hst
invokeRefEditor :: (!(InIDataId b) !*HSt -> (Form d,!*HSt)) (InIDataId b) !*HSt -> (Form b,!*HSt)
invokeRefEditor editor (init,formid) hst
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment