I was writing a simple switch-case for my state machine. However, after calling sbt test I receive the following error:
It's very important to include the version of Chisel and your code when asking a question, but fortunately this one rings a bell as https://github.com/chipsalliance/chisel3/pull/1595.
You can workaround this by importing chisel3.util._. The better solution would be to update your version of Chisel, this bug is fixed in versions v3.2.8, v3.3.3, and v3.4.0 (and newer).
Related
I know it can be done, but I'm having trouble getting it working. I'm still finding my feet with Haskell.
I tried using postgresql-typed, but it wouldn't compile. They don't enable the QuasiQuotes extension, so I don't understand how their code would ever compile. It also fails with an error on the useTPGDatabase statement. I cloned the library's source code from Github, but their tests failed to compile using stack with exactly the same errors.
I considered using hasql-th, but it's not on stackage.org, which immediately puts it in the "too hard basket.". I considered switching to nix but that seems like even more effort.
Does somebody have a reliable recipe for getting an environment working that type-checks SQL at compile time in Haskell?
I considered using hasql-th, but it's not on stackage.org, which immediately puts it in the "too hard basket."
All you need to do is add the latest version of hasql-th to the extra-deps section of your stack.yaml file and all other deps that Stack will suggest to you when you build.
In the end your stack.yaml file should look something like this:
resolver: lts-17.9
extra-deps:
- hasql-th-0.4.0.8
- headed-megaparsec-0.1.0.4
- postgresql-syntax-0.3.0.3
Anticipating a question in the spirit of "Why is it not listed on Stackage?" It's just that nobody has gotten to list these packages yet.
Hi I've been playing a little bit with Frege and I just noticed in some examples that package and module are used interchangeably:
package MyModuleOne where
and sometimes:
module MyModuleTwo where
When importing from one or the other I don't see any difference in the behavior of my program. Is there something I should keep in mind when using package or module keywords ?
Yes. It used to start out with package, but later I realized this was an obstacle when porting Haskell code which uses module. Hence I added module, and thus currently module and package are the same keyword, just spelled differently.
But the intention is, of course, to retire package sooner or later. So my advice would be to use module only.
(This reminds me that I probably have to update the lang spec with regard to this. Never mind.)
Is there a lint for Elixir (like for Javascript) which checks that every function has a type specification?
There is an Erlang compiler switch, +warn_missing_spec, which does this, but I'm having trouble getting it to work with Elixir at the moment, I think there is a bug with it's parsing of the ELIXIR_ERL_OPTS environment variable which is converting +warn_missing_spec into -warn_missing_spec which isn't a valid compiler option. I'm going to open an issue on the tracker, but thought you might like to know that this does indeed exist.
EDIT: As José mentioned below, the correct flag is ERL_COMPILER_OPTIONS. You can enable the missing spec warning during compilation by doing the following:
ERL_COMPILER_OPTIONS="warn_missing_spec" mix compile
Keep in mind you may get superfluous warnings from Elixir itself, for functions like __MODULE__. It should still be useful though. One last thing to note, I discovered this morning that there is a problem using this flag with mix compile, and that it's currently only warning about mix.exs. This is being fixed, and may even be fixed by the time you see this, but it's something to be aware of.
Is there a way to configure MonoDevelop to highlight type-names like VS does?
I am using MonoDevelop 2.8.8.4 on Fedora-17.
It looks like MonoDevelop semantic highlighting is back on 3.0
I've got MD working on Ubuntu- though I have it running by pulling source from github and (after doing all the necessary build steps) calling make run- in case you would like to give it a go; I can highly recommend moving to 3.0.. (if possible), it's got some other refactoring capabilities that make it worth it!
In order to get semantic highlighting, you'll need to upgrade to MonoDevelop 3.0.x
I'm new to Xcode and Objective C, but I'm digging my way through the IDE and noticing that it doesn't appear to do live syntax checking. If I make a typo, I have to build the project before Xcode will even mention that there's a problem. Worse still - since it's returning compiler errors, it's usually not even the (in)correct line that's highlighted!
Is there a setting that I'm missing, or is that just what I'm stuck with compiling to check for syntax errors?
Assuming you're using Xcode 4.*, go to Preferences -> General, select "Enable Live Issues".
Select Target from TARGETS Navigator, select Build Settings, LLMV CLL 4.2 - Language > change Precompile Prefix Header setting to "NO", re-open Project (Workspace). It's worked for me.
Make sure you're on the current release of Xcode 4. Despite the 4-ish-ness of its version number, it was a complete rewrite from the previous release, and the early editions of it were sketchy, especially in "code sense" features like syntax highlighting and live error checking.
I've been much happier with it in its last few releases.