Leksah without main - haskell

Is there a way to program in Leksah without creating a main function/module, to test small functions and programns, for example? Can't I just creat a new module and use it?
Thank you

Leksah is designed to get you to structure your whole major project correctly from the start. If you want to use it for a quick editor, recognise that's not what it's for, but you can make a workaround:
Make a new workspace and package called Scratch/Scratchpad/Temp, with just one module in it. Use it when you just want to mess around a bit, and clear it out when you're starting something else.

Related

How to convert IAR .ewp to LSP compile_commands.json database

I am on the quest of creating a compile_commands.json database from my IAR .ewp project. This would allow me to use intelligent LSP autocompletion (ccls) and proper semantic highlighting (vim-lsp-cxx-highlight) from my vim setup.
I understand that I could manually create a CMake file with the same setup as in the .ewp project file, but unfortunately all my co-workers use the IAR IDE. I would risk missing some important project setup changes made by my co-workers and me failing to update the .ewp. It'd be great if I could automatically parse the .ewp file to CMake, and hence create the commands database.
Anybody knows of a clever way of doing this? If not, how would I go creating a tool that does exactly that? It appears that by undefining the Clang compiler defines one could make ccls use of the IAR code-base at full strenght.
Use -jsondb option in IAR
> iarbuild.exe example.ewp -jsondb debug -output compile_commands.json

Purescript inside Haskell code

I want to use a PureScript in the program code to generate text of JavaScript from it. For example, I use Julius (from Yesod) to directly insert a javascript. I want to use the same PureScript .Maybe there are such solutions or libraries?
Thank you!
When I have done something similar, I've kept the Purescript source in separate files, and combined the Haskell & Purescript parts later (during the build or at runtime). I think this is the easiest way, and you can keep using existing Purescript tools.
I had my web server read the JS output from purs at runtime. Another option would be to use file-embed to include the JS text when compiling the Haskell code. One reason to prefer file-embed is if you need to have a single executable file to deploy.
Finally, I have a Makefile that builds the Purescript code, then the Haskell code.

Tabcompletion and docview while editing rc.lua

I saw that there is a lua plugin for eclipse and there is a docpage on the awesome main page api_doc and all the .lua files in /usr/share/awesome/lib.
So I thought it must be possible to create a Library or Execution Environment so that one has tabcompletion and docview.
So I tried making my own Execution Environment:
wrote the standard .rockspec file
downloaded the documentation made an ofline version of it and put it in docs/ folder
ziped the files and folders in /usr/share/awesome/lib
ziped all up
tried it out ... and it failed.
When I try to view a documentaion for a .lua file I get "Note: This element has no attached documentation."
Questions: Am I totaly wrong in my doing (because I have the feeling I am)? Is there any way to edit the rc.lua with tabcompletion and docview?
Koneki will probably take a while to setup, but it's definitly worth it. Going for the".doclua"(by using version 1.2) would certainly make it, but I doubt that using a script to generate the information you need, would work out on the long run.
Most likely, you'll probably pass a bit of time to define what kind of object you're dealing with every time you come across one. The right to do, would be to actually take the time to see if the object/module/inner type inherit from an another object, so can actually have more completion feature as you keep using autocomplete to go from one object to another by pressing "dot"+ctrl_space.
In an ideal world, one person could probably make it right and share to other, so they can enjoy a full featured autocomplete editor.
Found solution for eclipse.
First off the idea of setting up an Execution environment was the wrong one.
So the whole thing about downloading the doc although.
For more information on that visit eclipse Wiki for LUA Development Tool.
The right thing to do is to add a source folder which contains the /usr/share/awesome/lib directory.
The bad news is that my comment from above was totally right, which means one has to configure each .lib file in /usr/share/awesome/lib to meet the requirements of the Documentation Language described here.
Than editing the rc.lua (which one can add to the project in eclipse) works with tabcompletion and doc view.
Since the Documentation Language used in the lib files is similar to the one used by "LUA Development Tool" one has not to change many things. Maybe there are even scripts for that.

Haskell-mode source navigation for dependencies

I am using haskell-mode for Emacs. I succeeded at creating etags for my haskell project on every save by hasktags, however, the cabal dependencies can not be navigated to this way. So I wonder: Is there a way to make this source code navigation work for cabal dependencies, too? (as it is easily possible for java-maven projects for example..)
You can try haskdogs, which provides a thin wrapper around hasktags and executes it for your imported modules as well as your own code. It maintains a repository of module sources in ~/.haskdogs and indexes into that.
I'm using it with vi and have been quite happy with it so far.

Tutorial/Guide to create a classic, small Linux application in a package (Debian)

I've made a small script in my machine, and an alias in .bashrc that calls it. It's a bash script with 3 lines, but it can grow.
Now, some people in my team found it useful, and want to use it.
Instead of saying "copy this alias, do this, do that, install that lib" I was thinking about creating a simple package to be a little more professional. Fact is, I've never done something like this before. And the problem to me is not creating a package, is trying to decide what usually do you put in a package.
Suppose I want to take my script, and create myapplication. I want to create a .deb file that my team would install and:
Have a /usr/bin/myapplication or /usr/sbin/myapplication (what's the difference between them?), so they would just call myapplication at their terminal and it would work;
Have a man page; (Where are usually located man pages in a debian system?);
Have a possibility to read a .myapplicationrc in home folder with some configurations;
Have an entry for shortcuts in a gnome installation (is it possible to have an universal shortcut "format" that's is available to KDE and Gnome as well?);
Install dependencies.
I'm new to all that stuff. I usually code simple scripts and create an alias in my bashrc. I've never done a package before. Which guides do you know of that can help me accomplish what I thinking of above?
Here is a place to start, though I welcome a more succinct answer.
I couldn't find a complete guide. I think the best thing to do is download a package that does exactly what I'm thinking of and do some reading, like taskwarrior.

Resources