Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
curry-packages
spicey
Commits
8e88908b
Commit
8e88908b
authored
Jan 05, 2018
by
Michael Hanus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation updated
parent
edabf80a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
122 additions
and
14 deletions
+122
-14
README.md
README.md
+8
-3
docs/README.txt
docs/README.txt
+4
-1
docs/main.tex
docs/main.tex
+88
-0
docs/manual.tex
docs/manual.tex
+17
-9
package.json
package.json
+4
-0
src/Spicey/SpiceUp.curry
src/Spicey/SpiceUp.curry
+1
-1
No files found.
README.md
View file @
8e88908b
...
...
@@ -30,12 +30,17 @@ To generate an application, follow the steps below.
a relative file name will be relative to the place where
the cgi programs are stored.
4.
Compile the generated programs by
`make compile`
.
4.
Change into the generated directory containing all sources as a
Curry package, e.g., by
`cd Blog`
.
5.
Configure the Makefile (variable WEBSERVERDIR) and execute
5.
Install all required packages by
`make install`
.
6.
Compile the generated programs by
`make compile`
.
7.
Configure the Makefile (variable WEBSERVERDIR) and execute
`make deploy`
to deploy the web application.
6
.
After the successful compilation, the application is executable
8
.
After the successful compilation, the application is executable
in a web browser by loading
`<URL of web dir>/spicey.cgi`
.
Note that the database is generated with the
`cdbi`
package.
...
...
docs/README.txt
View file @
8e88908b
...
...
@@ -2,4 +2,7 @@ This directory contains some documention for the tool:
manual.tex:
A short description to be included in the main manual of the Curry system.
\ No newline at end of file
main.tex:
The manual as a stand-alone LaTeX file.
docs/main.tex
0 → 100644
View file @
8e88908b
\documentclass
[11pt,fleqn]
{
article
}
\usepackage
[T1]
{
fontenc
}
\usepackage
{
latexsym
}
\usepackage
{
url
}
\usepackage
{
xspace
}
\usepackage
{
graphicx
}
\setlength
{
\textwidth
}{
16.5cm
}
\setlength
{
\textheight
}{
23cm
}
\renewcommand
{
\baselinestretch
}{
1.1
}
\setlength
{
\topmargin
}{
-1cm
}
\setlength
{
\oddsidemargin
}{
0cm
}
\setlength
{
\evensidemargin
}{
0cm
}
\setlength
{
\marginparwidth
}{
0.0cm
}
\setlength
{
\marginparsep
}{
0.0cm
}
\newlength
{
\figurewidth
}
\setlength
{
\figurewidth
}{
\textwidth
}
\addtolength
{
\figurewidth
}{
-0.4cm
}
% font for program texts
\renewcommand
{
\tt
}{
\usefont
{
OT1
}{
cmtt
}{
m
}{
n
}
\selectfont
}
\newcommand
{
\codefont
}{
\small\tt
}
\usepackage
{
listings
}
\lstset
{
aboveskip=1.5ex,
belowskip=1.5ex,
showstringspaces=false,
% no special string space
mathescape=true,
flexiblecolumns=false,
xleftmargin=2ex,
basewidth=0.52em,
basicstyle=
\small\ttfamily
}
\lstset
{
literate=
{
->
}{{$
\rightarrow
{}
\!\!\!
$}}
3
}
\lstnewenvironment
{
curry
}{}{}
\lstnewenvironment
{
currynomath
}{
\lstset
{
mathescape=false
}}{}
% Curry w/o math
\newcommand
{
\listline
}{
\vrule
width0pt depth1.75ex
}
% program text in normal text
\newcommand
{
\code
}
[1]
{
\mbox
{
\codefont
#1
}}
% program text in normal text with apostrophs
\newcommand
{
\ccode
}
[1]
{
``
\code
{
#1
}
''
}
\newcommand
{
\pindex
}
[1]
{
\index
{
#1@
{
\tt
#1
}}}
% program elements in index
\newcommand
{
\todo
}
[1]
{
\fbox
{
\sc
To do: #1
}}
\newcommand
{
\CYS
}{
Curry
\xspace
}
% name of the Curry system described here
\newcommand
{
\cyshome
}{
\mbox
{
\textit
{
curryhome
}}
\xspace
}
% symbolic installation directory
\newcommand
{
\us
}{
\char
95
\xspace
}
% underscore
\begin{document}
\sloppy
\newcommand
{
\curryppdocs
}{
.
}
\input
{
manual.tex
}
% Bibliography
\begin{thebibliography}
{
10
}
\bibitem
{
BrasselHanusMueller08PADL
}
B.~Bra
{
\ss
}
el, M.~Hanus, and M.~M
{
\"
u
}
ller.
\newblock
High-level database programming in
{
Curry
}
.
\newblock
In
{
\em
Proc. of the Tenth International Symposium on Practical
Aspects of Declarative Languages (PADL'08)
}
, pages 316--332. Springer LNCS
4902, 2008.
\bibitem
{
HanusKoschnicke14TPLP
}
M.~Hanus and S.~Koschnicke.
\newblock
An
{
ER-based
}
framework for declarative web programming.
\newblock
{
\em
Theory and Practice of Logic Programming
}
, 14(3):269--291, 2014.
\bibitem
{
HanusKrone17EPTCS
}
M.~Hanus and J.~Krone.
\newblock
A typeful integration of
{
SQL
}
into
{
Curry
}
.
\newblock
In
{
\em
Proceedings of the 24th International Workshop on Functional
and (Constraint) Logic Programming
}
, volume 234 of
{
\em
Electronic
Proceedings in Theoretical Computer Science
}
, pages 104--119. Open Publishing
Association, 2017.
\end{thebibliography}
\end{document}
docs/manual.tex
View file @
8e88908b
...
...
@@ -15,8 +15,7 @@ inconsistent state of the database.
\subsection
{
Installation
}
The actual implementation of Spicey is a package
managed by the Curry Package Manager CPM
(see also Section~
\ref
{
sec-cpm
}
).
managed by the Curry Package Manager CPM.
Thus, to install the newest version of Spicey, use the following commands:
%
\begin{curry}
...
...
@@ -45,7 +44,7 @@ and store it in some program file, e.g., \ccode{MyERD.curry}.
The directory
\code
{
examples
}
in the package
\code
{
spicey
}
\footnote
{
%
If you installed Spicey as described above,
the downloaded
\code
{
spicey
}
package is located in the directory
\code
{
\$
HOME/.cpm/app
_
packages/spicey
}
.
}
\code
{
\$
HOME/.cpm/app
\us
{}
packages/spicey
}
.
}
contains two examples for such ERD program files:
\begin{description}
\item
[\code{BlogERD.curry}:]
...
...
@@ -81,9 +80,16 @@ the web programs are stored.
In order to avoid such confusion, it might be better to specify
an absolute path name for the database file.
After the generation of this project (see the generated file
\code
{
README.txt
}
for information about the generated project structure),
one can compile the generated programs by
Spicey generates the web application as a Curry package in a new
directory. Thus, change into this directory (e.g.,
\code
{
cd
$
ERD
$}
)
and install all required packages by the command
\begin{curry}
> make install
\end{curry}
%
The generated file
\code
{
README.txt
}
contains some information
about the generated project structure.
One can compile the generated programs by
\begin{curry}
> make compile
\end{curry}
...
...
@@ -104,8 +110,10 @@ in a web browser by selecting the URL \code{<URL of web dir>/spicey.cgi}.
The application generated by Spicey is a schematic initial implementation.
It provides an appropriate basic programming structure but
it can be extended in various ways.
In particular, one can also use embedded SQL statements when
further developing the Curry code, since the underlying database
In particular, one can also use embedded SQL statements
(see
\cite
{
HanusKrone17EPTCS
}
for details)
when further developing the Curry code, since the underlying database
access operations are generated with the
\code
{
cdbi
}
package.
The syntax and use of such embedded SQL statements
is described in the Curry preprocessor.
is sketched in
\cite
{
HanusKrone17EPTCS
}
and
described in the Curry preprocessor.
package.json
View file @
8e88908b
...
...
@@ -21,6 +21,10 @@
"src-dir"
:
"examples"
,
"modules"
:
[
"TestSpicey"
]
},
"documentation"
:
{
"src-dir"
:
"docs"
,
"main"
:
"main.tex"
},
"source"
:
{
"git"
:
"https://git.ps.informatik.uni-kiel.de/curry-packages/spicey.git"
,
"tag"
:
"$version"
...
...
src/Spicey/SpiceUp.curry
View file @
8e88908b
...
...
@@ -16,7 +16,7 @@ import Spicey.Scaffolding
systemBanner :: String
systemBanner =
let bannerText = "Spicey Web Framework (Version " ++ packageVersion ++
" of 0
4
/01/18)"
" of 0
5
/01/18)"
bannerLine = take (length bannerText) (repeat '-')
in bannerLine ++ "\n" ++ bannerText ++ "\n" ++ bannerLine
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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