Skip to content

Commit 82796b3

Browse files
andrevidelagallais
authored andcommitted
print full names in linear checking
1 parent 23bb381 commit 82796b3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Core/LinearCheck.idr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,12 @@ mutual
346346
do Just _ <- lookupCtxtExact n (gamma defs)
347347
| _ => undefinedName fc n
348348
tfty <- getTerm gfty
349-
throw (GenericMsg fc ("Linearity checking failed on " ++ show f' ++
350-
" (" ++ show tfty ++ " not a function type)"))
349+
throw (GenericMsg fc ("Linearity checking failed on " ++ show !(toFullNames f') ++
350+
" (" ++ show !(toFullNames tfty) ++ " not a function type)"))
351351

352352
_ => do tfty <- getTerm gfty
353-
throw (GenericMsg fc ("Linearity checking failed on " ++ show f' ++
354-
" (" ++ show tfty ++ " not a function type)"))
353+
throw (GenericMsg fc ("Linearity checking failed on " ++ show !(toFullNames f') ++
354+
" (" ++ show !(toFullNames tfty) ++ " not a function type)"))
355355

356356
lcheck rig erase env (As fc s as pat)
357357
= do (as', _, _) <- lcheck rig erase env as
@@ -671,7 +671,7 @@ mutual
671671
empty <- clearDefs defs
672672
ty <- quote empty env nty
673673
throw (GenericMsg fc ("Linearity checking failed on metavar "
674-
++ show n ++ " (" ++ show ty
674+
++ show !(toFullNames n) ++ " (" ++ show !(toFullNames ty)
675675
++ " not a function type)"))
676676
lcheckMeta rig erase env fc n idx [] chk nty
677677
= do defs <- get Ctxt

0 commit comments

Comments
 (0)