on master help sign in
:let at the REPL now supports syntax extensions!
commitc7e8834ef894886385b2c10dff9fd14f7f05ec0b authorAlyssa Carter <trillionalyssa@gmail.com> dateSat 11 Oct 2014, 21:22 (12 years ago) parent37eae55
1 file changed+3−1
src/Idris/REPL.hs+3−1
src/Idris/REPL.hs+3−1
@@ -744,7 +744,9 @@ process fn (NewDefn decls) = do
744744 defineName (PFix fc fixity strs : defns) = do
745745 fmodifyState idris_fixities (map (Fix fixity) strs ++)
746746 unless (null defns) $ defineName defns
747− defineName (PSyntax{}:_) = tclift $ tfail (Msg "That kind of declaration is not supported. If you feel it should be supported, please submit an issue at https://github.com/idris-lang/Idris-dev.")
747+ defineName (PSyntax _ syntax:_) = do
748+ i <- get
749+ put (addReplSyntax i syntax)
748750 defineName decls = do
749751 elabDecls toplevel (map fixClauses decls)
750752 setReplDefined (getName (head decls))