Skip to content

Cryptol doesn't emit Unused name warnings when it should #2123

Description

@RyanGlScott

If you load the following example:

f : [8]
f = 0x00
  where
    fInit = 0x01

g : [8]
g = 0x00
  where
    gInit = 0x01
    xs = [gInit] # [x | x <- xs]

You will see the following warning:

$ cabal -v0 run exe:cryptol -- -c ":load Bug.cry"
Loading module Cryptol
Loading module Cryptol
Loading module Main
[warning] at /Users/rscott/Documents/Hacking/Haskell/cryptol/Bug.cry:4:5--4:10
    Unused name: fInit

You will see a warning that fInit is unused, which is correct---fInit is indeed not used anywhere in the body of f. On the other hand, Cryptol does not emit any warnings for gInit or xs, despite neither of them being used in the body of g. I find this behavior surprising.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    UXIssues related to the user experience (e.g., improved error messages)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions