on master help sign in
Don't include '=' for RHS span
f743272Jason Felice
src/Idris/Parser.hs+15−14
@@ -1054,15 +1054,15 @@ RHS ::= '=' Expr
1054RHSName ::= '{' FnName '}';
1054RHSName ::= '{' FnName '}';
1055@
1055@
1056-}
1056-}
1057−rhs :: SyntaxInfo -> Name -> IdrisParser PTerm
1057+rhs :: SyntaxInfo -> Name -> IdrisParser (PTerm, FC)
1058rhs syn n = do lchar '='
1058rhs syn n = do lchar '='
1059 indentGt
1059 indentGt
1060− expr syn
1060+ withExtent $ expr syn
1061 <|> do symbol "?=";
1061 <|> do symbol "?=";
1062 (name, fc) <- withExtent $ P.option n' (symbol "{" *> fnName <* symbol "}")
1062 (name, fc) <- withExtent $ P.option n' (symbol "{" *> fnName <* symbol "}")
1063 r <- expr syn
1063 r <- expr syn
1064− return (addLet fc name r)
1064+ return (addLet fc name r, fc)
1065− <|> impossible
1065+ <|> withExtent impossible
1066 <?> "function right hand side"
1066 <?> "function right hand side"
1067 where mkN :: Name -> Name
1067 where mkN :: Name -> Name
1068 mkN (UN x) = if (tnull x || not (isAlpha (thead x)))
1068 mkN (UN x) = if (tnull x || not (isAlpha (thead x)))
@@ -1104,33 +1104,34 @@ WhereOrTerminator ::= WhereBlock | Terminator;
1104clause :: SyntaxInfo -> IdrisParser PClause
1104clause :: SyntaxInfo -> IdrisParser PClause
1105clause syn
1105clause syn
1106 -- unnamed with or function clause (inside a with)
1106 -- unnamed with or function clause (inside a with)
1107− = appExtent (do
1108− wargs <- P.try (do pushIndent; some (wExpr syn))
1107+ = do wargs <- P.try (do pushIndent; some (wExpr syn))
1109 ist <- get
1108 ist <- get
1110 n <- case lastParse ist of
1109 n <- case lastParse ist of
1111 Just t -> return t
1110 Just t -> return t
1112 Nothing -> fail "Invalid clause"
1111 Nothing -> fail "Invalid clause"
1113− (do r <- rhs syn n
1112+ (do (r, fc) <- rhs syn n
1114 let wsyn = syn { syn_namespace = [], syn_toplevel = False }
1113 let wsyn = syn { syn_namespace = [], syn_toplevel = False }
1115 (wheres, nmap) <- whereBlock n wsyn <* popIndent
1114 (wheres, nmap) <- whereBlock n wsyn <* popIndent
1116 <|> ([], []) <$ terminator
1115 <|> ([], []) <$ terminator
1117− return $ \fc -> PClauseR fc wargs r wheres) <|> (do
1116+ return $ PClauseR fc wargs r wheres) <|> (do
1118 popIndent
1117 popIndent
1118+ ((wval, pn), fc) <- withExtent $ do
1119− keyword "with"
1119+ keyword "with"
1120− wval <- simpleExpr syn
1120+ wval <- bracketed syn
1121− pn <- optProof
1121+ pn <- optProof
1122+ return (wval, pn)
1122 openBlock
1123 openBlock
1123 ds <- some $ fnDecl syn
1124 ds <- some $ fnDecl syn
1124 let withs = concat ds
1125 let withs = concat ds
1125 closeBlock
1126 closeBlock
1126− return $ \fc -> PWithR fc wargs wval pn withs))
1127+ return $ PWithR fc wargs wval pn withs)
1127 -- <==
1128 -- <==
1128 <|> do ty <- P.try (do pushIndent
1129 <|> do ty <- P.try (do pushIndent
1129 ty <- simpleExpr syn
1130 ty <- simpleExpr syn
1130 symbol "<=="
1131 symbol "<=="
1131 return ty)
1132 return ty)
1132 (n, fc) <- withExtent (expandNS syn <$> fnName)
1133 (n, fc) <- withExtent (expandNS syn <$> fnName)
1133− r <- rhs syn n
1134+ (r, _) <- rhs syn n
1134 let wsyn = syn { syn_namespace = [] }
1135 let wsyn = syn { syn_namespace = [] }
1135 (wheres, nmap) <- whereBlock n wsyn <* popIndent
1136 (wheres, nmap) <- whereBlock n wsyn <* popIndent
1136 <|> ([], []) <$ terminator
1137 <|> ([], []) <$ terminator
@@ -1145,7 +1146,7 @@ clause syn
1145 <|> do pushIndent
1146 <|> do pushIndent
1146 (n, nfc, capp, wargs) <- lhs
1147 (n, nfc, capp, wargs) <- lhs
1147 modify $ \ist -> ist { lastParse = Just n }
1148 modify $ \ist -> ist { lastParse = Just n }
1148− (do (rs, fc) <- withExtent (rhs syn n)
1149+ (do (rs, fc) <- rhs syn n
1149 let wsyn = syn { syn_namespace = [] }
1150 let wsyn = syn { syn_namespace = [] }
1150 (wheres, nmap) <- whereBlock n wsyn <* popIndent
1151 (wheres, nmap) <- whereBlock n wsyn <* popIndent
1151 <|> ([], []) <$ terminator
1152 <|> ([], []) <$ terminator
test/basic009/expected+2−2
@@ -6,10 +6,10 @@ Faulty.idr:6:9-11:
6num is bound as an implicit
6num is bound as an implicit
7 Did you mean to refer to A.num?
7 Did you mean to refer to A.num?
8
8
9−Faulty.idr:7:7-12:
9+Faulty.idr:7:9-12:
10 |
10 |
117 | fault = Refl
117 | fault = Refl
12− | ~~~~~~
12+ | ~~~~
13When checking right hand side of fault with expected type
13When checking right hand side of fault with expected type
14 num = 0
14 num = 0
15
15
test/basic018/expected+2−2
@@ -12,10 +12,10 @@ basic018.idr:12:8-12:
12thing is bound as an implicit
12thing is bound as an implicit
13 Did you mean to refer to Main.thing?
13 Did you mean to refer to Main.thing?
14
14
15−basic018.idr:13:6-11:
15+basic018.idr:13:8-11:
16 |
16 |
1713 | test = Refl
1713 | test = Refl
18− | ~~~~~~
18+ | ~~~~
19When checking right hand side of test with expected type
19When checking right hand side of test with expected type
20 thing = S 41
20 thing = S 41
21
21
test/directives001/expected+8−8
@@ -12,31 +12,31 @@ directives001.idr:14:7:
12Use of deprecated name directives001.Foo
12Use of deprecated name directives001.Foo
13To be replaced with `Bar`.
13To be replaced with `Bar`.
14
14
15−directives001.idr:15:7-13:
15+directives001.idr:15:9-13:
16 |
16 |
1715 | mkFoo = MkFoo
1715 | mkFoo = MkFoo
18− | ~~~~~~~
18+ | ~~~~~
19Use of deprecated name directives001.Foo
19Use of deprecated name directives001.Foo
20To be replaced with `Bar`.
20To be replaced with `Bar`.
21
21
22−directives001.idr:15:7-13:
22+directives001.idr:15:9-13:
23 |
23 |
2415 | mkFoo = MkFoo
2415 | mkFoo = MkFoo
25− | ~~~~~~~
25+ | ~~~~~
26Use of deprecated name directives001.Foo
26Use of deprecated name directives001.Foo
27To be replaced with `Bar`.
27To be replaced with `Bar`.
28
28
29−directives001.idr:26:8-28:28:
29+directives001.idr:26:10-28:28:
30 |
30 |
3126 | main = do
3126 | main = do
32− | ~~~~ ...
32+ | ~~ ...
33Use of a fragile construct directives001.mkBar
33Use of a fragile construct directives001.mkBar
34How `Bar`s are to be created is still being discussed, `mkBar` is subject to change.
34How `Bar`s are to be created is still being discussed, `mkBar` is subject to change.
35
35
36−directives001.idr:26:8-28:28:
36+directives001.idr:26:10-28:28:
37 |
37 |
3826 | main = do
3826 | main = do
39− | ~~~~ ...
39+ | ~~ ...
40Use of a fragile construct directives001.mkBar
40Use of a fragile construct directives001.mkBar
41How `Bar`s are to be created is still being discussed, `mkBar` is subject to change.
41How `Bar`s are to be created is still being discussed, `mkBar` is subject to change.
42
42
test/error003/expected+2−2
@@ -1,7 +1,7 @@
1−ErrorReflection.idr:68:5-20:
1+ErrorReflection.idr:68:7-20:
2 |
2 |
368 | bad = Lam (Var Here)
368 | bad = Lam (Var Here)
4− | ~~~~~~~~~~~~~~~~
4+ | ~~~~~~~~~~~~~~
5When checking right hand side of bad with expected type
5When checking right hand side of bad with expected type
6 Tm [] TUnit
6 Tm [] TUnit
7
7
test/layout001/expected+2−2
@@ -58,10 +58,10 @@ Wrong indention: should be greater than context indentation
58 | ^
58 | ^
59Wrong indention: should be greater than context indentation
59Wrong indention: should be greater than context indentation
60
60
61−mplus1.idr:13:31-17:49:
61+mplus1.idr:13:34-17:49:
62 |
62 |
6313 | term = do f <- factor
6313 | term = do f <- factor
64− | ~~~~~~~~~~~~~~~~~ ...
64+ | ~~~~~~~~~~~~~~ ...
65When checking right hand side of term with expected type
65When checking right hand side of term with expected type
66 Maybe Int
66 Maybe Int
67
67
test/meta002/expected+4−4
@@ -5,19 +5,19 @@ DataDef.idr:74:1-8:
5While running an elaboration script, the following error occurred:
5While running an elaboration script, the following error occurred:
6Prelude.Either.Either is already defined as a datatype.
6Prelude.Either.Either is already defined as a datatype.
7
7
8−Tacs.idr:299:15-300:78:
8+Tacs.idr:299:17-300:78:
9 |
9 |
10299 | testElab3 = %runElab (elaborateSTLC (App (Lam "x" (App (Var 0) (Var 0)))
10299 | testElab3 = %runElab (elaborateSTLC (App (Lam "x" (App (Var 0) (Var 0)))
11− | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
11+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
12When checking right hand side of testElab3 with expected type
12When checking right hand side of testElab3 with expected type
13 DPair Ty (Tm [])
13 DPair Ty (Tm [])
14
14
15Unifying ty and ARR ty t would lead to infinite value
15Unifying ty and ARR ty t would lead to infinite value
16
16
17−AgdaStyleReflection.idr:315:5-20:
17+AgdaStyleReflection.idr:315:7-20:
18 |
18 |
19315 | baz = tactic trivial
19315 | baz = tactic trivial
20− | ~~~~~~~~~~~~~~~~
20+ | ~~~~~~~~~~~~~~
21When checking right hand side of baz with expected type
21When checking right hand side of baz with expected type
22 (Nat, Void)
22 (Nat, Void)
23
23
test/proof007/expected+2−2
@@ -1,7 +1,7 @@
1−DefaultArgUnknownName.idr:9:6-23:
1+DefaultArgUnknownName.idr:9:8-23:
2 |
2 |
39 | test = funWithBadDefArg
39 | test = funWithBadDefArg
4− | ~~~~~~~~~~~~~~~~~~
4+ | ~~~~~~~~~~~~~~~~
5When checking right hand side of test with expected type
5When checking right hand side of test with expected type
6 ()
6 ()
7
7
test/proof011/expected+4−4
@@ -1,7 +1,7 @@
1−proof011.idr:20:5-21:18:
1+proof011.idr:20:7-21:18:
2 |
2 |
320 | = rewrite vassoc xs ys xs using vreplace in
320 | = rewrite vassoc xs ys xs using vreplace in
4− | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
4+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
5When checking right hand side of vassoc' with expected type
5When checking right hand side of vassoc' with expected type
6 (x :: xs) ++ ys ++ zs = ((x :: xs) ++ ys) ++ zs
6 (x :: xs) ++ ys ++ zs = ((x :: xs) ++ ys) ++ zs
7
7
@@ -12,10 +12,10 @@ rewriting xs ++ ys ++ xs to (xs ++ ys) ++ xs did not change type x ::
12 (xs ++ ys) ++
12 (xs ++ ys) ++
13 zs
13 zs
14
14
15−proof011a.idr:14:5-37:
15+proof011a.idr:14:7-37:
16 |
16 |
1714 | = rewrite vassoc xs ys xs in Refl
1714 | = rewrite vassoc xs ys xs in Refl
18− | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19When checking right hand side of vassoc' with expected type
19When checking right hand side of vassoc' with expected type
20 (x :: xs) ++ ys ++ zs = ((x :: xs) ++ ys) ++ zs
20 (x :: xs) ++ ys ++ zs = ((x :: xs) ++ ys) ++ zs
21
21
test/quasiquote003/expected+2−2
@@ -1,7 +1,7 @@
1−NoInfer.idr:11:5-11:
1+NoInfer.idr:11:7-11:
2 |
2 |
311 | zzz = `(FZ)
311 | zzz = `(FZ)
4− | ~~~~~~~
4+ | ~~~~~
5When checking right hand side of zzz with expected type
5When checking right hand side of zzz with expected type
6 TT
6 TT
7
7
test/quasiquote004/expected+2−2
@@ -16,10 +16,10 @@ Quasiquote004.idr:50:27-31:
16 | ~~~~~
16 | ~~~~~
17This style of tactic proof is deprecated. See %runElab for the replacement.
17This style of tactic proof is deprecated. See %runElab for the replacement.
18
18
19−Quasiquote004.idr:50:25-51:18:
19+Quasiquote004.idr:50:27-51:18:
20 |
20 |
2150 | Quasiquote004.getMeNat' = proof
2150 | Quasiquote004.getMeNat' = proof
22− | ~~~~~~~ ...
22+ | ~~~~~ ...
23When checking right hand side of Quasiquote004.getMeNat' with expected type
23When checking right hand side of Quasiquote004.getMeNat' with expected type
24 String
24 String
25
25
test/quasiquote006/expected+6−6
@@ -1,26 +1,26 @@
1−quasiquote006.idr:9:3-10:
1+quasiquote006.idr:9:5-10:
2 |
2 |
39 | b = `{Nil}
39 | b = `{Nil}
4− | ~~~~~~~~
4+ | ~~~~~~
5When checking right hand side of b with expected type
5When checking right hand side of b with expected type
6 TTName
6 TTName
7
7
8Can't disambiguate name: ForeignEnv.Nil,
8Can't disambiguate name: ForeignEnv.Nil,
9 Prelude.List.Nil
9 Prelude.List.Nil
10
10
11−quasiquote006.idr:12:3-17:
11+quasiquote006.idr:12:5-17:
12 |
12 |
1312 | c = `{alsdkjflkj}
1312 | c = `{alsdkjflkj}
14− | ~~~~~~~~~~~~~~~
14+ | ~~~~~~~~~~~~~
15When checking right hand side of c with expected type
15When checking right hand side of c with expected type
16 TTName
16 TTName
17
17
18No such variable alsdkjflkj
18No such variable alsdkjflkj
19
19
20−quasiquote006.idr:15:3-11:
20+quasiquote006.idr:15:5-11:
21 |
21 |
2215 | d = `{(::)}
2215 | d = `{(::)}
23− | ~~~~~~~~~
23+ | ~~~~~~~
24When checking right hand side of d with expected type
24When checking right hand side of d with expected type
25 TTName
25 TTName
26
26
test/regression002/expected+8−8
@@ -92,10 +92,10 @@ reg018d.idr:8:1-39:
92 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
93Main.pull is not total as there are missing cases
93Main.pull is not total as there are missing cases
94
94
95−reg023.idr:7:5-7:
95+reg023.idr:7:7:
96 |
96 |
977 | bad = Z
977 | bad = Z
98− | ~~~
98+ | ^
99When checking right hand side of bad with expected type
99When checking right hand side of bad with expected type
100 f Nat
100 f Nat
101
101
@@ -136,10 +136,10 @@ reg034.idr:9:1-14:
136When checking left hand side of foo:
136When checking left hand side of foo:
137Can't match on foo f x x Refl
137Can't match on foo f x x Refl
138
138
139−reg035b.idr:8:12-38:
139+reg035b.idr:8:14-38:
140 |
140 |
1418 | fins Z = ([] ** (finZEmpty {a=_}))
1418 | fins Z = ([] ** (finZEmpty {a=_}))
142− | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
142+ | ~~~~~~~~~~~~~~~~~~~~~~~~~
143No such variable __pi_arg
143No such variable __pi_arg
144
144
145reg044.idr:4:6-10:
145reg044.idr:4:6-10:
@@ -148,10 +148,10 @@ reg044.idr:4:6-10:
148 | ~~~~~
148 | ~~~~~
149This style of tactic proof is deprecated. See %runElab for the replacement.
149This style of tactic proof is deprecated. See %runElab for the replacement.
150
150
151−reg044.idr:4:4-6:13:
151+reg044.idr:4:6-6:13:
152 |
152 |
1534 | pf = proof
1534 | pf = proof
154− | ~~~~~~~ ...
154+ | ~~~~~ ...
155When checking right hand side of Main.pf with expected type
155When checking right hand side of Main.pf with expected type
156 (b : Nat) -> (a : Nat) -> (S a = S b) -> a = b
156 (b : Nat) -> (a : Nat) -> (S a = S b) -> a = b
157
157
@@ -173,10 +173,10 @@ reg049.idr:2:11-14:
173When checking constructor Main.Bogus:
173When checking constructor Main.Bogus:
174Void is not Main.Foo
174Void is not Main.Foo
175
175
176−reg049.idr:5:6-12:
176+reg049.idr:5:8-12:
177 |
177 |
1785 | uhOh = Bogus
1785 | uhOh = Bogus
179− | ~~~~~~~
179+ | ~~~~~
180When checking right hand side of uhOh with expected type
180When checking right hand side of uhOh with expected type
181 Void
181 Void
182
182
test/sourceLocation001/expected+2−2
@@ -25,9 +25,9 @@ This style of tactic proof is deprecated. See %runElab for the replacement.
25Testing using definition
25Testing using definition
26FileLoc "SourceLoc.idr" (17, 11) (17, 16)
26FileLoc "SourceLoc.idr" (17, 11) (17, 16)
27Testing using inline tactics
27Testing using inline tactics
28−FileLoc "SourceLoc.idr" (21, 17) (21, 38)
28+FileLoc "SourceLoc.idr" (21, 19) (21, 38)
29Testing using metavariable with later definition
29Testing using metavariable with later definition
30−FileLoc "SourceLoc.idr" (99, 16) (100, 16)
30+FileLoc "SourceLoc.idr" (99, 18) (100, 16)
31-----------------------
31-----------------------
32Success!
32Success!
33Error at FileLoc "SourceLoc.idr" (73, 23) (73, 25)
33Error at FileLoc "SourceLoc.idr" (73, 23) (73, 25)
test/totality009/expected+4−4
@@ -22,10 +22,10 @@ TestLambdaPossible.idr:12:1-13:40:
22 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
22 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
23Warning - TestLambdaPossible.wrongPossible' is possibly not total due to: TestLambdaPossible.case block in wrongPossible' at TestLambdaPossible.idr:12:25
23Warning - TestLambdaPossible.wrongPossible' is possibly not total due to: TestLambdaPossible.case block in wrongPossible' at TestLambdaPossible.idr:12:25
24
24
25−TestLambdaPossible.idr:9:15-35:
25+TestLambdaPossible.idr:9:17-35:
26 |
26 |
279 | wrongPossible = (\Flase impossible)
279 | wrongPossible = (\Flase impossible)
28− | ~~~~~~~~~~~~~~~~~~~~~
28+ | ~~~~~~~~~~~~~~~~~~~
29Warning - TestLambdaPossible.case block in wrongPossible at TestLambdaPossible.idr:9:25-34 is not total as there are missing cases
29Warning - TestLambdaPossible.case block in wrongPossible at TestLambdaPossible.idr:9:25-34 is not total as there are missing cases
30
30
31TestLambdaPossible.idr:9:1-35:
31TestLambdaPossible.idr:9:1-35:
@@ -34,10 +34,10 @@ TestLambdaPossible.idr:9:1-35:
34 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35Warning - TestLambdaPossible.wrongPossible is possibly not total due to: TestLambdaPossible.case block in wrongPossible at TestLambdaPossible.idr:9:25-34
35Warning - TestLambdaPossible.wrongPossible is possibly not total due to: TestLambdaPossible.case block in wrongPossible at TestLambdaPossible.idr:9:25-34
36
36
37−TestLambdaPossible.idr:12:18-13:40:
37+TestLambdaPossible.idr:12:20-13:40:
38 |
38 |
3912 | wrongPossible' x = case x of
3912 | wrongPossible' x = case x of
40− | ~~~~~~~~~~~ ...
40+ | ~~~~~~~~~ ...
41Warning - TestLambdaPossible.case block in wrongPossible' at TestLambdaPossible.idr:12:25 is not total as there are missing cases
41Warning - TestLambdaPossible.case block in wrongPossible' at TestLambdaPossible.idr:12:25 is not total as there are missing cases
42
42
43TestLambdaPossible.idr:12:1-13:40:
43TestLambdaPossible.idr:12:1-13:40:
test/totality014/expected+1−1
@@ -9,5 +9,5 @@ Universe inconsistency.
9 Involved constraints:
9 Involved constraints:
10 ConstraintFC {uconstraint = ./totality014.idr.w < ./totality014.idr.u, ufc = totality014.idr:1:6-9}
10 ConstraintFC {uconstraint = ./totality014.idr.w < ./totality014.idr.u, ufc = totality014.idr:1:6-9}
11 ConstraintFC {uconstraint = ./totality014.idr.w < ./totality014.idr.u, ufc = totality014.idr:1:6-9}
11 ConstraintFC {uconstraint = ./totality014.idr.w < ./totality014.idr.u, ufc = totality014.idr:1:6-9}
12− ConstraintFC {uconstraint = ./totality014.idr.u <= ./totality014.idr.w, ufc = totality014.idr:6:27-29}
12+ ConstraintFC {uconstraint = ./totality014.idr.u <= ./totality014.idr.w, ufc = totality014.idr:6:29}
13
13
test/tutorial006/expected+2−2
@@ -17,10 +17,10 @@ When checking argument xs to constructor Data.Vect.:::
17 and
17 and
18 plus len m
18 plus len m
19
19
20−tutorial006b.idr:10:37-50:
20+tutorial006b.idr:10:39-50:
21 |
21 |
2210 | parity (S (S (j + j))) | Even = Even {n=S j}
2210 | parity (S (S (j + j))) | Even = Even {n=S j}
23− | ~~~~~~~~~~~~~~
23+ | ~~~~~~~~~~~~
24When checking right hand side of with block in Main.parity with expected type
24When checking right hand side of with block in Main.parity with expected type
25 Parity (S (S (j + j)))
25 Parity (S (S (j + j)))
26
26
test/unique004/expected+18−18
@@ -1,46 +1,46 @@
1−unique001a.idr:35:14-43:50:
1+unique001a.idr:35:16-43:50:
2 |
2 |
335 | showStuff xs = do
335 | showStuff xs = do
4− | ~~~~ ...
4+ | ~~ ...
5Type mismatch between
5Type mismatch between
6 Int -> String
6 Int -> String
7and
7and
8 UniqueType (Int -> String)
8 UniqueType (Int -> String)
9
9
10−unique001a.idr:46:15-54:28:
10+unique001a.idr:46:17-54:28:
11 |
11 |
1246 | showStuff' xs = do
1246 | showStuff' xs = do
13− | ~~~~ ...
13+ | ~~ ...
14Type mismatch between
14Type mismatch between
15 Int -> String
15 Int -> String
16and
16and
17 UniqueType (Int -> String)
17 UniqueType (Int -> String)
18
18
19−unique001a.idr:57:15-62:33:
19+unique001a.idr:57:17-62:33:
20 |
20 |
2157 | showThings xs = do
2157 | showThings xs = do
22− | ~~~~ ...
22+ | ~~ ...
23Type mismatch between
23Type mismatch between
24 UniqueType (Int -> String)
24 UniqueType (Int -> String)
25and
25and
26 Int -> String
26 Int -> String
27
27
28−unique001b.idr:18:17-42:
28+unique001b.idr:18:19-42:
29 |
29 |
3018 | showU (x :: xs) = show x ++ "," ++ free xs
3018 | showU (x :: xs) = show x ++ "," ++ free xs
31− | ~~~~~~~~~~~~~~~~~~~~~~~~~~
31+ | ~~~~~~~~~~~~~~~~~~~~~~~~
32Borrowed name xs must not be used on RHS
32Borrowed name xs must not be used on RHS
33
33
34−unique001c.idr:47:12-62:
34+unique001c.idr:47:14-62:
35 |
35 |
3647 | ndup {a} x = (\f : Int -> a => MkUPair (f 0) (f 1)) (uconst x)
3647 | ndup {a} x = (\f : Int -> a => MkUPair (f 0) (f 1)) (uconst x)
37− | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38Unique name f is used more than once
38Unique name f is used more than once
39
39
40−unique001d.idr:4:16-18:
40+unique001d.idr:4:18:
41 |
41 |
424 | steal (Read x) = x
424 | steal (Read x) = x
43− | ~~~
43+ | ^
44Borrowed name x must not be used on RHS
44Borrowed name x must not be used on RHS
45
45
46unique001e.idr:4:12-40:
46unique001e.idr:4:12-40:
@@ -49,25 +49,25 @@ unique001e.idr:4:12-40:
49 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
49 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50Constructor Main.Nil has a UniqueType, but the data type does not
50Constructor Main.Nil has a UniqueType, but the data type does not
51
51
52−unique002.idr:17:8-20:19:
52+unique002.idr:17:10-20:19:
53 |
53 |
5417 | foo xs = do -- let f = \x : Int => showU xs
5417 | foo xs = do -- let f = \x : Int => showU xs
55− | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
55+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
56Unique name xs is used more than once
56Unique name xs is used more than once
57
57
58−unique002a.idr:17:8-20:19:
58+unique002a.idr:17:10-20:19:
59 |
59 |
6017 | foo xs = do let f = \x : Int => showU xs
6017 | foo xs = do let f = \x : Int => showU xs
61− | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
61+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
62Type mismatch between
62Type mismatch between
63 Int -> String
63 Int -> String
64and
64and
65 UniqueType (Int -> String)
65 UniqueType (Int -> String)
66
66
67−unique003.idr:20:8-24:19:
67+unique003.idr:20:10-24:19:
68 |
68 |
6920 | foo xs = do let f = \x : Int => showU xs -- can't build this in unique context
6920 | foo xs = do let f = \x : Int => showU xs -- can't build this in unique context
70− | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
70+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
71Type mismatch between
71Type mismatch between
72 Int -> String
72 Int -> String
73and
73and
test/universes001/expected+4−4
@@ -1,14 +1,14 @@
1−universes001.idr:7:5-21:
1+universes001.idr:7:7-21:
2 |
2 |
37 | foo = Const (Const 0)
37 | foo = Const (Const 0)
4− | ~~~~~~~~~~~~~~~~~
4+ | ~~~~~~~~~~~~~~~
5Universe inconsistency.
5Universe inconsistency.
6 Working on: ./universes001.idr.x
6 Working on: ./universes001.idr.x
7 Old domain: (5,5)
7 Old domain: (5,5)
8 New domain: (5,4)
8 New domain: (5,4)
9 Involved constraints:
9 Involved constraints:
10− ConstraintFC {uconstraint = ./universes001.idr.x <= ./universes001.idr.z, ufc = universes001.idr:7:5-21}
10+ ConstraintFC {uconstraint = ./universes001.idr.x <= ./universes001.idr.z, ufc = universes001.idr:7:7-21}
11 ConstraintFC {uconstraint = ./universes001.idr.x < ./universes001.idr.y, ufc = universes001.idr:1:6-8}
11 ConstraintFC {uconstraint = ./universes001.idr.x < ./universes001.idr.y, ufc = universes001.idr:1:6-8}
12 ConstraintFC {uconstraint = ./universes001.idr.z < ./universes001.idr.x, ufc = universes001.idr:1:6-8}
12 ConstraintFC {uconstraint = ./universes001.idr.z < ./universes001.idr.x, ufc = universes001.idr:1:6-8}
13− ConstraintFC {uconstraint = ./universes001.idr.x <= ./universes001.idr.z, ufc = universes001.idr:7:5-21}
13+ ConstraintFC {uconstraint = ./universes001.idr.x <= ./universes001.idr.z, ufc = universes001.idr:7:7-21}
14
14
test/universes002/expected+4−4
@@ -1,14 +1,14 @@
1−universes002.idr:45:9-48:
1+universes002.idr:45:11-48:
2 |
2 |
345 | russell = lemma (MkMPair (MkMPair R lemma) REFL)
345 | russell = lemma (MkMPair (MkMPair R lemma) REFL)
4− | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5Universe inconsistency.
5Universe inconsistency.
6 Working on: ./universes002.idr.b1
6 Working on: ./universes002.idr.b1
7 Old domain: (5,5)
7 Old domain: (5,5)
8 New domain: (5,4)
8 New domain: (5,4)
9 Involved constraints:
9 Involved constraints:
10− ConstraintFC {uconstraint = ./universes002.idr.b1 <= ./universes002.idr.e7, ufc = universes002.idr:45:9-48}
10+ ConstraintFC {uconstraint = ./universes002.idr.b1 <= ./universes002.idr.e7, ufc = universes002.idr:45:11-48}
11 ConstraintFC {uconstraint = ./universes002.idr.b1 < ./universes002.idr.c1, ufc = universes002.idr:3:6-10}
11 ConstraintFC {uconstraint = ./universes002.idr.b1 < ./universes002.idr.c1, ufc = universes002.idr:3:6-10}
12− ConstraintFC {uconstraint = ./universes002.idr.b1 <= ./universes002.idr.e7, ufc = universes002.idr:45:9-48}
12+ ConstraintFC {uconstraint = ./universes002.idr.b1 <= ./universes002.idr.e7, ufc = universes002.idr:45:11-48}
13 ConstraintFC {uconstraint = ./universes002.idr.d1 <= ./universes002.idr.b1, ufc = universes002.idr:3:6-10}
13 ConstraintFC {uconstraint = ./universes002.idr.d1 <= ./universes002.idr.b1, ufc = universes002.idr:3:6-10}
14
14