diff --git a/brat/Brat/Error.hs b/brat/Brat/Error.hs index f4d56ddd..ed189d21 100644 --- a/brat/Brat/Error.hs +++ b/brat/Brat/Error.hs @@ -186,7 +186,7 @@ instance Show SrcErr where show (SrcErr prelim Err{msg=msg}) = unlines [prelim, " " ++ show msg] errHeader :: String -> String -errHeader name = "Error in " ++ name ++ ":" +errHeader name = "Error in " ++ name addSrcName :: String -> Error -> SrcErr addSrcName fname = SrcErr (errHeader fname) @@ -196,7 +196,7 @@ addSrcContext _ _ (Right r) = Right r addSrcContext fname cts (Left err@Err{fc=fc}) = Left (SrcErr msg err) where msg = case fc of - Just fc -> unlines (errHeader (fname ++ '@':show fc):showFileContext cts fc) + Just fc -> unlines (errHeader (fname ++ '@':show (start fc)):showFileContext cts fc) Nothing -> errHeader fname showFileContext :: String -> FC -> [String] diff --git a/brat/Brat/FC.hs b/brat/Brat/FC.hs index ab50a96f..958df5d1 100644 --- a/brat/Brat/FC.hs +++ b/brat/Brat/FC.hs @@ -2,7 +2,11 @@ module Brat.FC where data Pos = Pos { line :: Int , col :: Int - } deriving (Eq, Show) + } deriving Eq + +instance Show Pos where + show (Pos { .. }) = show line ++ ":" ++ show col + instance Ord Pos where compare (Pos l c) (Pos l' c') | l == l' = compare c c' diff --git a/brat/test/golden/binding/cons.brat.golden b/brat/test/golden/binding/cons.brat.golden index 760511cd..0737f0fb 100644 --- a/brat/test/golden/binding/cons.brat.golden +++ b/brat/test/golden/binding/cons.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/binding/cons.brat@FC {start = Pos {line = 7, col = 10}, end = Pos {line = 7, col = 23}}: +Error in test/golden/binding/cons.brat@7:10 badUncons(cons(stuff)) = stuff ^^^^^^^^^^^^^ diff --git a/brat/test/golden/binding/let.brat.golden b/brat/test/golden/binding/let.brat.golden index 2cde36ed..13288245 100644 --- a/brat/test/golden/binding/let.brat.golden +++ b/brat/test/golden/binding/let.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/binding/let.brat@FC {start = Pos {line = 7, col = 14}, end = Pos {line = 7, col = 36}}: +Error in test/golden/binding/let.brat@7:14 badBinding = let x = twoThings in x ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/brat/test/golden/cycle/a.brat.golden b/brat/test/golden/cycle/a.brat.golden index ad7e3339..8ac00e2e 100644 --- a/brat/test/golden/cycle/a.brat.golden +++ b/brat/test/golden/cycle/a.brat.golden @@ -1,3 +1,3 @@ -Error in b: +Error in b Cyclic imports: modules all transitively import each other: b, c, a diff --git a/brat/test/golden/cycle/b.brat.golden b/brat/test/golden/cycle/b.brat.golden index ad7e3339..8ac00e2e 100644 --- a/brat/test/golden/cycle/b.brat.golden +++ b/brat/test/golden/cycle/b.brat.golden @@ -1,3 +1,3 @@ -Error in b: +Error in b Cyclic imports: modules all transitively import each other: b, c, a diff --git a/brat/test/golden/cycle/c.brat.golden b/brat/test/golden/cycle/c.brat.golden index a80248ae..456b0de4 100644 --- a/brat/test/golden/cycle/c.brat.golden +++ b/brat/test/golden/cycle/c.brat.golden @@ -1,3 +1,3 @@ -Error in c: +Error in c Cyclic imports: modules all transitively import each other: c, a, b diff --git a/brat/test/golden/cycle/cycle.brat.golden b/brat/test/golden/cycle/cycle.brat.golden index 316edb79..a35e30ac 100644 --- a/brat/test/golden/cycle/cycle.brat.golden +++ b/brat/test/golden/cycle/cycle.brat.golden @@ -1,3 +1,3 @@ -Error in cycle_aux: +Error in cycle_aux Cyclic imports: modules all transitively import each other: cycle_aux, cycle diff --git a/brat/test/golden/cycle/cycle_aux.brat.golden b/brat/test/golden/cycle/cycle_aux.brat.golden index 316edb79..a35e30ac 100644 --- a/brat/test/golden/cycle/cycle_aux.brat.golden +++ b/brat/test/golden/cycle/cycle_aux.brat.golden @@ -1,3 +1,3 @@ -Error in cycle_aux: +Error in cycle_aux Cyclic imports: modules all transitively import each other: cycle_aux, cycle diff --git a/brat/test/golden/error/apply_two_thunks.brat.golden b/brat/test/golden/error/apply_two_thunks.brat.golden index 204774e3..8db248d4 100644 --- a/brat/test/golden/error/apply_two_thunks.brat.golden +++ b/brat/test/golden/error/apply_two_thunks.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/apply_two_thunks.brat@FC {start = Pos {line = 9, col = 9}, end = Pos {line = 9, col = 18}}: +Error in test/golden/error/apply_two_thunks.brat@9:9 go(n) = thunks(n) ^^^^^^^^^ diff --git a/brat/test/golden/error/arith_implicit_conversion.brat.golden b/brat/test/golden/error/arith_implicit_conversion.brat.golden index a38d0194..f4936d90 100644 --- a/brat/test/golden/error/arith_implicit_conversion.brat.golden +++ b/brat/test/golden/error/arith_implicit_conversion.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/arith_implicit_conversion.brat@FC {start = Pos {line = 2, col = 20}, end = Pos {line = 2, col = 21}}: +Error in test/golden/error/arith_implicit_conversion.brat@2:20 f(x, y) = x + (x * y) ^ diff --git a/brat/test/golden/error/arith_implicit_conversion2.brat.golden b/brat/test/golden/error/arith_implicit_conversion2.brat.golden index 10241649..9cfd0675 100644 --- a/brat/test/golden/error/arith_implicit_conversion2.brat.golden +++ b/brat/test/golden/error/arith_implicit_conversion2.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/arith_implicit_conversion2.brat@FC {start = Pos {line = 2, col = 16}, end = Pos {line = 2, col = 17}}: +Error in test/golden/error/arith_implicit_conversion2.brat@2:16 f(x, y) = x + (y - x) ^ diff --git a/brat/test/golden/error/arith_implicit_conversion3.brat.golden b/brat/test/golden/error/arith_implicit_conversion3.brat.golden index cf59a64b..23e8dcc0 100644 --- a/brat/test/golden/error/arith_implicit_conversion3.brat.golden +++ b/brat/test/golden/error/arith_implicit_conversion3.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/arith_implicit_conversion3.brat@FC {start = Pos {line = 2, col = 11}, end = Pos {line = 2, col = 12}}: +Error in test/golden/error/arith_implicit_conversion3.brat@2:11 f(x, y) = y + x ^ diff --git a/brat/test/golden/error/bad_rpat.brat.golden b/brat/test/golden/error/bad_rpat.brat.golden index 1fc4e633..a01459f7 100644 --- a/brat/test/golden/error/bad_rpat.brat.golden +++ b/brat/test/golden/error/bad_rpat.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/bad_rpat.brat@FC {start = Pos {line = 2, col = 8}, end = Pos {line = 2, col = 19}}: +Error in test/golden/error/bad_rpat.brat@2:8 test = cons(1, []) ^^^^^^^^^^^ diff --git a/brat/test/golden/error/bad_underscore.brat.golden b/brat/test/golden/error/bad_underscore.brat.golden index a491843e..d6cad163 100644 --- a/brat/test/golden/error/bad_underscore.brat.golden +++ b/brat/test/golden/error/bad_underscore.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/bad_underscore.brat@FC {start = Pos {line = 2, col = 12}, end = Pos {line = 2, col = 18}}: +Error in test/golden/error/bad_underscore.brat@2:12 uscore = { i => _ } ^^^^^^ diff --git a/brat/test/golden/error/bad_underscore2.brat.golden b/brat/test/golden/error/bad_underscore2.brat.golden index 263b2ae7..5cedd68d 100644 --- a/brat/test/golden/error/bad_underscore2.brat.golden +++ b/brat/test/golden/error/bad_underscore2.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/bad_underscore2.brat@FC {start = Pos {line = 2, col = 13}, end = Pos {line = 2, col = 14}}: +Error in test/golden/error/bad_underscore2.brat@2:13 uscore(i) = _ ^ diff --git a/brat/test/golden/error/badvec.brat.golden b/brat/test/golden/error/badvec.brat.golden index 9098c931..b949ffde 100644 --- a/brat/test/golden/error/badvec.brat.golden +++ b/brat/test/golden/error/badvec.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/badvec.brat@FC {start = Pos {line = 2, col = 6}, end = Pos {line = 2, col = 9}}: +Error in test/golden/error/badvec.brat@2:6 v3 = [1] ^^^ diff --git a/brat/test/golden/error/badvec2.brat.golden b/brat/test/golden/error/badvec2.brat.golden index ea4dae90..043d0a1b 100644 --- a/brat/test/golden/error/badvec2.brat.golden +++ b/brat/test/golden/error/badvec2.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/badvec2.brat@FC {start = Pos {line = 2, col = 6}, end = Pos {line = 2, col = 9}}: +Error in test/golden/error/badvec2.brat@2:6 v3 = nil ^^^ diff --git a/brat/test/golden/error/badvec3.brat.golden b/brat/test/golden/error/badvec3.brat.golden index 8e337fc8..b26bb3a0 100644 --- a/brat/test/golden/error/badvec3.brat.golden +++ b/brat/test/golden/error/badvec3.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/badvec3.brat@FC {start = Pos {line = 2, col = 6}, end = Pos {line = 2, col = 18}}: +Error in test/golden/error/badvec3.brat@2:6 v3 = cons(1, nil) ^^^^^^^^^^^^ diff --git a/brat/test/golden/error/badvec4.brat.golden b/brat/test/golden/error/badvec4.brat.golden index 53262957..064be061 100644 --- a/brat/test/golden/error/badvec4.brat.golden +++ b/brat/test/golden/error/badvec4.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/badvec4.brat@FC {start = Pos {line = 2, col = 6}, end = Pos {line = 2, col = 11}}: +Error in test/golden/error/badvec4.brat@2:6 v3 = [1,2] ^^^^^ diff --git a/brat/test/golden/error/duplicate_decl.brat.golden b/brat/test/golden/error/duplicate_decl.brat.golden index bb0a3271..dba58e0f 100644 --- a/brat/test/golden/error/duplicate_decl.brat.golden +++ b/brat/test/golden/error/duplicate_decl.brat.golden @@ -1,3 +1,3 @@ -Error in test/golden/error/duplicate_decl.brat: +Error in test/golden/error/duplicate_decl.brat Name clash: [inc] diff --git a/brat/test/golden/error/empty_into.brat.golden b/brat/test/golden/error/empty_into.brat.golden index b300d675..8bf870af 100644 --- a/brat/test/golden/error/empty_into.brat.golden +++ b/brat/test/golden/error/empty_into.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/empty_into.brat@FC {start = Pos {line = 5, col = 11}, end = Pos {line = 5, col = 21}}: +Error in test/golden/error/empty_into.brat@5:11 intoErr = |> makeInt ^^^^^^^^^^ diff --git a/brat/test/golden/error/fanin-diff-types.brat.golden b/brat/test/golden/error/fanin-diff-types.brat.golden index 1524722f..48ed349b 100644 --- a/brat/test/golden/error/fanin-diff-types.brat.golden +++ b/brat/test/golden/error/fanin-diff-types.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/fanin-diff-types.brat@FC {start = Pos {line = 2, col = 5}, end = Pos {line = 2, col = 13}}: +Error in test/golden/error/fanin-diff-types.brat@2:5 f = { [\/] } ^^^^^^^^ diff --git a/brat/test/golden/error/fanin-dynamic-length.brat.golden b/brat/test/golden/error/fanin-dynamic-length.brat.golden index 98321968..dba84d49 100644 --- a/brat/test/golden/error/fanin-dynamic-length.brat.golden +++ b/brat/test/golden/error/fanin-dynamic-length.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/fanin-dynamic-length.brat@FC {start = Pos {line = 2, col = 8}, end = Pos {line = 2, col = 16}}: +Error in test/golden/error/fanin-dynamic-length.brat@2:8 f(n) = { [\/] } ^^^^^^^^ diff --git a/brat/test/golden/error/fanin-list.brat.golden b/brat/test/golden/error/fanin-list.brat.golden index 704b9089..d1df349b 100644 --- a/brat/test/golden/error/fanin-list.brat.golden +++ b/brat/test/golden/error/fanin-list.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/fanin-list.brat@FC {start = Pos {line = 2, col = 5}, end = Pos {line = 2, col = 13}}: +Error in test/golden/error/fanin-list.brat@2:5 f = { [\/] } ^^^^^^^^ diff --git a/brat/test/golden/error/fanin-not-enough-overs.brat.golden b/brat/test/golden/error/fanin-not-enough-overs.brat.golden index 58cfd7be..814e2407 100644 --- a/brat/test/golden/error/fanin-not-enough-overs.brat.golden +++ b/brat/test/golden/error/fanin-not-enough-overs.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/fanin-not-enough-overs.brat@FC {start = Pos {line = 2, col = 5}, end = Pos {line = 2, col = 13}}: +Error in test/golden/error/fanin-not-enough-overs.brat@2:5 f = { [\/] } ^^^^^^^^ diff --git a/brat/test/golden/error/fanin-too-many-overs.brat.golden b/brat/test/golden/error/fanin-too-many-overs.brat.golden index 91e24787..24ccb14c 100644 --- a/brat/test/golden/error/fanin-too-many-overs.brat.golden +++ b/brat/test/golden/error/fanin-too-many-overs.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/fanin-too-many-overs.brat@FC {start = Pos {line = 2, col = 5}, end = Pos {line = 2, col = 13}}: +Error in test/golden/error/fanin-too-many-overs.brat@2:5 f = { [\/] } ^^^^^^^^ diff --git a/brat/test/golden/error/fanout-diff-types.brat.golden b/brat/test/golden/error/fanout-diff-types.brat.golden index 1d4ad441..546e1edd 100644 --- a/brat/test/golden/error/fanout-diff-types.brat.golden +++ b/brat/test/golden/error/fanout-diff-types.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/fanout-diff-types.brat@FC {start = Pos {line = 2, col = 5}, end = Pos {line = 2, col = 13}}: +Error in test/golden/error/fanout-diff-types.brat@2:5 f = { [/\] } ^^^^^^^^ diff --git a/brat/test/golden/error/fanout-dynamic-length.brat.golden b/brat/test/golden/error/fanout-dynamic-length.brat.golden index 2034ff3a..95cb1c9a 100644 --- a/brat/test/golden/error/fanout-dynamic-length.brat.golden +++ b/brat/test/golden/error/fanout-dynamic-length.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/fanout-dynamic-length.brat@FC {start = Pos {line = 2, col = 8}, end = Pos {line = 2, col = 16}}: +Error in test/golden/error/fanout-dynamic-length.brat@2:8 f(n) = { [/\] } ^^^^^^^^ diff --git a/brat/test/golden/error/fanout-list.brat.golden b/brat/test/golden/error/fanout-list.brat.golden index 74061199..fcacedc3 100644 --- a/brat/test/golden/error/fanout-list.brat.golden +++ b/brat/test/golden/error/fanout-list.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/fanout-list.brat@FC {start = Pos {line = 2, col = 5}, end = Pos {line = 2, col = 13}}: +Error in test/golden/error/fanout-list.brat@2:5 f = { [/\] } ^^^^^^^^ diff --git a/brat/test/golden/error/fanout-not-enough-overs.brat.golden b/brat/test/golden/error/fanout-not-enough-overs.brat.golden index 5fa8e3ae..d8f72ac3 100644 --- a/brat/test/golden/error/fanout-not-enough-overs.brat.golden +++ b/brat/test/golden/error/fanout-not-enough-overs.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/fanout-not-enough-overs.brat@FC {start = Pos {line = 2, col = 5}, end = Pos {line = 2, col = 13}}: +Error in test/golden/error/fanout-not-enough-overs.brat@2:5 f = { [/\] } ^^^^^^^^ diff --git a/brat/test/golden/error/fanout-too-many-overs.brat.golden b/brat/test/golden/error/fanout-too-many-overs.brat.golden index 7b13154a..fc3e771e 100644 --- a/brat/test/golden/error/fanout-too-many-overs.brat.golden +++ b/brat/test/golden/error/fanout-too-many-overs.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/fanout-too-many-overs.brat@FC {start = Pos {line = 2, col = 5}, end = Pos {line = 2, col = 13}}: +Error in test/golden/error/fanout-too-many-overs.brat@2:5 f = { [/\] } ^^^^^^^^ diff --git a/brat/test/golden/error/inconsistentclauses.brat.golden b/brat/test/golden/error/inconsistentclauses.brat.golden index e715923b..4d3a37c2 100644 --- a/brat/test/golden/error/inconsistentclauses.brat.golden +++ b/brat/test/golden/error/inconsistentclauses.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/inconsistentclauses.brat@FC {start = Pos {line = 1, col = 1}, end = Pos {line = 3, col = 9}}: +Error in test/golden/error/inconsistentclauses.brat@1:1 f(Bool, Nat) -> Nat ^^^^^^^^^^^^^^^^^^^ f(true, n) = 1 diff --git a/brat/test/golden/error/kbadvec.brat.golden b/brat/test/golden/error/kbadvec.brat.golden index c14904dd..0ac09da8 100644 --- a/brat/test/golden/error/kbadvec.brat.golden +++ b/brat/test/golden/error/kbadvec.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/kbadvec.brat@FC {start = Pos {line = 2, col = 17}, end = Pos {line = 2, col = 20}}: +Error in test/golden/error/kbadvec.brat@2:17 triple = { b => [b] } ^^^ diff --git a/brat/test/golden/error/kbadvec2.brat.golden b/brat/test/golden/error/kbadvec2.brat.golden index 102d2f0a..68bb8fdc 100644 --- a/brat/test/golden/error/kbadvec2.brat.golden +++ b/brat/test/golden/error/kbadvec2.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/kbadvec2.brat@FC {start = Pos {line = 2, col = 17}, end = Pos {line = 2, col = 20}}: +Error in test/golden/error/kbadvec2.brat@2:17 triple = { b => nil } ^^^ diff --git a/brat/test/golden/error/kbadvec3.brat.golden b/brat/test/golden/error/kbadvec3.brat.golden index b9552ded..d412aba5 100644 --- a/brat/test/golden/error/kbadvec3.brat.golden +++ b/brat/test/golden/error/kbadvec3.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/kbadvec3.brat@FC {start = Pos {line = 2, col = 19}, end = Pos {line = 2, col = 31}}: +Error in test/golden/error/kbadvec3.brat@2:19 constNil = { b => cons(1, nil) } ^^^^^^^^^^^^ diff --git a/brat/test/golden/error/kbadvec4.brat.golden b/brat/test/golden/error/kbadvec4.brat.golden index 8d2c78b8..de458a3d 100644 --- a/brat/test/golden/error/kbadvec4.brat.golden +++ b/brat/test/golden/error/kbadvec4.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/kbadvec4.brat@FC {start = Pos {line = 2, col = 7}, end = Pos {line = 2, col = 12}}: +Error in test/golden/error/kbadvec4.brat@2:7 f = { [1,2] => true } ^^^^^ diff --git a/brat/test/golden/error/kvarnotfound.brat.golden b/brat/test/golden/error/kvarnotfound.brat.golden index 86403950..ccb00255 100644 --- a/brat/test/golden/error/kvarnotfound.brat.golden +++ b/brat/test/golden/error/kvarnotfound.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/kvarnotfound.brat@FC {start = Pos {line = 2, col = 12}, end = Pos {line = 2, col = 13}}: +Error in test/golden/error/kvarnotfound.brat@2:12 f = { x => y } ^ diff --git a/brat/test/golden/error/multilambda-id.brat.golden b/brat/test/golden/error/multilambda-id.brat.golden index 17e551d1..4c788184 100644 --- a/brat/test/golden/error/multilambda-id.brat.golden +++ b/brat/test/golden/error/multilambda-id.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/multilambda-id.brat@FC {start = Pos {line = 2, col = 15}, end = Pos {line = 2, col = 16}}: +Error in test/golden/error/multilambda-id.brat@2:15 f = { true => | ^ diff --git a/brat/test/golden/error/multilambda-id2.brat.golden b/brat/test/golden/error/multilambda-id2.brat.golden index 6e6f381e..05e2f245 100644 --- a/brat/test/golden/error/multilambda-id2.brat.golden +++ b/brat/test/golden/error/multilambda-id2.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/multilambda-id2.brat@FC {start = Pos {line = 2, col = 12}, end = Pos {line = 2, col = 13}}: +Error in test/golden/error/multilambda-id2.brat@2:12 g = { 0 => ||succ(n) => | } ^ diff --git a/brat/test/golden/error/multilambda-id3.brat.golden b/brat/test/golden/error/multilambda-id3.brat.golden index 9630157d..1ae49cea 100644 --- a/brat/test/golden/error/multilambda-id3.brat.golden +++ b/brat/test/golden/error/multilambda-id3.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/multilambda-id3.brat@FC {start = Pos {line = 2, col = 15}, end = Pos {line = 2, col = 18}}: +Error in test/golden/error/multilambda-id3.brat@2:15 f = { true => |;||false =>|;|;|} ^^^ diff --git a/brat/test/golden/error/nameclash1.brat.golden b/brat/test/golden/error/nameclash1.brat.golden index 98783e75..631b97aa 100644 --- a/brat/test/golden/error/nameclash1.brat.golden +++ b/brat/test/golden/error/nameclash1.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/nameclash1.brat@FC {start = Pos {line = 1, col = 1}, end = Pos {line = 1, col = 16}}: +Error in test/golden/error/nameclash1.brat@1:1 type Nat(x) = x ^^^^^^^^^^^^^^^ diff --git a/brat/test/golden/error/nameclash2.brat.golden b/brat/test/golden/error/nameclash2.brat.golden index dfbc7f18..d4ab5b56 100644 --- a/brat/test/golden/error/nameclash2.brat.golden +++ b/brat/test/golden/error/nameclash2.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/nameclash2.brat@FC {start = Pos {line = 2, col = 1}, end = Pos {line = 2, col = 16}}: +Error in test/golden/error/nameclash2.brat@2:1 type A(x,y) = y ^^^^^^^^^^^^^^^ diff --git a/brat/test/golden/error/no_thunk.brat.golden b/brat/test/golden/error/no_thunk.brat.golden index 5188661e..925cae16 100644 --- a/brat/test/golden/error/no_thunk.brat.golden +++ b/brat/test/golden/error/no_thunk.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/no_thunk.brat@FC {start = Pos {line = 8, col = 14}, end = Pos {line = 8, col = 15}}: +Error in test/golden/error/no_thunk.brat@8:14 Rz(2.0 / n); X ^ diff --git a/brat/test/golden/error/noovers.brat.golden b/brat/test/golden/error/noovers.brat.golden index d0100d4e..b2a13a64 100644 --- a/brat/test/golden/error/noovers.brat.golden +++ b/brat/test/golden/error/noovers.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/noovers.brat@FC {start = Pos {line = 2, col = 2}, end = Pos {line = 2, col = 8}}: +Error in test/golden/error/noovers.brat@2:2 f(a, b) = [] ^^^^^^ diff --git a/brat/test/golden/error/pair.brat.golden b/brat/test/golden/error/pair.brat.golden index 64d6b521..c410b972 100644 --- a/brat/test/golden/error/pair.brat.golden +++ b/brat/test/golden/error/pair.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/pair.brat@FC {start = Pos {line = 5, col = 8}, end = Pos {line = 5, col = 11}}: +Error in test/golden/error/pair.brat@5:8 pair = row -- Distinct from a pair ^^^ diff --git a/brat/test/golden/error/pass.brat.golden b/brat/test/golden/error/pass.brat.golden index 1ab96a9e..4ba900cb 100644 --- a/brat/test/golden/error/pass.brat.golden +++ b/brat/test/golden/error/pass.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/pass.brat@FC {start = Pos {line = 5, col = 12}, end = Pos {line = 5, col = 13}}: +Error in test/golden/error/pass.brat@5:12 f = { .., (x => x) } ^ diff --git a/brat/test/golden/error/pass_empty.brat.golden b/brat/test/golden/error/pass_empty.brat.golden index dcbe380b..73fe028a 100644 --- a/brat/test/golden/error/pass_empty.brat.golden +++ b/brat/test/golden/error/pass_empty.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/pass_empty.brat@FC {start = Pos {line = 2, col = 17}, end = Pos {line = 2, col = 19}}: +Error in test/golden/error/pass_empty.brat@2:17 f = { (x => x), .. } ^^ diff --git a/brat/test/golden/error/portpull-ambiguous.brat.golden b/brat/test/golden/error/portpull-ambiguous.brat.golden index b56ade4d..a602887c 100644 --- a/brat/test/golden/error/portpull-ambiguous.brat.golden +++ b/brat/test/golden/error/portpull-ambiguous.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/portpull-ambiguous.brat@FC {start = Pos {line = 6, col = 22}, end = Pos {line = 6, col = 31}}: +Error in test/golden/error/portpull-ambiguous.brat@6:22 id2 = x, y => (id,id)(a1:x, y) ^^^^^^^^^ diff --git a/brat/test/golden/error/portpull.brat.golden b/brat/test/golden/error/portpull.brat.golden index e85c8257..65b4f90e 100644 --- a/brat/test/golden/error/portpull.brat.golden +++ b/brat/test/golden/error/portpull.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/portpull.brat@FC {start = Pos {line = 6, col = 22}, end = Pos {line = 6, col = 31}}: +Error in test/golden/error/portpull.brat@6:22 id2 = x,y => (id, id)(a1:x, y) ^^^^^^^^^ diff --git a/brat/test/golden/error/simpleterm.brat.golden b/brat/test/golden/error/simpleterm.brat.golden index 5dbff3c5..2084319a 100644 --- a/brat/test/golden/error/simpleterm.brat.golden +++ b/brat/test/golden/error/simpleterm.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/simpleterm.brat@FC {start = Pos {line = 2, col = 10}, end = Pos {line = 2, col = 14}}: +Error in test/golden/error/simpleterm.brat@2:10 simple = true ^^^^ diff --git a/brat/test/golden/error/type-arith.brat.golden b/brat/test/golden/error/type-arith.brat.golden index ac2ab7bf..987b4392 100644 --- a/brat/test/golden/error/type-arith.brat.golden +++ b/brat/test/golden/error/type-arith.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/type-arith.brat@FC {start = Pos {line = 1, col = 20}, end = Pos {line = 1, col = 25}}: +Error in test/golden/error/type-arith.brat@1:20 f(n :: #, Vec(Nat, n ^ 3)) -> Bool ^^^^^ diff --git a/brat/test/golden/error/type-arith2.brat.golden b/brat/test/golden/error/type-arith2.brat.golden index f6e41097..e7bc9637 100644 --- a/brat/test/golden/error/type-arith2.brat.golden +++ b/brat/test/golden/error/type-arith2.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/type-arith2.brat@FC {start = Pos {line = 1, col = 20}, end = Pos {line = 1, col = 25}}: +Error in test/golden/error/type-arith2.brat@1:20 f(n :: #, Vec(Nat, n * n)) -> Bool ^^^^^ diff --git a/brat/test/golden/error/unmatched_bracket.brat.golden b/brat/test/golden/error/unmatched_bracket.brat.golden index 427aac74..334835ca 100644 --- a/brat/test/golden/error/unmatched_bracket.brat.golden +++ b/brat/test/golden/error/unmatched_bracket.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/unmatched_bracket.brat@FC {start = Pos {line = 1, col = 17}, end = Pos {line = 1, col = 19}}: +Error in test/golden/error/unmatched_bracket.brat@1:17 f(n, Vec([], n) -> Vec([], n) -- First bracket never closed ^^ diff --git a/brat/test/golden/error/varnotfound.brat.golden b/brat/test/golden/error/varnotfound.brat.golden index 07b26355..10aaaf74 100644 --- a/brat/test/golden/error/varnotfound.brat.golden +++ b/brat/test/golden/error/varnotfound.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/varnotfound.brat@FC {start = Pos {line = 2, col = 8}, end = Pos {line = 2, col = 9}}: +Error in test/golden/error/varnotfound.brat@2:8 f(x) = g(x) ^ diff --git a/brat/test/golden/error/vecpat.brat.golden b/brat/test/golden/error/vecpat.brat.golden index 0d9e24a2..97e66e76 100644 --- a/brat/test/golden/error/vecpat.brat.golden +++ b/brat/test/golden/error/vecpat.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/vecpat.brat@FC {start = Pos {line = 3, col = 5}, end = Pos {line = 3, col = 10}}: +Error in test/golden/error/vecpat.brat@3:5 fst3(nil) = none ^^^^^ diff --git a/brat/test/golden/error/vecpat2.brat.golden b/brat/test/golden/error/vecpat2.brat.golden index 7fc56984..a3a8733d 100644 --- a/brat/test/golden/error/vecpat2.brat.golden +++ b/brat/test/golden/error/vecpat2.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/vecpat2.brat@FC {start = Pos {line = 3, col = 5}, end = Pos {line = 3, col = 14}}: +Error in test/golden/error/vecpat2.brat@3:5 fst3(some(x)) = none ^^^^^^^^^ diff --git a/brat/test/golden/error/vecpat3.brat.golden b/brat/test/golden/error/vecpat3.brat.golden index 53b3521f..98ae4fc5 100644 --- a/brat/test/golden/error/vecpat3.brat.golden +++ b/brat/test/golden/error/vecpat3.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/error/vecpat3.brat@FC {start = Pos {line = 3, col = 5}, end = Pos {line = 3, col = 12}}: +Error in test/golden/error/vecpat3.brat@3:5 fst3([a,b]) = none ^^^^^^^ diff --git a/brat/test/golden/imports/alias-clash.brat.golden b/brat/test/golden/imports/alias-clash.brat.golden index 516b319c..05b74947 100644 --- a/brat/test/golden/imports/alias-clash.brat.golden +++ b/brat/test/golden/imports/alias-clash.brat.golden @@ -1,4 +1,4 @@ -Error in alias-clash@FC {start = Pos {line = 2, col = 15}, end = Pos {line = 2, col = 16}}: +Error in alias-clash@2:15 import lib as A (z) ^ diff --git a/brat/test/golden/imports/name-clash1.brat.golden b/brat/test/golden/imports/name-clash1.brat.golden index 2a96cef1..5566b494 100644 --- a/brat/test/golden/imports/name-clash1.brat.golden +++ b/brat/test/golden/imports/name-clash1.brat.golden @@ -1,3 +1,3 @@ -Error in test/golden/imports/lib.brat: +Error in test/golden/imports/lib.brat Name clash: [y,x] diff --git a/brat/test/golden/imports/name-clash2.brat.golden b/brat/test/golden/imports/name-clash2.brat.golden index b00f4ea8..15af1107 100644 --- a/brat/test/golden/imports/name-clash2.brat.golden +++ b/brat/test/golden/imports/name-clash2.brat.golden @@ -1,3 +1,3 @@ -Error in test/golden/imports/lib.brat: +Error in test/golden/imports/lib.brat Name clash: [lib.y] diff --git a/brat/test/golden/imports/non-existent1.brat.golden b/brat/test/golden/imports/non-existent1.brat.golden index cb8dd7bd..82597a7b 100644 --- a/brat/test/golden/imports/non-existent1.brat.golden +++ b/brat/test/golden/imports/non-existent1.brat.golden @@ -1,4 +1,4 @@ -Error in non-existent1@FC {start = Pos {line = 1, col = 16}, end = Pos {line = 1, col = 17}}: +Error in non-existent1@1:16 import lib (x, a) ^ diff --git a/brat/test/golden/imports/non-existent2.brat.golden b/brat/test/golden/imports/non-existent2.brat.golden index d05fb076..efbbfd61 100644 --- a/brat/test/golden/imports/non-existent2.brat.golden +++ b/brat/test/golden/imports/non-existent2.brat.golden @@ -1,4 +1,4 @@ -Error in non-existent2@FC {start = Pos {line = 1, col = 23}, end = Pos {line = 1, col = 24}}: +Error in non-existent2@1:23 import lib hiding (y, a) ^ diff --git a/brat/test/golden/imports/use-illegal-z.brat.golden b/brat/test/golden/imports/use-illegal-z.brat.golden index 3ae4986b..845060a9 100644 --- a/brat/test/golden/imports/use-illegal-z.brat.golden +++ b/brat/test/golden/imports/use-illegal-z.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/imports/use-illegal-z.brat@FC {start = Pos {line = 4, col = 14}, end = Pos {line = 4, col = 15}}: +Error in test/golden/imports/use-illegal-z.brat@4:14 main = x, y, z ^ diff --git a/brat/test/golden/imports/use-illegal-z2.brat.golden b/brat/test/golden/imports/use-illegal-z2.brat.golden index ea8e7997..3a0a4430 100644 --- a/brat/test/golden/imports/use-illegal-z2.brat.golden +++ b/brat/test/golden/imports/use-illegal-z2.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/imports/use-illegal-z2.brat@FC {start = Pos {line = 4, col = 22}, end = Pos {line = 4, col = 27}}: +Error in test/golden/imports/use-illegal-z2.brat@4:22 main = lib.x, lib.y, lib.z ^^^^^ diff --git a/brat/test/golden/imports/use-illegal-z3.brat.golden b/brat/test/golden/imports/use-illegal-z3.brat.golden index d7bdb736..8464621a 100644 --- a/brat/test/golden/imports/use-illegal-z3.brat.golden +++ b/brat/test/golden/imports/use-illegal-z3.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/imports/use-illegal-z3.brat@FC {start = Pos {line = 4, col = 14}, end = Pos {line = 4, col = 15}}: +Error in test/golden/imports/use-illegal-z3.brat@4:14 main = x, y, z ^ diff --git a/brat/test/golden/imports/use-illegal-z4.brat.golden b/brat/test/golden/imports/use-illegal-z4.brat.golden index b7b7e893..a240a0da 100644 --- a/brat/test/golden/imports/use-illegal-z4.brat.golden +++ b/brat/test/golden/imports/use-illegal-z4.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/imports/use-illegal-z4.brat@FC {start = Pos {line = 4, col = 22}, end = Pos {line = 4, col = 27}}: +Error in test/golden/imports/use-illegal-z4.brat@4:22 main = lib.x, lib.y, lib.z ^^^^^ diff --git a/brat/test/golden/imports/use-unqualified.brat.golden b/brat/test/golden/imports/use-unqualified.brat.golden index 37b38428..becb972e 100644 --- a/brat/test/golden/imports/use-unqualified.brat.golden +++ b/brat/test/golden/imports/use-unqualified.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/imports/use-unqualified.brat@FC {start = Pos {line = 4, col = 8}, end = Pos {line = 4, col = 9}}: +Error in test/golden/imports/use-unqualified.brat@4:8 main = x ^ diff --git a/brat/test/golden/imports/use-without-rename.brat.golden b/brat/test/golden/imports/use-without-rename.brat.golden index a688f80e..5b769fd2 100644 --- a/brat/test/golden/imports/use-without-rename.brat.golden +++ b/brat/test/golden/imports/use-without-rename.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/imports/use-without-rename.brat@FC {start = Pos {line = 4, col = 8}, end = Pos {line = 4, col = 13}}: +Error in test/golden/imports/use-without-rename.brat@4:8 main = lib.x ^^^^^ diff --git a/brat/test/golden/kernel/classical_return.brat.golden b/brat/test/golden/kernel/classical_return.brat.golden index cd162a4d..5fb6166c 100644 --- a/brat/test/golden/kernel/classical_return.brat.golden +++ b/brat/test/golden/kernel/classical_return.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/kernel/classical_return.brat@FC {start = Pos {line = 5, col = 1}, end = Pos {line = 6, col = 18}}: +Error in test/golden/kernel/classical_return.brat@5:1 -- `Bool`. We could probably catch this and make the error message nicer. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ f :: { Qubit -o Qubit, Int } diff --git a/brat/test/golden/kernel/copy.brat.golden b/brat/test/golden/kernel/copy.brat.golden index b53a285b..09807f12 100644 --- a/brat/test/golden/kernel/copy.brat.golden +++ b/brat/test/golden/kernel/copy.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/kernel/copy.brat@FC {start = Pos {line = 2, col = 8}, end = Pos {line = 2, col = 21}}: +Error in test/golden/kernel/copy.brat@2:8 copy = { q => q, q } ^^^^^^^^^^^^^ diff --git a/brat/test/golden/kernel/delete.brat.golden b/brat/test/golden/kernel/delete.brat.golden index a9ae4a5a..205b9310 100644 --- a/brat/test/golden/kernel/delete.brat.golden +++ b/brat/test/golden/kernel/delete.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/kernel/delete.brat@FC {start = Pos {line = 2, col = 13}, end = Pos {line = 2, col = 29}}: +Error in test/golden/kernel/delete.brat@2:13 deleteFst = { q0, q1 => q1 } ^^^^^^^^^^^^^^^^ diff --git a/brat/test/golden/kernel/deleteFst.brat.golden b/brat/test/golden/kernel/deleteFst.brat.golden index a9dcf31a..fdc41c85 100644 --- a/brat/test/golden/kernel/deleteFst.brat.golden +++ b/brat/test/golden/kernel/deleteFst.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/kernel/deleteFst.brat@FC {start = Pos {line = 2, col = 13}, end = Pos {line = 2, col = 29}}: +Error in test/golden/kernel/deleteFst.brat@2:13 deleteFst = { q0, q1 => q1 } ^^^^^^^^^^^^^^^^ diff --git a/brat/test/golden/kernel/deleteSnd.brat.golden b/brat/test/golden/kernel/deleteSnd.brat.golden index 7dbea77e..23cdaf94 100644 --- a/brat/test/golden/kernel/deleteSnd.brat.golden +++ b/brat/test/golden/kernel/deleteSnd.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/kernel/deleteSnd.brat@FC {start = Pos {line = 2, col = 13}, end = Pos {line = 2, col = 29}}: +Error in test/golden/kernel/deleteSnd.brat@2:13 deleteSnd = { q0, q1 => q0 } ^^^^^^^^^^^^^^^^ diff --git a/brat/test/golden/kernel/duplicate_abs.brat.golden b/brat/test/golden/kernel/duplicate_abs.brat.golden index 0e79a8db..b42b2b6e 100644 --- a/brat/test/golden/kernel/duplicate_abs.brat.golden +++ b/brat/test/golden/kernel/duplicate_abs.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/kernel/duplicate_abs.brat@FC {start = Pos {line = 5, col = 8}, end = Pos {line = 5, col = 12}}: +Error in test/golden/kernel/duplicate_abs.brat@5:8 h2 = { p, p => f(p) } ^^^^ diff --git a/brat/test/golden/kernel/kernel_application.brat.golden b/brat/test/golden/kernel/kernel_application.brat.golden index 5301c43c..b1e3188d 100644 --- a/brat/test/golden/kernel/kernel_application.brat.golden +++ b/brat/test/golden/kernel/kernel_application.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/kernel/kernel_application.brat@FC {start = Pos {line = 16, col = 17}, end = Pos {line = 16, col = 28}}: +Error in test/golden/kernel/kernel_application.brat@16:17 rotate = { q => maybeRotate(true) } ^^^^^^^^^^^ diff --git a/brat/test/golden/kernel/let_del.brat.golden b/brat/test/golden/kernel/let_del.brat.golden index fde5deb5..bb0bce40 100644 --- a/brat/test/golden/kernel/let_del.brat.golden +++ b/brat/test/golden/kernel/let_del.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/kernel/let_del.brat@FC {start = Pos {line = 4, col = 12}, end = Pos {line = 4, col = 33}}: +Error in test/golden/kernel/let_del.brat@4:12 f = { q => let q' = X(q) in true } ^^^^^^^^^^^^^^^^^^^^^ diff --git a/brat/test/golden/kernel/typed_th.brat.golden b/brat/test/golden/kernel/typed_th.brat.golden index 67114bc9..4b1fc3fd 100644 --- a/brat/test/golden/kernel/typed_th.brat.golden +++ b/brat/test/golden/kernel/typed_th.brat.golden @@ -1,4 +1,4 @@ -Error in test/golden/kernel/typed_th.brat@FC {start = Pos {line = 5, col = 17}, end = Pos {line = 5, col = 24}}: +Error in test/golden/kernel/typed_th.brat@5:17 id2 = { let f = {id;id} in q,q' => f(q),f(q') } ^^^^^^^