You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the mailing list @david-christiansen suggested the creation of a deprecation annotation to aide in managing changes to Idris projects. Such an annotation could look like:
%deprecatedPACKAGEVERSIONCOMMENT
where PACKAGE and VERSION are arbitrary strings with no spaces, or quoted strings, and COMMENT uses the same syntax as documentation (that is, Markdown as supported by Cheapskate).
Then, unless %deprecation off has been specified or Idris has been run with --no-deprecation-warnings, it would spit out a message like
<FILE>:<LINE NUM>:<COLUMN NUM>
When elaborating right hand side of <FNAME>:
<DEPRECATED FNAME> is deprecated since version <VERSION> of <PACKAGE>. <COMMENT>
and each deprecation warning would be issued at most once per module to avoid having completely insane noise from something like the (Fin 10) 8.
For example, renaming an function fZ to FZ can be supported with the following annotation:
%deprecatedIdris0.9.15Use`FZ` instead.fZ:Fin n ->Fin (S n)
fZ =FZ
with the following error message if fZ is used in a function foo.
Foo.idr:30:15
When elaborating right hand side of foo:
fZ is deprecated since version 0.9.15 of Idris. Use FZ instead.
The text was updated successfully, but these errors were encountered:
On the mailing list @david-christiansen suggested the creation of a deprecation annotation to aide in managing changes to
Idris
projects. Such an annotation could look like:where PACKAGE and VERSION are arbitrary strings with no spaces, or quoted strings, and COMMENT uses the same syntax as documentation (that is, Markdown as supported by Cheapskate).
Then, unless
%deprecation off
has been specified or Idris has been run with--no-deprecation-warnings
, it would spit out a message likeand each deprecation warning would be issued at most once per module to avoid having completely insane noise from something like
the (Fin 10) 8
.For example, renaming an function
fZ
toFZ
can be supported with the following annotation:with the following error message if
fZ
is used in a functionfoo
.The text was updated successfully, but these errors were encountered: