Skip to content

Commit e024c2a

Browse files
authored
Fix missing errors (#101)
1 parent 721ad37 commit e024c2a

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

src/Main.purs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,18 @@ displayErrors errs = do
5353
column2 <- JQuery.select "#column2"
5454
JQuery.empty column2
5555

56-
forWithIndex_ errs \i (CompilerError{ position, message }) ->
57-
for_ (unwrap position) \(ErrorPosition pos) -> do
58-
h1 <- JQuery.create "<h1>"
59-
JQuery.addClass "error-banner" h1
60-
JQuery.appendText ("Error " <> show (i + 1) <> " of " <> show (Array.length errs)) h1
61-
62-
pre <- JQuery.create "<pre>"
63-
code_ <- JQuery.create "<code>"
64-
JQuery.append code_ pre
65-
JQuery.appendText message code_
66-
67-
JQuery.append h1 column2
68-
JQuery.append pre column2
56+
forWithIndex_ errs \i (CompilerError{ message }) -> do
57+
h1 <- JQuery.create "<h1>"
58+
JQuery.addClass "error-banner" h1
59+
JQuery.appendText ("Error " <> show (i + 1) <> " of " <> show (Array.length errs)) h1
60+
61+
pre <- JQuery.create "<pre>"
62+
code_ <- JQuery.create "<code>"
63+
JQuery.append code_ pre
64+
JQuery.appendText message code_
65+
66+
JQuery.append h1 column2
67+
JQuery.append pre column2
6968

7069
-- | Display plain text in the right hand column.
7170
displayPlainText

0 commit comments

Comments
 (0)