Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-libraries
Commits
f5c503fa
Commit
f5c503fa
authored
May 14, 2008
by
Rinus Plasmeijer
Browse files
*** empty log message ***
parent
143e75f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
libraries/iData/PrintUtil.dcl
View file @
f5c503fa
...
...
@@ -13,7 +13,7 @@ import DataFile
::
FoF
:==
(*
HtmlStream
->
*
HtmlStream
)
::
*
NWorld
// io states...
=
{
worldC
::
!
*
World
// world for any io
=
{
worldC
::
*
World
// world for any io
,
inout
::
*
HtmlStream
// to read from stdin and write to stdout
,
gerda
::
*
Gerda
// to read and write to a relational database
,
datafile
::
*
DataFile
// to read and write to a Clean database in a file
...
...
libraries/iData/iDataHandler.icl
View file @
f5c503fa
...
...
@@ -199,9 +199,6 @@ doHtmlClient userpage world
#
world
=
snd
(
fclose
sio
world
)
=
world
mkHSt
::
*
FormStates
*
NWorld
->
*
HSt
mkHSt
states
nworld
=
{
cntr
=
0
,
states
=
states
,
request
=
http_emptyRequest
,
world
=
nworld
,
submits
=
False
,
issub
=
False
}
...
...
@@ -633,15 +630,32 @@ where
showType
(
RV
r
)
=
"::Real"
showType
(
BV
b
)
=
"::Bool"
// The following two functions are not an example of decent Clean programming, but it works thanks to lazy evaluation...
toHtml
::
a
->
BodyTag
|
gForm
{|*|}
a
toHtml
a
#
(
na
,_)
=
mkForm
(
Set
,
mkFormId
"__toHtml"
a
<@
Display
)
(
mkHSt
emptyFormStates
(
abort
"illegal call to toHtml!
\n
"
))
//# (na,_) = mkForm (Set,mkFormId "__toHtml" a <@ Display) (mkHSt emptyFormStates (abort "illegal call to toHtml!\n"))
#
(
na
,_)
=
mkForm
(
Set
,
mkFormId
"__toHtml"
a
<@
Display
)
(
mkHSt
emptyFormStates
dummy
)
=
BodyTag
na
.
form
where
dummy
=
{
worldC
=
abort
"dummy world for toHtml!
\n
"
,
inout
=
[#
!]
,
gerda
=
abort
"dummy gerda for toHtml!
\n
"
,
datafile
=
abort
"dummy datafile for toHtml!
\n
"
}
toHtmlForm
::
!(*
HSt
->
*(
Form
a
,*
HSt
))
->
[
BodyTag
]
|
gForm
{|*|},
gUpd
{|*|},
gPrint
{|*|},
gParse
{|*|},
TC
a
toHtmlForm
anyform
//# (na,hst) = anyform (mkHSt emptyFormStates (abort "illegal call to toHtmlForm!\n"))
#
(
na
,
hst
)
=
anyform
(
mkHSt
emptyFormStates
(
abort
"illegal call to toHtmlForm!
\n
"
))
=
na
.
form
where
dummy
=
{
worldC
=
abort
"dummy world for toHtmlForm!
\n
"
,
inout
=
[#
!]
,
gerda
=
abort
"dummy gerda for toHtmlForm!
\n
"
,
datafile
=
abort
"dummy datafile for toHtmlForm!
\n
"
}
toBody
::
(
Form
a
)
->
BodyTag
toBody
form
=
BodyTag
form
.
form
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment