Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
curry
curry-frontend
Commits
5e9c330b
Commit
5e9c330b
authored
Nov 22, 2022
by
Fredrik Wieczerkowski
Browse files
Replace remaining uses of 'cymake' with 'frontend'
parent
bc63970a
Pipeline
#5037
passed with stages
in 8 minutes and 53 seconds
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
5e9c330b
...
...
@@ -7,7 +7,7 @@ export ROOT=$(CURDIR)
# binary directory and executables
export
BINDIR
=
$(ROOT)
/bin
# The frontend binary
export
CYMAKE
=
$(BINDIR)
/curry-frontend
export
FRONTEND
=
$(BINDIR)
/curry-frontend
# The stack binary
STACK
=
stack
...
...
@@ -23,7 +23,7 @@ clean:
.PHONY
:
cleanall
cleanall
:
$(STACK)
clean
--full
rm
-f
$(
CYMAKE
)
&&
rm
-rf
bin
rm
-f
$(
FRONTEND
)
&&
rm
-rf
bin
.PHONY
:
runtests
runtests
:
...
...
app/
cymake
.hs
→
app/
Main
.hs
View file @
5e9c330b
...
...
@@ -17,18 +17,18 @@ module Main (main) where
import
Curry.Base.Monad
(
runCYIO
)
import
Base.Messages
import
Files.
CymakePath
(
cymake
Greeting
,
cymake
Version
)
import
Files.
FrontendPath
(
frontend
Greeting
,
frontend
Version
)
import
CurryBuilder
(
buildCurry
)
import
CompilerOpts
(
Options
(
..
),
Cymake
Mode
(
..
),
getCompilerOpts
,
usage
)
import
CompilerOpts
(
Options
(
..
),
Frontend
Mode
(
..
),
getCompilerOpts
,
usage
)
-- |The command line tool
cymake
-- |The command line tool
frontend
main
::
IO
()
main
=
getCompilerOpts
>>=
cymake
main
=
getCompilerOpts
>>=
runFrontend
-- |Invoke the curry
builder
w.r.t the command line arguments
cymake
::
(
String
,
Options
,
[
String
],
[
String
])
->
IO
()
cymake
(
prog
,
opts
,
files
,
errs
)
=
case
optMode
opts
of
-- |Invoke the curry
frontend
w.r.t the command line arguments
runFrontend
::
(
String
,
Options
,
[
String
],
[
String
])
->
IO
()
runFrontend
(
prog
,
opts
,
files
,
errs
)
=
case
optMode
opts
of
ModeHelp
->
printUsage
prog
ModeVersion
->
printVersion
ModeNumericVersion
->
printNumericVersion
...
...
@@ -44,11 +44,11 @@ printUsage prog = putStrLn $ usage prog
-- |Print the program version
printVersion
::
IO
()
printVersion
=
putStrLn
cymake
Greeting
printVersion
=
putStrLn
frontend
Greeting
-- |Print the numeric program version
printNumericVersion
::
IO
()
printNumericVersion
=
putStrLn
cymake
Version
printNumericVersion
=
putStrLn
frontend
Version
-- |Print errors and abort execution on bad parameters
badUsage
::
String
->
[
String
]
->
IO
()
...
...
curry-frontend.cabal
View file @
5e9c330b
...
...
@@ -141,7 +141,7 @@ library
, Env.TypeConstructor
, Env.Value
, Exports
, Files.
Cymake
Path
, Files.
Frontend
Path
, Generators
, Generators.GenAbstractCurry
, Generators.GenFlatCurry
...
...
@@ -174,7 +174,7 @@ library
executable curry-frontend
hs-source-dirs: app
main-is:
cymake
.hs
main-is:
Main
.hs
default-language: Haskell2010
ghc-options: -Wall
build-depends:
...
...
debian/copyright
View file @
5e9c330b
...
...
@@ -188,7 +188,7 @@ Copyright: 2000 - 2004, Wolfgang Lux
2016, Finn Teegen
License: BSD-3-clause
Files: src/Files/
Cymake
Path.hs
Files: src/Files/
Frontend
Path.hs
Copyright: 2011, Björn Peemöller (bjp@informatik.uni-kiel.de)
License: BSD-3-clause
...
...
@@ -547,7 +547,7 @@ Copyright: 2017, Kai-Oliver Prott
2018, Kai-Oliver Prott
License: BSD-3-clause
Files: app/
cymake
.hs
Files: app/
Main
.hs
Copyright: 2005, Martin Engelke
2011-2016, Björn Peemöller
License: BSD-3-clause
...
...
overview.md
View file @
5e9c330b
...
...
@@ -64,7 +64,7 @@ Module overview of package `curry-frontend`
*
`.OpPrec`
: Operatorpräzedenzen
*
`.TypeConstructor`
: Typkonstruktoren
*
`.Value`
: Werte (Funktionen, Konstruktoren, Labels)
*
`Files.
Cymake
Path`
: Pfad zur binary
*
`Files.
Frontend
Path`
: Pfad zur binary
*
`Generators`
: Generatoren zur Code-Erzeugung
*
`GenAbstractCurry`
: Erzeugung von AbstractCurry
*
`GenFlatCurry`
: Erzeugung von FlatCurry
...
...
@@ -87,7 +87,7 @@ Module overview of package `curry-frontend`
*
`CompilerOpts`
: Optionen für den Compiler
*
`CurryBuilder`
: Kompilierung eines Moduls inklusive Modulabhängigkeiten
*
`CurryDeps`
: Berechnung von Modulabhängigkeiten
*
`
cymake`
: Command-line tool
*
`
Main`
: Command-line tool
*
`Exports`
: Erzeugung des Interfaces
*
`Frontend`
: API-Modul (to be removed)
*
`Imports`
: Import von Funktionen etc. aus Schnittstellen
...
...
src/CompilerOpts.hs
View file @
5e9c330b
...
...
@@ -18,7 +18,7 @@
-}
module
CompilerOpts
(
Options
(
..
),
CppOpts
(
..
),
PrepOpts
(
..
),
WarnOpts
(
..
),
DebugOpts
(
..
)
,
OptimizationOpts
(
..
),
CaseMode
(
..
),
Cymake
Mode
(
..
),
Verbosity
(
..
)
,
OptimizationOpts
(
..
),
CaseMode
(
..
),
Frontend
Mode
(
..
),
Verbosity
(
..
)
,
TargetType
(
..
),
WarnFlag
(
..
),
KnownExtension
(
..
),
DumpLevel
(
..
)
,
dumpLevel
,
defaultOptions
,
defaultPrepOpts
,
defaultWarnOpts
,
defaultDebugOpts
,
defaultCppOpts
...
...
@@ -44,7 +44,7 @@ import Curry.Syntax.Extension
-- |Compiler options
data
Options
=
Options
-- general
{
optMode
::
Cymake
Mode
-- ^ modus operandi
{
optMode
::
Frontend
Mode
-- ^ modus operandi
,
optVerbosity
::
Verbosity
-- ^ verbosity level
-- compilation
,
optForce
::
Bool
-- ^ force (re-)compilation of target
...
...
@@ -172,7 +172,7 @@ defaultOptimizationOpts = OptimizationOpts
}
-- |Modus operandi of the program
data
Cymake
Mode
data
Frontend
Mode
=
ModeHelp
-- ^ Show help information and exit
|
ModeVersion
-- ^ Show version and exit
|
ModeNumericVersion
-- ^ Show numeric version, suitable for later processing
...
...
src/Curry/Syntax/Extension.hs
View file @
5e9c330b
...
...
@@ -67,6 +67,8 @@ kielExtensions :: [KnownExtension]
kielExtensions
=
[
AnonFreeVars
,
FunctionalPatterns
]
-- |Known Curry tools which may accept compiler options.
-- Note: CYMAKE is kept for legacy/compatibility reasons
-- and is deprecated, specify options for FRONTEND instead.
data
KnownTool
=
KICS2
|
PAKCS
|
CYMAKE
|
FRONTEND
deriving
(
Eq
,
Read
,
Show
,
Enum
,
Bounded
,
Generic
,
Binary
)
...
...
src/Files/
Cymake
Path.hs
→
src/Files/
Frontend
Path.hs
View file @
5e9c330b
...
...
@@ -11,22 +11,22 @@
This module contains functions to obtain the version number and path
of the front end binary.
-}
module
Files.
Cymake
Path
(
get
Cymake
,
cymake
Greeting
,
cymake
Version
)
where
module
Files.
Frontend
Path
(
get
Frontend
,
frontend
Greeting
,
frontend
Version
)
where
import
Data.Version
(
showVersion
)
import
System.FilePath
((
</>
))
import
Paths_curry_frontend
-- | Show a greeting of the current front end
cymake
Greeting
::
String
cymake
Greeting
=
"This is the Curry front end, version "
++
cymake
Version
frontend
Greeting
::
String
frontend
Greeting
=
"This is the Curry front end, version "
++
frontend
Version
-- | Retrieve the version number of
cymake
cymake
Version
::
String
cymake
Version
=
showVersion
version
-- | Retrieve the version number of
frontend
frontend
Version
::
String
frontend
Version
=
showVersion
version
-- | Retrieve the location of the front end executable
get
Cymake
::
IO
String
get
Cymake
=
do
cymake
Dir
<-
getBinDir
return
$
cymake
Dir
</>
"curry-frontend"
get
Frontend
::
IO
String
get
Frontend
=
do
frontend
Dir
<-
getBinDir
return
$
frontend
Dir
</>
"curry-frontend"
src/Modules.hs
View file @
5e9c330b
...
...
@@ -181,7 +181,7 @@ preprocess opts fn src
withTempFile
::
(
FilePath
->
Handle
->
IO
a
)
->
IO
a
withTempFile
act
=
do
tmp
<-
getTemporaryDirectory
(
fn
,
hdl
)
<-
openTempFile
tmp
"
cymake
.curry"
(
fn
,
hdl
)
<-
openTempFile
tmp
"
FrontendTmp
.curry"
res
<-
act
fn
hdl
hClose
hdl
removeFile
fn
...
...
test/TestFrontend.hs
View file @
5e9c330b
...
...
@@ -50,7 +50,7 @@ runSecure :: CYIO a -> IO (Either [Message] (a, [Message]))
runSecure
act
=
runCYIO
act
`
E
.
catch
`
handler
where
handler
e
=
return
(
Left
[
message
$
text
$
show
(
e
::
E
.
SomeException
)])
-- Execute a test by calling
cymake
-- Execute a test by calling
the frontend
runTest
::
CO
.
Options
->
String
->
[
String
]
->
IO
Progress
runTest
opts
test
errorMsgs
=
if
null
errorMsgs
...
...
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