on master help sign in
Fixed error reflection bug after change of sourcelocation definition
d815eccAhmad Salim Al-Sibahi
test/error003/ErrorReflection.idr+3−3
@@ -59,11 +59,11 @@ dslerr (CantUnify _ tm1 tm2 _ _ _) = do tm1' <- getTmTy tm1
59 ty1 <- reifyTy tm1'
59 ty1 <- reifyTy tm1'
60 ty2 <- reifyTy tm2'
60 ty2 <- reifyTy tm2'
61 return [TextPart $ "DSL type error: " ++ (show ty1) ++ " doesn't match " ++(show ty2)]
61 return [TextPart $ "DSL type error: " ++ (show ty1) ++ " doesn't match " ++(show ty2)]
62−dslerr (At (FileLoc f l c) err) = do err' <- dslerr err
62+dslerr (At (FileLoc f s e) err) = do err' <- dslerr err
63 return [ TextPart "In file"
63 return [ TextPart "In file"
64 , TextPart f
64 , TextPart f
65− , TextPart "line", TextPart (cast l)
65+ , TextPart "start", TextPart (show s)
66− , TextPart "column", TextPart (cast c)
66+ , TextPart "end", TextPart (show e)
67 , SubReport err']
67 , SubReport err']
68dslerr (Elaborating s n err) = do err' <- dslerr err
68dslerr (Elaborating s n err) = do err' <- dslerr err
69 return ([ TextPart $ "When elaborating " ++ s
69 return ([ TextPart $ "When elaborating " ++ s
test/error003/expected+1−1
@@ -1,3 +1,3 @@
1−In file ErrorReflection.idr line 78 column 5
1+In file ErrorReflection.idr start (78, 5) end (78, 5)
2 When elaborating right hand side of Main.bad :
2 When elaborating right hand side of Main.bad :
3 DSL type error: (t'(504) => t'(504)) doesn't match ()
3 DSL type error: (t'(504) => t'(504)) doesn't match ()