Fix IDE Mode for Atom

This commit is contained in:
Christian Rasmussen 2020-01-31 18:44:08 +01:00
parent 802dee2192
commit 3a436061ca
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