mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-12-25 22:06:33 +03:00
Fix tempfile names.
This commit is contained in:
parent
66169377b1
commit
6917f09a02
@ -353,16 +353,15 @@ compileToSS c tm outfile
|
||||
compileToSO : {auto c : Ref Ctxt Defs} ->
|
||||
(appDirRel : String) -> (outSsAbs : String) -> Core ()
|
||||
compileToSO appDirRel outSsAbs
|
||||
= do tmpfn <- coreLift tmpName
|
||||
let tmpFileRel = appDirRel ++ dirSep ++ tmpfn
|
||||
= do tmpFileAbs <- coreLift tmpName
|
||||
chez <- coreLift $ findChez
|
||||
let build= "#!" ++ chez ++ " --script\n" ++
|
||||
"(parameterize ([optimize-level 3]) (compile-program \"" ++
|
||||
outSsAbs ++ "\"))"
|
||||
Right () <- coreLift $ writeFile tmpFileRel build
|
||||
| Left err => throw (FileErr tmpFileRel err)
|
||||
coreLift $ chmod tmpFileRel 0o755
|
||||
coreLift $ system tmpFileRel
|
||||
Right () <- coreLift $ writeFile tmpFileAbs build
|
||||
| Left err => throw (FileErr tmpFileAbs err)
|
||||
coreLift $ chmod tmpFileAbs 0o755
|
||||
coreLift $ system tmpFileAbs
|
||||
pure ()
|
||||
|
||||
makeSh : String -> String -> Core ()
|
||||
|
@ -88,7 +88,7 @@ compileExpr : Ref Ctxt Defs -> (execDir : String) ->
|
||||
ClosedTerm -> (outfile : String) -> Core (Maybe String)
|
||||
compileExpr c execDir tm outfile
|
||||
= do tmp <- coreLift $ tmpName
|
||||
let outn = execDir ++ dirSep ++ tmp ++ ".scm"
|
||||
let outn = tmp ++ ".scm"
|
||||
compileToSCM c tm outn
|
||||
csc <- coreLift findCSC
|
||||
ok <- coreLift $ system (csc ++ " " ++ outn ++ " -o " ++ outfile)
|
||||
@ -99,7 +99,7 @@ compileExpr c execDir tm outfile
|
||||
executeExpr : Ref Ctxt Defs -> (execDir : String) -> ClosedTerm -> Core ()
|
||||
executeExpr c execDir tm
|
||||
= do tmp <- coreLift $ tmpName
|
||||
let outn = execDir ++ dirSep ++ tmp ++ ".scm"
|
||||
let outn = tmp ++ ".scm"
|
||||
compileToSCM c tm outn
|
||||
csi <- coreLift findCSI
|
||||
coreLift $ system (csi ++ " -s " ++ outn)
|
||||
|
@ -325,7 +325,7 @@ compileExpr c execDir tm outfile
|
||||
executeExpr : Ref Ctxt Defs -> (execDir : String) -> ClosedTerm -> Core ()
|
||||
executeExpr c execDir tm
|
||||
= do tmp <- coreLift $ tmpName
|
||||
let outn = execDir ++ dirSep ++ tmp ++ ".rkt"
|
||||
let outn = tmp ++ ".rkt"
|
||||
compileToRKT c tm outn
|
||||
racket <- coreLift findRacket
|
||||
coreLift $ system (racket ++ " " ++ outn)
|
||||
|
Loading…
Reference in New Issue
Block a user