Merge pull request #189 from chrrasmussen/fix-ide-mode-backwards-compatibility

Fix IDE Mode for Atom
This commit is contained in:
Edwin Brady 2020-02-27 10:38:36 +00:00 committed by GitHub
commit 8f583ca900
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View File

@ -179,7 +179,9 @@ idePutStrLn outf i msg
printIDEWithStatus : File -> Integer -> String -> SExp -> Core ()
printIDEWithStatus outf i status msg
= do let m = SExpList [SymbolAtom status, toSExp msg ]
= do let m = SExpList [SymbolAtom status, toSExp msg,
-- highlighting; currently blank
SExpList []]
send outf (SExpList [SymbolAtom "return", m, toSExp i])
printIDEResult : File -> Integer -> SExp -> Core ()

View File

@ -33,7 +33,9 @@ printWithStatus status msg
case idemode opts of
REPL _ => coreLift $ putStrLn msg
IDEMode i _ f =>
do let m = SExpList [SymbolAtom status, toSExp msg ]
do let m = SExpList [SymbolAtom status, toSExp msg,
-- highlighting; currently blank
SExpList []]
send f (SExpList [SymbolAtom "return", m, toSExp i])
export

View File

@ -1,4 +1,4 @@
000018(:protocol-version 2 0)
000038(:write-string "1/1: Building LocType (LocType.idr)" 1)
000015(:return (:ok ()) 1)
000018(:return (:ok () ()) 1)
Alas the file is done, aborting

View File

@ -9,7 +9,7 @@ MAJOR=`echo $VERSION | cut -d. -f1`
MINOR=`echo $VERSION | cut -d. -f2`
PATCH=`echo $VERSION | cut -d. -f3`
EXPECTED_LINE="(:return (:ok ((${MAJOR} ${MINOR} ${PATCH}) (\"${TAG}\"))) 1)"
EXPECTED_LINE="(:return (:ok ((${MAJOR} ${MINOR} ${PATCH}) (\"${TAG}\")) ()) 1)"
EXPECTED_LENGTH=$(expr ${#EXPECTED_LINE} + 1) # +LF
sed -e "s/__EXPECTED_LINE__/$(printf '%06x' ${EXPECTED_LENGTH})${EXPECTED_LINE}/g" expected.in > expected