Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
curry-packages
currypp
Commits
de79b8b5
Commit
de79b8b5
authored
Jan 03, 2021
by
Michael Hanus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parser options updated
parent
ba2ef664
Changes
46
Hide whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
76 additions
and
74 deletions
+76
-74
docs/manual.tex
docs/manual.tex
+14
-14
examples/Contracts/BubbleSort.curry
examples/Contracts/BubbleSort.curry
+1
-1
examples/Contracts/BubbleSortFormat.curry
examples/Contracts/BubbleSortFormat.curry
+2
-2
examples/Contracts/Coin.curry
examples/Contracts/Coin.curry
+1
-1
examples/Contracts/Fac.curry
examples/Contracts/Fac.curry
+1
-1
examples/Contracts/Fib.curry
examples/Contracts/Fib.curry
+1
-1
examples/Contracts/FibInfinite.curry
examples/Contracts/FibInfinite.curry
+1
-1
examples/Contracts/MinSort.curry
examples/Contracts/MinSort.curry
+1
-1
examples/Contracts/NDAssertion.curry
examples/Contracts/NDAssertion.curry
+1
-1
examples/Contracts/Quicksort.curry
examples/Contracts/Quicksort.curry
+2
-2
examples/Contracts/QuicksortPartition.curry
examples/Contracts/QuicksortPartition.curry
+1
-1
examples/DefaultRules/BreakWhere.curry
examples/DefaultRules/BreakWhere.curry
+1
-1
examples/DefaultRules/BubbleSort.curry
examples/DefaultRules/BubbleSort.curry
+1
-1
examples/DefaultRules/ColorMap.curry
examples/DefaultRules/ColorMap.curry
+2
-2
examples/DefaultRules/DutchFlag.curry
examples/DefaultRules/DutchFlag.curry
+1
-1
examples/DefaultRules/FixInt.curry
examples/DefaultRules/FixInt.curry
+1
-1
examples/DefaultRules/FloatString.curry
examples/DefaultRules/FloatString.curry
+1
-1
examples/DefaultRules/Guards.curry
examples/DefaultRules/Guards.curry
+2
-2
examples/DefaultRules/IndSeqStrategy.curry
examples/DefaultRules/IndSeqStrategy.curry
+2
-2
examples/DefaultRules/ListFuns.curry
examples/DefaultRules/ListFuns.curry
+2
-2
examples/DefaultRules/Lookup.curry
examples/DefaultRules/Lookup.curry
+1
-1
examples/DefaultRules/Nim.curry
examples/DefaultRules/Nim.curry
+2
-2
examples/DefaultRules/ParOr.curry
examples/DefaultRules/ParOr.curry
+2
-2
examples/DefaultRules/Queens.curry
examples/DefaultRules/Queens.curry
+2
-2
examples/DefaultRules/Rev2.curry
examples/DefaultRules/Rev2.curry
+2
-2
examples/DefaultRules/WorldCup.curry
examples/DefaultRules/WorldCup.curry
+2
-2
examples/DeterministicOperations/BubbleSortDet.curry
examples/DeterministicOperations/BubbleSortDet.curry
+1
-1
examples/DeterministicOperations/DutchFlagDet.curry
examples/DeterministicOperations/DutchFlagDet.curry
+1
-1
examples/DeterministicOperations/ParOrDet.curry
examples/DeterministicOperations/ParOrDet.curry
+1
-1
examples/IntegratedCode/FormatExample.curry
examples/IntegratedCode/FormatExample.curry
+1
-1
examples/IntegratedCode/HtmlExamples.curry
examples/IntegratedCode/HtmlExamples.curry
+1
-1
examples/IntegratedCode/MixedExamples.curry
examples/IntegratedCode/MixedExamples.curry
+1
-1
examples/IntegratedCode/RegexpExamples.curry
examples/IntegratedCode/RegexpExamples.curry
+1
-1
examples/IntegratedCode/RevDup.curry
examples/IntegratedCode/RevDup.curry
+1
-1
examples/IntegratedCode/XmlExamples.curry
examples/IntegratedCode/XmlExamples.curry
+1
-1
examples/IntegratedCode/testFormat.curry
examples/IntegratedCode/testFormat.curry
+1
-1
examples/IntegratedCode/testHtml.curry
examples/IntegratedCode/testHtml.curry
+1
-1
examples/IntegratedCode/testRegExps.curry
examples/IntegratedCode/testRegExps.curry
+1
-1
examples/IntegratedSQLCode/ErrorExamples.curry
examples/IntegratedSQLCode/ErrorExamples.curry
+1
-1
examples/IntegratedSQLCode/MiscTest.curry
examples/IntegratedSQLCode/MiscTest.curry
+1
-1
examples/IntegratedSQLCode/SQLExamples.curry
examples/IntegratedSQLCode/SQLExamples.curry
+1
-1
examples/IntegratedSQLCode/SelectExamples.curry
examples/IntegratedSQLCode/SelectExamples.curry
+1
-1
src/CPP/DefaultRules.curry
src/CPP/DefaultRules.curry
+1
-1
src/IntegratedCode/Parser/ML/MLParser.curry
src/IntegratedCode/Parser/ML/MLParser.curry
+1
-1
src/IntegratedCode/Parser/RegexParser.curry
src/IntegratedCode/Parser/RegexParser.curry
+1
-1
src/Main.curry
src/Main.curry
+7
-5
No files found.
docs/manual.tex
View file @
de79b8b5
...
...
@@ -58,7 +58,7 @@ at the beginning of the source program.
For instance, in order to use default rules in a Curry program,
one has to put the line
\begin{curry}
{
-# OPTIONS
_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-
}
{
-# OPTIONS
_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-
}
\end{curry}
at the beginning of the program.
This option tells the
\CYS
front end to process the Curry source program
...
...
@@ -78,7 +78,7 @@ For instance, in order to use integrated code and default rules
in a module and store the transformed program,
one has to put the line
\begin{curry}
{
-# OPTIONS
_
CYMAKE
-F --pgmF=currypp --optF=foreigncode --optF=defaultrules --optF=-o #-
}
{
-# OPTIONS
_
FRONTEND
-F --pgmF=currypp --optF=foreigncode --optF=defaultrules --optF=-o #-
}
\end{curry}
at the beginning of the program.
%
...
...
@@ -86,11 +86,11 @@ If the options about the kind of preprocessing is omitted,
all kinds of preprocessing
are applied. Thus, the preprocessor directive
\begin{curry}
{
-# OPTIONS
_
CYMAKE
-F --pgmF=currypp #-
}
{
-# OPTIONS
_
FRONTEND
-F --pgmF=currypp #-
}
\end{curry}
is equivalent to
\begin{curry}
{
-# OPTIONS
_
CYMAKE
-F --pgmF=currypp --optF=foreigncode --optF=defaultrules --optF=contracts #-
}
{
-# OPTIONS
_
FRONTEND
-F --pgmF=currypp --optF=foreigncode --optF=defaultrules --optF=contracts #-
}
\end{curry}
...
...
@@ -113,7 +113,7 @@ Curry expressions.
For this purpose, the program containing this code must start with
the preprocessing directive
\begin{curry}
{
-# OPTIONS
_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-
}
{
-# OPTIONS
_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-
}
\end{curry}
%
The next sections describe the currently supported foreign languages.
...
...
@@ -133,7 +133,7 @@ For instance, the following module defines a predicate
to check whether a string is a valid identifier:
\begin{curry}
{
-# OPTIONS
_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-
}
{
-# OPTIONS
_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-
}
import RegExp
...
...
@@ -156,7 +156,7 @@ For instance, the following program defines an operation
that formats a string, an integer (with leading sign and zeros),
and a float with leading sign and precision 3:
\begin{currynomath}
{
-# OPTIONS
_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-
}
{
-# OPTIONS
_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-
}
import Data.Format
...
...
@@ -193,7 +193,7 @@ into these HTML syntax, these Curry expressions must be enclosed
in curly brackets.
The following example program shows its use:
\begin
{
curry
}
{
-
# OPTIONS
_
CYMAKE
-
F
--
pgmF
=
currypp
--
optF
=
foreigncode #
-
}
{
-
# OPTIONS
_
FRONTEND
-
F
--
pgmF
=
currypp
--
optF
=
foreigncode #
-
}
import HTML
...
...
@@ -220,7 +220,7 @@ The following simple example, taken from \cite{Hanus01PADL},
shows the use of this feature:
\begin
{
currynomath
}
{
-
# OPTIONS
_
CYMAKE
-
F
--
pgmF
=
currypp
--
optF
=
foreigncode #
-
}
{
-
# OPTIONS
_
FRONTEND
-
F
--
pgmF
=
currypp
--
optF
=
foreigncode #
-
}
import HTML
...
...
@@ -257,7 +257,7 @@ and XML expressions (\code{XmlExp}) can be included by enclosing
them in curly and double curly brackets, respectively.
The following example program shows its use:
\begin
{
currynomath
}
{
-
# OPTIONS
_
CYMAKE
-
F
--
pgmF
=
currypp
--
optF
=
foreigncode #
-
}
{
-
# OPTIONS
_
FRONTEND
-
F
--
pgmF
=
currypp
--
optF
=
foreigncode #
-
}
import HTML
...
...
@@ -542,7 +542,7 @@ The path to the info file is passed as a parameter prefixed by
\ccode
{
--
model:
}
to the Curry preprocessor, e.g., by the preprocessor
directive
\begin
{
curry
}
{
-
# OPTIONS
_
CYMAKE
-
F
--
pgmF
=
currypp
--
optF
=--
model:
$
\ldots
$
/
Uni
_
SQLCode.info #
-
}
{
-
# OPTIONS
_
FRONTEND
-
F
--
pgmF
=
currypp
--
optF
=--
model:
$
\ldots
$
/
Uni
_
SQLCode.info #
-
}
\end
{
curry
}
\item
The info file is placed in the same directory as the Curry source file
...
...
@@ -687,7 +687,7 @@ As a simple example, we show the implementation of the
previous example for sequential rules with a default rule:
%
\begin
{
curry
}
{
-
# OPTIONS
_
CYMAKE
-
F
--
pgmF
=
currypp
--
optF
=
defaultrules #
-
}
{
-
# OPTIONS
_
FRONTEND
-
F
--
pgmF
=
currypp
--
optF
=
defaultrules #
-
}
mlookup key
(
_
++
[(
key,value
)]
++
_
)
=
Just value
mlookup'default
_
_
=
Nothing
...
...
@@ -701,7 +701,7 @@ since it is easier to characterize the unsafe positions
of the queens on the chessboard
(
see the first rule of
\code
{
safe
}
)
:
%
\begin
{
curry
}
{
-
# OPTIONS
_
CYMAKE
-
F
--
pgmF
=
currypp
--
optF
=
defaultrules #
-
}
{
-
# OPTIONS
_
FRONTEND
-
F
--
pgmF
=
currypp
--
optF
=
defaultrules #
-
}
import Combinatorial
(
permute
)
import Integer
(
abs
)
...
...
@@ -760,7 +760,7 @@ with a postcondition and a specification
(
where the code for
\code
{
sorted
}
and
\code
{
perm
}
is not shown here
)
:
%
\begin
{
curry
}
{
-
# OPTIONS
_
CYMAKE
-
F
--
pgmF
=
currypp
--
optF
=
contracts #
-
}
{
-
# OPTIONS
_
FRONTEND
-
F
--
pgmF
=
currypp
--
optF
=
contracts #
-
}
$
\ldots
$
...
...
examples/Contracts/BubbleSort.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules --optF=contracts #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules --optF=contracts #-}
import Test.Prop
...
...
examples/Contracts/BubbleSortFormat.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp #-}
{-# OPTIONS_
CYMAKE
-Wnone #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp #-}
{-# OPTIONS_
FRONTEND
-Wnone #-}
-- Example for using integrated code, default rules, and contracts in one
-- module
...
...
examples/Contracts/Coin.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=contracts #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=contracts #-}
import Test.Prop
...
...
examples/Contracts/Fac.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=contracts #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=contracts #-}
-- Defining factorial numbers:
...
...
examples/Contracts/Fib.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=contracts #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=contracts #-}
-- Fibonacci numbers specified by traditional recursive definition
-- and computed efficiently by an infinite list.
...
...
examples/Contracts/FibInfinite.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=contracts #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=contracts #-}
import Test.Prop
...
...
examples/Contracts/MinSort.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=contracts #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=contracts #-}
-- straight selection sort with specification
import Control.SetFunctions
...
...
examples/Contracts/NDAssertion.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=contracts --optF=-e #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=contracts --optF=-e #-}
-- Example for a postcondition with a nondeterministic definition:
por True _ = True
...
...
examples/Contracts/Quicksort.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=contracts #-}
{-# OPTIONS_
CYMAKE
-Wnone #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=contracts #-}
{-# OPTIONS_
FRONTEND
-Wnone #-}
import Test.Prop
...
...
examples/Contracts/QuicksortPartition.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=contracts --optF=-e #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=contracts --optF=-e #-}
-- Implementation of quicksort with partition
-- Use option "-e" for contract wrapper (see part'post below).
...
...
examples/DefaultRules/BreakWhere.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
import Test.Prop
...
...
examples/DefaultRules/BubbleSort.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
import Test.Prop
import Control.SetFunctions
...
...
examples/DefaultRules/ColorMap.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
CYMAKE
-Wnone #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-Wnone #-}
import Test.Prop
...
...
examples/DefaultRules/DutchFlag.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
import Test.Prop
...
...
examples/DefaultRules/FixInt.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
import Test.Prop
...
...
examples/DefaultRules/FloatString.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
import Test.Prop
...
...
examples/DefaultRules/Guards.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
CYMAKE
-Wnone #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-Wnone #-}
import Test.Prop
...
...
examples/DefaultRules/IndSeqStrategy.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules --optF=-o #-}
{-# OPTIONS_
CYMAKE
-Wnone #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules --optF=-o #-}
{-# OPTIONS_
FRONTEND
-Wnone #-}
-- This example shows that optimal evaluation is still possible
-- with default rules.
...
...
examples/DefaultRules/ListFuns.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
CYMAKE
-Wnone #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-Wnone #-}
import Test.Prop
...
...
examples/DefaultRules/Lookup.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
import Test.Prop
...
...
examples/DefaultRules/Nim.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
CYMAKE
-Wnone #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-Wnone #-}
import Test.Prop
...
...
examples/DefaultRules/ParOr.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
CYMAKE
-Wnone #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-Wnone #-}
import Test.Prop
...
...
examples/DefaultRules/Queens.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
CYMAKE
-Wnone #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-Wnone #-}
import Test.Prop
...
...
examples/DefaultRules/Rev2.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
CYMAKE
-Wnone #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-Wnone #-}
import Test.Prop
...
...
examples/DefaultRules/WorldCup.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
CYMAKE
-Wnone #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-Wnone #-}
import Test.Prop
...
...
examples/DeterministicOperations/BubbleSortDet.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
import Test.Prop
...
...
examples/DeterministicOperations/DutchFlagDet.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
import Test.Prop
...
...
examples/DeterministicOperations/ParOrDet.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=defaultrules #-}
import Test.Prop
...
...
examples/IntegratedCode/FormatExample.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-}
------------------------------------------------------------------------------
--- This program contains some examples for integrated code to format strings.
...
...
examples/IntegratedCode/HtmlExamples.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-}
------------------------------------------------------------------------------
--- This program contains examples for integrated code to support
...
...
examples/IntegratedCode/MixedExamples.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-}
------------------------------------------------------------------------------
--- This program contains some examples for using different kinds of
...
...
examples/IntegratedCode/RegexpExamples.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-}
------------------------------------------------------------------------------
--- This program contains some examples for integrated code to support
...
...
examples/IntegratedCode/RevDup.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-}
------------------------------------------------------------------------------
-- Example for CGI programming in Curry:
...
...
examples/IntegratedCode/XmlExamples.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=foreigncode --optF=-o #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=foreigncode --optF=-o #-}
------------------------------------------------------------------------------
--- This program contains examples for integrated code to support
...
...
examples/IntegratedCode/testFormat.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-}
------------------------------------------------------------------------------
--- This program contains some examples for integrated code to support
...
...
examples/IntegratedCode/testHtml.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-}
------------------------------------------------------------------------------
--- This program contains tests for integrated code to support
...
...
examples/IntegratedCode/testRegExps.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-}
------------------------------------------------------------------------------
--- This program contains some tests for integrated code to support
...
...
examples/IntegratedSQLCode/ErrorExamples.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-}
--- Test module for integration of SQL:
--- Checking whether the preprocessor detects errors
...
...
examples/IntegratedSQLCode/MiscTest.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-}
--- test module for integration of SQL
--- using currypp
...
...
examples/IntegratedSQLCode/SQLExamples.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-}
--- Test module for integration of SQL:
--- Testing also insert/update/delete operations
...
...
examples/IntegratedSQLCode/SelectExamples.curry
View file @
de79b8b5
{-# OPTIONS_
CYMAKE
-F --pgmF=currypp --optF=foreigncode #-}
{-# OPTIONS_
FRONTEND
-F --pgmF=currypp --optF=foreigncode #-}
--- Test module for integration of SQL
...
...
src/CPP/DefaultRules.curry
View file @
de79b8b5
...
...
@@ -32,7 +32,7 @@
--- Springer LNCS 10137, pp. 1-18, 2017
---
--- This preprocessor can be invoked by the Curry preprocessor `currypp`
--- with the option `defaultrules` (provided as a
CYMAKE
option,
--- with the option `defaultrules` (provided as a
FRONTEND
option,
--- see the example programs in the directory `examples/DefaultRules`).
---
--- @author Michael Hanus
...
...
src/IntegratedCode/Parser/ML/MLParser.curry
View file @
de79b8b5
...
...
@@ -5,7 +5,7 @@
--- @version February 2015
------------------------------------------------------------------------------
{-# OPTIONS_
CYMAKE
-Wno-missing-signatures -Wno-incomplete-patterns #-}
{-# OPTIONS_
FRONTEND
-Wno-missing-signatures -Wno-incomplete-patterns #-}
module MLParser (lex,layout,parse) where
...
...
src/IntegratedCode/Parser/RegexParser.curry
View file @
de79b8b5
...
...
@@ -5,7 +5,7 @@
--- @version July 2017
------------------------------------------------------------------------------
{-# OPTIONS_
CYMAKE
-Wno-missing-signatures -Wno-incomplete-patterns #-}
{-# OPTIONS_
FRONTEND
-Wno-missing-signatures -Wno-incomplete-patterns #-}
module RegexParser(parse) where
...
...
src/Main.curry
View file @
de79b8b5
...
...
@@ -7,7 +7,7 @@
--- is supported (option `foreigncode`, see module `Translator`).
---
--- @author Michael Hanus
--- @version
December
202
0
--- @version
January
202
1
------------------------------------------------------------------------------
import Control.Monad ( when )
...
...
@@ -264,7 +264,7 @@ pathToModName currypath psf =
| dir `isPrefixOf` pp = drop (length dir + 1) pp
| otherwise = tryRemovePathPrefix dirs pp
-- Replace OPTIONS_CYMAKE line containing currypp call
-- Replace
OPTIONS_FRONTEND /
OPTIONS_CYMAKE line containing currypp call
-- in a source text by blank line (to avoid recursive calls):
replaceOptionsLine :: String -> String
replaceOptionsLine = unlines . map replOptLine . lines
...
...
@@ -273,11 +273,13 @@ replaceOptionsLine = unlines . map replOptLine . lines
then " "
else s
-- Is this a OPTIONS_CYMAKE comment line?
-- Is this a
n OPTIONS_FRONTEND or
OPTIONS_CYMAKE comment line?
isOptionLine :: String -> Bool
isOptionLine s = "{-# OPTIONS_CYMAKE " `isPrefixOf` dropWhile isSpace s -- -}
isOptionLine s =
"{-# OPTIONS_CYMAKE " `isPrefixOf` dropWhile isSpace s ||
"{-# OPTIONS_FRONTEND " `isPrefixOf` dropWhile isSpace s -- -}
-- Extract all OPTIONS_CYMAKE lines:
-- Extract all
OPTIONS_FRONTEND /
OPTIONS_CYMAKE lines:
optionLines :: String -> String
optionLines = unlines . filter isOptionLine . lines
...
...
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