Commit 3a8d9b5c authored by Peter Achten's avatar Peter Achten
Browse files

made signature of universalDB more consistent with universalRefEditor

parent 727d9a79
...@@ -187,12 +187,12 @@ discussPapersPage account accounts hst ...@@ -187,12 +187,12 @@ discussPapersPage account accounts hst
# selectedpaper = allpapernrs!!selected # selectedpaper = allpapernrs!!selected
# mbpaperrefinfo = getPaperInfo selectedpaper accounts # mbpaperrefinfo = getPaperInfo selectedpaper accounts
# (RefDiscussion (Ref2 name)) = (fromJust mbpaperrefinfo).discussion # (RefDiscussion (Ref2 name)) = (fromJust mbpaperrefinfo).discussion
# (disclist,hst) = universalDB (Init,Discussion []) name (\_ _ -> Ok) hst # (disclist,hst) = universalDB (Init,Discussion [],name) (\_ _ -> Ok) hst
# (time,date,hst) = getTimeAndDate hst # (time,date,hst) = getTimeAndDate hst
# (newsubmit,newdiscf,hst) # (newsubmit,newdiscf,hst)
= mkSubStateForm (if pdfun.changed Set Init, nFormId "sh_dpp_adddisc" (TS 80 "")) disclist = mkSubStateForm (if pdfun.changed Set Init, nFormId "sh_dpp_adddisc" (TS 80 "")) disclist
(\s -> addItemTextInput (account.login.loginName) time date (toS s)) hst (\s -> addItemTextInput (account.login.loginName) time date (toS s)) hst
# (_,hst) = if newsubmit (universalDB (Set,newdiscf.value) name (\_ _ -> Ok) hst) (undef,hst) # (_,hst) = if newsubmit (universalDB (Set,newdiscf.value,name) (\_ _ -> Ok) hst) (undef,hst)
# (disclistf,hst) = mkEditForm (Set,sdFormId "sh_show_disc" newdiscf.value) hst # (disclistf,hst) = mkEditForm (Set,sdFormId "sh_show_disc" newdiscf.value) hst
# (newsubmit,newdiscf,hst) # (newsubmit,newdiscf,hst)
= if newsubmit (mkSubStateForm (Set,nFormId "sh_dpp_adddisc" (TS 80 "")) disclist = if newsubmit (mkSubStateForm (Set,nFormId "sh_dpp_adddisc" (TS 80 "")) disclist
......
...@@ -14,7 +14,7 @@ invokeRefEditor :: (!(InIDataId b) !*HSt -> (Form d,!*HSt)) (InIDataId b) !*HSt ...@@ -14,7 +14,7 @@ invokeRefEditor :: (!(InIDataId b) !*HSt -> (Form d,!*HSt)) (InIDataId b) !*HSt
universalRefEditor :: !(InIDataId (Ref2 a)) !(a -> Judgement) !*HSt -> (Form a,!*HSt) | iData, TC a universalRefEditor :: !(InIDataId (Ref2 a)) !(a -> Judgement) !*HSt -> (Form a,!*HSt) | iData, TC a
universalDB :: !(!Init,!a) !String !(String a -> Judgement) !*HSt -> (a,!*HSt) | iData, TC a universalDB :: !(!Init,!a,!String) !(String a -> Judgement) !*HSt -> (a,!*HSt) | iData, TC a
// Usefull for exception handling // Usefull for exception handling
......
...@@ -72,8 +72,8 @@ where ...@@ -72,8 +72,8 @@ where
// editor for persistent information // editor for persistent information
universalDB :: !(!Init,!a) !String !(String a -> Judgement) !*HSt -> (a,!*HSt) | iData, TC a universalDB :: !(!Init,!a,!String) !(String a -> Judgement) !*HSt -> (a,!*HSt) | iData, TC a
universalDB (init,value) filename invariant hst universalDB (init,value,filename) invariant hst
# (dbf,hst) = myDatabase Init 0 value hst // create / read out database file # (dbf,hst) = myDatabase Init 0 value hst // create / read out database file
# dbversion = fst dbf.value // version number stored in database # dbversion = fst dbf.value // version number stored in database
# dbvalue = snd dbf.value // value stored in database # dbvalue = snd dbf.value // value stored in database
......
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