on master help sign in
Fixed error reflection bug after change of sourcelocation definition
commitd815ecc6baba715d60e51459bb802805ecb0dc89 authorAhmad Salim Al-Sibahi <asal@itu.dk> dateMon 10 Mar 2014, 16:07 (13 years ago) parent7437ebe
2 files changed+4−4
test/error003/ErrorReflection.idr+3−3 test/error003/expected+1−1
test/error003/ErrorReflection.idr+3−3
@@ -59,11 +59,11 @@ dslerr (CantUnify _ tm1 tm2 _ _ _) = do tm1' <- getTmTy tm1
5959 ty1 <- reifyTy tm1'
6060 ty2 <- reifyTy tm2'
6161 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
6363 return [ TextPart "In file"
6464 , TextPart f
65− , TextPart "line", TextPart (cast l)
66− , TextPart "column", TextPart (cast c)
65+ , TextPart "start", TextPart (show s)
66+ , TextPart "end", TextPart (show e)
6767 , SubReport err']
6868dslerr (Elaborating s n err) = do err' <- dslerr err
6969 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)
22 When elaborating right hand side of Main.bad :
33 DSL type error: (t'(504) => t'(504)) doesn't match ()