@@ -169,9 +169,9 @@ read =
169 Nothing ->
169 Nothing ->
170 return Exit
170 return Exit
172− Just line ->
172+ Just chars ->
174− lines = Lines line []
174+ lines = Lines (stripLegacyBackslash chars) []
176 case categorize lines of
176 case categorize lines of
177 Done input -> return input
177 Done input -> return input
@@ -187,13 +187,30 @@ readMore previousLines prefill =
188 Just chars ->
188 Just chars ->
190− lines = addLine chars previousLines
190+ lines = addLine (stripLegacyBackslash chars) previousLines
192 case categorize lines of
192 case categorize lines of
193 Done input -> return input
193 Done input -> return input
194 Continue p -> readMore lines p
194 Continue p -> readMore lines p
197+-- For compatibility with 0.19.0 such that readers of "Programming Elm" by @jfairbank
198+-- can get through the REPL section successfully.
200+-- TODO: remove stripLegacyBackslash in next MAJOR release
202+stripLegacyBackslash :: [Char] -> [Char]
203+stripLegacyBackslash chars =
209+ if last chars == '\\'
197data Prefill
214data Prefill
199 | DefStart N.Name
216 | DefStart N.Name