Some languages ââ(like Go and Rust) require the programmer to try to remove all dead code from the source. This has advantages in the maintenance and readability of the code, if for some users it is a bit extreme.
How to enable this feature in Haskell? (Is this possible?) For example, in the following code, I would like url2 be marked as dead code because it is not used in main .
url1 = "http://stackoverflow.com" url2 = "http://stackexchange.com" main = print url1
I saw a link to some compiler flags (e.g. -fwarn-unused-binds , -fwarn-name-shadowing and -fwarn-hi-shadowing ), but none of them seem to do what I want.
haskell ghc
Garrett bluma
source share