haskell-process file not found in haskell-mode - haskell

I'm trying to follow the haskell wiki to set up emacs to program haskell. I'm using haskell mode, and that seems to be working and okay, but now I try to generate haskell tags to be able to open a file with the M-. shortcut. I installed hasktags and haskell-mode as described here : http://www.haskell.org/haskellwiki/Emacs/Project_navigation. However, when I try to generate the tags through M-x haskell-process-generate-tags I get a 'not found' error. I found a post on stack overflow about this, How do I set up haskell-mode to generate tags?, which described my problem and solved it by loading haskell-process from .emacs.d/el-get/haskell-mode/haskell-process.el as path.
However, I'm on Ubuntu, and I installed the haskell-mode (and haskell-platform and emacs of course) through aptitude, and that didn't seem to contain this haskell-process.el file mentioned in that post. I then tried to download the haskell-mode through el-get, and that didn't include the haskell-process file either.
So, my question is, am I correct in assuming that I need the haskell-process file to be able to generate the tags, and if so, where can I get that file? I think I saw it in the git repo of haskell-mode, and I can of course pluck it out and put it in my directory, but I've got the feeling that if I have to resort to that, it means I'm doing something wrong.
Kasper

Emacs packages are usually outdated in Debian-based distributions, and I think, that Ubuntu still have very old version of haskell-mode. It's better to install haskell-mode via package.el, that is bundled together with Emacs. Fresh versions of haskell-mode for package.el are available via MELPA. The similar advice I can give for other Emacs packages ;-)

Related

"cabal new-install Cabal cabal-install" answered "cabal.exe: Could not read index. Did you call 'checkForUpdates'?" on Windows10

I've just installed Haskell Platform 8.6.5 in Windows 10 (latest download from https://www.haskell.org/platform/), and when trying "cabal new-update" or "cabal v1-update", it answers with the following error message.
Downloading the latest package list from hackage.haskell.org
cabal.exe: Could not read index. Did you call 'checkForUpdates'?
I have found no other question regarding this issue here, and although there is one on GitHub (https://github.com/haskell/cabal/issues/5574), no solutions so far, at least for Windows.
Can I use cabal on Windows at all?
I have searched and read all cabal related problems I could, both on here and on GitHub, but most are either for Linux or OS. No good answers for Windows...
I have tried the "cabal -v3 v2-update" and it showed me the file that was missing and its path. At first I tried to restore the file by hand, but someone suggested erasing all the files related to the missing one, and, voilá, cabal regenerate all of them and started to work.
The file missing was called 001-index.cache, and I erased all the files 001-index*.
The path was C:\Users\fidel\AppData\Roaming\cabal\packages\hackage.haskell.org.
Thanks everybody for the suggestions and help.

Setting up Cygwin + Android NDK + cocos2Dx to work with Eclipse

I'm following a tutorial from this website: Monetizing Game Apps by Todd Perkins
Access to all the files are not required for the questions I'm asking. I have done research on how to solve this on stack overflow and discussed it below
I have followed the tutorial and it has asked me to:
Install Cygwin
Download Cocos2dx-2.0.1(I know this is old, but I don't want to deal with deprecating problems until I'm more confident with the environment)
Run create-android-project.bat(works fine).
Open project I created- and move to proj.android and run build_native.sh in Cygwin.
Then I open up cygwin.bat, navigate to myproject/proj.android and run ./build_native.sh
Problem:
$ ./build_native.sh
Using prebuilt externals
./build_native.sh: line 74: /cygdrive/c/android-ndk-r9c-windows-x86_64/ndk-build: No such file or directory
So I looked into the files and double-checked my changes:
In create-android-project.bat I modified the following variables:
set _CYGBIN=c:\Cygwin64\bin
set _ANDROIDTOOLS=c:\Program Files (x86)\ADT\adt-bundle-windows-x86_64-20130219\sdk\tools
set _NDKROOT=c:\android-ndk-r9c-windows-x86_64
Check line 74 that cygwin complained about in myproject/proj.android/build_native.sh:
echo "Using prebuilt externals"
$NDK_ROOT/ndk-build -C $GAME_ANDROID_ROOT \
NDK_MODULE_PATH=${COCOS2DX_ROOT}:${COCOS2DX_ROOT}/cocos2dx/platform/third_party/android/prebuilt
Double check what NDK_ROOT is pointing to in build_native.sh:
NDK_ROOT=/cygdrive/c/android-ndk-r9c-windows-x86_64
COCOS2DX_ROOT=/cygdrive/c/Users/DarkRaveDev/Documents/cocos2d-x-2.0.1
GAME_ROOT=$COCOS2DX_ROOT/chaara
GAME_ANDROID_ROOT=$GAME_ROOT/proj.android
RESOURCE_ROOT=$GAME_ROOT/Resources
My Research:
I surfed SO for quite some time and tried the following from SO:
EOL Conversion in Notepad++ so LF works for windows for the build_native.sh
An answer somewhere said I need to install the make package when installing cygwin.. I'm not getting this problem, so I'm not sure if this applies.
I have searched many ways to set path - NDK_ROOT
QUESTION:
What exactly am I doing wrong? Is it the variables are badly set or is cygwin not properly installed?
Thank you to everyone who commented! :)
This is what I ended up doing.
Reinstall Cygwin : When you get to the select packages to install page, make sure to find DEVEL and change the install action from default to install. I know its a lot of megs but it's easier than combing through it. If you do want to comb through it and get only what you need, I suggest using this website: Installing a c++ compiler for windows
Make your paths simple : Like user2359247 suggested.
Finally run the create_android.bat, open your android project. Keep the path location of your build_native.sh file in mind and open your cygwin terminal.
Navigate to the path in cygwin, and run the file with sh build_native.sh: At this point everything was quite smooth sailing.
NOTE:
Also I kept using my version of ndk which is r9 instead of r8 in the tutorial, it didn't give me any hiccups.
Thank you SO!

How to have vim leverage system clipboard in Mountain Lion

I'm trying to get VIM to access the system clipboard. As I see it, here are my options:
Recompile VIM and specify that access to the clipboard, per this post.
Install a newer version of VIM using homebrew, per this post.
I'd prefer to do the second option. Does anyone know if this will actually solve the problem I'm having? Also, are there other solutions to this copy/paste problem that haven't been listed here?
MY SOLUTION: I ended up installing MacVim and making it the default Vim. I found this post helpful. I ran this command:
brew install macvim --override-system-vim
then modified my .bash_profile and that was it.
You are probably using a version of Vim that was not built with clipboard support. Of course the solution to this "problem" is to use a version of Vim that is built with clipboard support.
What does $ vim --version say?
There are many answers on SO describing your options, either related to Ruby or Python support or to clipboard support. The solution is the same every time: install a proper build. Just pick the process you are most comfortable with.
The absolute simplest solution is to install MacVim and use the bundled mvim script to run MacVim on the command line. It's totally painless and guaranteed to work.
I don't recommend building from the sources as it can be a needlessly frustrating task.
Homebrew and MacPorts are also good options but I don't like all the symlinking that is done in Homebrew's case. YMMV.
You have asked the question more than 17 minutes ago. That's more than enough time to try all your options. Did you actually try something?
You can try using the fakeclip plugin.

Haskell on MAC LION

First of all, thank you for looking at this. I am a newbie to programming( I can program Java and Python)
I am gonna ask some really trivial questions.
How do i install the "extra " of Haskell on my mac? My situation is that i got ghci running, i am following the tutorial from my Terminal http://learnyouahaskell.com/introduction
I downloaded GHC
Xcode
Emacs(not working, more explanation below)
But i would like to have something like they use in their examples, a text editor that help me write in .hs and support the programming language. I tried to download Emacs but i couldn't find "haskell" as supported language, and i have no idea how to install it so it works together with my GHC. Also, i don't think the tutorial says a lot about Cabal. How do i access it? If i just go in and type "cabal install" or just "cabal" it just gives me "not in scope" as an answer.
Maybe i misunderstood cabal? it isn't something you "access" as such?
Thanks for checking my post out. I look forward to functional programming!( i am a mathematician :) )
Did you install ghc directly from http://www.haskell.org/ghc/ ? Usually it is better to install haskell platform as suggested in the tutorial. It includes cabal already.
If you used haskell platform, then try to find where cabal is installed and add the directory into your $PATH variable. I think you can fire a bug if platform installer for Mac doesn't install cabal in usual location.
(Note: AFAIK haskell platform installer is broken for new MacOS, it contains hardcoded path to xcode. But it is simple to find and fix)
Check out haskell mode for emacs. I don't use emacs, so the link is the only I can suggest, sorry.
If you have the Apple developer tools installed already, you can look at a package manager like e.g. homebrew (see at Link for installation). Then in a terminal you type
brew install ghc haskell-platform
and it will take care of everything, dependencies etc. You will get ghc, ghci, cabal, everything at once. It will put things in /usr/local/ so you might not even have to edit your $PATH ...
For editing, Aquamacs (download at http://aquamacs.org/) supports Haskell out of the box, and is very Mac-friendly.

How to install something on Linux without Makefile (lessc in this case)

I am relatively new to the Linux world so forgive this question if it is simple. I have cloned the lessc repo from this url: https://github.com/cloudhead/less.js
However I cannot find a way of installing it. Am I missing something or is there a manual way to install things setup like this. I have encountered this problem several times and would appreciate any input you could offer. Thanks!
You don't have to install lessc with make install.
It is not a binary program, it's a javascript, so you jut have to copy in the correct position of your website.
Unlike programs, which have a specified position where they have to be installed, files that have to be served by webserver do not have an install script, because there's not fixed position in the filesystem where a website is stored.

Resources