hackon | A tool to manage environment variables for projects | Command Line Interface library
kandi X-RAY | hackon Summary
kandi X-RAY | hackon Summary
Hackon is a small set of shell functions for managing project-specific environment variables. Currently supports zsh and hopefully bash.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of hackon
hackon Key Features
hackon Examples and Code Snippets
Community Discussions
Trending Discussions on hackon
QUESTION
Compiling a program that contains a type evidence parameter in Scala (such as T <:< U
) can cause a warning when -Ywarn-unused
is passed to the compiler. Especially in the case when the type evidence parameter is used to verify a constraint encoded using phantom types, this warning is likely to occur.
As an example, compiling the file here: https://github.com/hseeberger/demo-phantom-types/blob/master/src/main/scala/de/heikoseeberger/demophantomtypes/Hacker.scala returns the following:
# scalac -Ywarn-unused Hacker.scala
Hacker.scala:42: warning: parameter value ev in method hackOn is never used
def hackOn(implicit ev: IsCaffeinated[S]): Hacker[State.Decaffeinated] = {
^
Hacker.scala:47: warning: parameter value ev in method drinkCoffee is never used
def drinkCoffee(implicit ev: IsDecaffeinated[S]): Hacker[State.Caffeinated] = {
^
two warnings found
It's clear to me that the parameter ev
is not actually necessary at runtime, but the parameter is useful at compile time. Is there any way to instruct the compiler to ignore this case, while still raising the warning for unused function parameters in other contexts?
For example, I think instructing the compiler to ignore implicit parameters of class <:<
or =:=
would solve this issue, but I'm not sure how that could be accomplished.
ANSWER
Answered 2017-Sep-09 at 17:12I often find myself adding this because of either -Ywarn-unused
or -Ywarn-value-discard
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install hackon
All you need to do is source <path to hackon.sh> in your bashrc or zshrc.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page