Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused variable error encourages additionally declaring the function name to be unused. #1234

Open
Izaakwltn opened this issue Sep 11, 2024 · 0 comments
Assignees

Comments

@Izaakwltn
Copy link
Collaborator

(coalton-toplevel
  (declare eeqq (UFix -> Boolean))
  (define (eeqq x)
    True))

Returns the error:

COMMON-LISP:WARNING: warn: Unused variable
  --> unification.lisp:4:16
   |
 4 |    (define (eeqq x)
   |                  ^ variable defined here
help: prefix the variable with '_' to declare it unused
 4 |   (define (eeqq _x)
   |                 --


; file: /var/tmp/slimeQmDiZ6
; in: COALTON-TOPLEVEL (DECLARE EEQQ (UFIX -> BOOLEAN))
;     (COALTON:COALTON-TOPLEVEL
;       (COALTON:DECLARE COALTON-USER::EEQQ
;                        (COALTON:UFIX COALTON:-> COALTON:BOOLEAN))
;       (COALTON:DEFINE (COALTON-USER::EEQQ COALTON-USER::X)
;         COALTON:TRUE))
; 
; caught COMMON-LISP:STYLE-WARNING:
;   warn: Unused variable
;     --> unification.lisp:4:15
;      |
;    4 |    (define (eeqq x)
;      |                 ^ variable defined here
;   help: prefix the variable with '_' to declare it unused
;    4 |   (define (eeqq_ x)
;      |                --
;   
; 
; compilation unit finished
;   caught 1 STYLE-WARNING condition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants