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
kics
Commits
fc534386
Commit
fc534386
authored
Jun 17, 2009
by
Bernd Brassel
Browse files
calling mkstrict
parent
67570657
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Config.hs
View file @
fc534386
...
...
@@ -19,7 +19,9 @@ getOptions = do
cupath
<-
getEnv
"CURRYPATH"
let
parsed
=
parseOptions
opts
args
parsedOpts
<-
either
usage
return
parsed
let
newOpts
=
parsedOpts
{
userlibpath
=
userlibpath
parsedOpts
let
addFiledir
=
case
takeDirectory
(
filename
opts
)
of
""
->
id
;
dir
->
(
dir
:
)
newOpts
=
parsedOpts
{
userlibpath
=
addFiledir
$
userlibpath
parsedOpts
++
splitSearchPath
cupath
}
return
(
newOpts
,
state
)
...
...
@@ -52,7 +54,7 @@ parseOptions opts ("-o":x:xs) = parseOptions (opts{target=x}) xs
parseOptions
opts
(
"-d"
:
xs
)
=
parseOptions
(
opts
{
debug
=
True
,
doNotUseInterface
=
True
})
xs
parseOptions
opts
(
"--debug"
:
xs
)
=
parseOptions
opts
(
"-d"
:
xs
)
parseOptions
opts
[]
=
Right
opts
parseOptions
opts
[
x
]
=
Right
(
opts
{
filename
=
x
,
mainModule
=
x
})
parseOptions
opts
[
x
]
=
Right
(
opts
{
filename
=
x
,
mainModule
=
takeBaseName
x
})
parseOptions
_
(
x
:
_
)
=
Left
(
"unrecognized option: "
++
x
)
usage
problem
=
do
...
...
@@ -108,7 +110,7 @@ cymake_call = unpath [installDir,"bin","parsecurry"]
libpath
::
Options
->
[
String
]
libpath
opts
@
Opts
{
userlibpath
=
up
,
kicspath
=
kp
,
filename
=
fn
}
=
(
case
takeDirectory
fn
of
""
->
id
;
dir
->
(
dir
:
))
=
--
(case takeDirectory fn of "" -> id; dir ->
(
(dir
++[pathSeparator])
:))
up
++
[
unpath
[
kp
,
"src"
,
"lib"
,
""
]]
...
...
src/KicsSubdir.hs
View file @
fc534386
...
...
@@ -69,7 +69,8 @@ addKicsSubdir s = unpath [s,currySubdir,kicsSubdir]
pathWithSubdirs
::
[
FilePath
]
->
[
FilePath
]
pathWithSubdirs
=
concatMap
dirWithSubdirs
where
dirWithSubdirs
dir
=
[
dir
,
unpath
[
dir
,
currySubdir
],
addKicsSubdir
dir
]
dirWithSubdirs
dir
=
[
dir
,
unpath
[
dir
,
currySubdir
,[
pathSeparator
]],
unpath
[
dir
,
currySubdir
,
kicsSubdir
,[
pathSeparator
]]]
inKicsSubdir
::
String
->
String
inKicsSubdir
s
=
inCurrySubdir
s
`
inSubdir
`
kicsSubdir
...
...
src/kicsi.hs
View file @
fc534386
...
...
@@ -69,10 +69,11 @@ main = do
home
<-
getEnv
"HOME"
(
options
,
state
)
<-
getOptions
mapM_
(
safe
.
put
1
options
)
welcome
let
files
=
if
null
(
filename
options
)
then
[
"Prelude"
]
else
[
filename
options
]
load
files
state
options
let
files
=
case
filename
options
of
""
->
[
"Prelude"
]
fn
->
[
fn
]
curDir
:
dirs
=
libpath
options
load
files
state
options
{
userlibpath
=
pathWithSubdirs
[
curDir
]
++
dirs
}
interactive
state
opts
=
do
mline
<-
readline
(
separate
","
(
loadedFiles
state
)
++
"> "
)
...
...
@@ -124,7 +125,8 @@ setMenue [] state opts = do
putStrLn
$
"run time settings: "
++
rts
state
putStrLn
$
"ghc compiler options: "
++
ghcOpts
opts
putStrLn
"paths to libraries: "
mapM_
putPath
(
libpath
opts
)
let
dir
:
_
:
_
:
dirs
=
libpath
opts
mapM_
putPath
(
dir
:
dirs
)
interactive
state
opts
where
putPath
p
=
putStr
" "
>>
putStrLn
p
...
...
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