on master help sign in
Fix marshalling of String/Symbol (broke completion)
commit4343d428baad6f1c834aee126765d4ec2c0bc6ce authorHannes Mehnert <hannes@mehnert.org> dateTue 30 Apr 2013, 23:06 (13 years ago) parenteb6021b
2 files changed+5−3
src/Idris/IdeSlave.hs+4−2 src/Idris/REPL.hs+1−1
src/Idris/IdeSlave.hs+4−2
@@ -26,13 +26,15 @@ sExpToString (List l) = "(" ++ intercalate " " (map sExpToString l) ++ "
2626class SExpable a where
2727 toSExp :: a -> SExp
2828
29+instance SExpable SExp where
30+ toSExp a = a
31+
2932instance SExpable Bool where
3033 toSExp True = BoolAtom True
3134 toSExp False = BoolAtom False
3235
3336instance SExpable String where
34− toSExp (':' : xs) = SymbolAtom xs
35− toSExp s = StringAtom s
37+ toSExp s = StringAtom s
3638
3739instance SExpable Integer where
3840 toSExp n = IntegerAtom n
src/Idris/REPL.hs+1−1
@@ -103,7 +103,7 @@ ideslave orig mods
103103 liftIO $ sendMessage id (Right (map replacement compls, reverse unused))
104104 Just (LoadFile filename) -> do clearErr
105105 mod <- loadModule filename
106− liftIO $ sendMessage id (Right ":good")
106+ liftIO $ sendMessage id (Right (SymbolAtom ":good"))
107107 Nothing -> do liftIO $ sendMessage id (Left "did not understand"))
108108 (\e -> do liftIO $ sendMessage 0 (Left (show e)))
109109 ideslave orig mods