serras / emacs-haskell-tutorial

Tutorial on setting up Emacs to do Haskell programming
690 stars 100 forks source link

cabal install happy #49

Closed mohanr closed 8 years ago

mohanr commented 8 years ago

capture

I have installed cabal and happy and refreshed the packages with

`

               (require 'package)
               (add-to-list 'package-archives
              '("melpa-stable" . "http://stable.melpa.org/packages/") t)
              (package-initialize)

`

I couldn't get the syntax hightlighted. Am I missing something ?

ghost commented 8 years ago

You haven't completed the guide. Refreshing the packages allows the package manager inside emacs to install more packages. You will have to install haskell-mode, and set it up according to the guide.

@serras maybe a gitter channel would be good for general discussions of this nature. I usually check gitter on a daily basis.

serras commented 8 years ago

I am OK with setting up a gitter channel, although I do not have many time currently to answer questions

ghost commented 8 years ago

Yup, I'll tackle any questions that may come up. I'm saying this because I've had issues with the tutorial that I've fixed locally but never found the time to send in a PR. A gitter channel would work well, as it might bring more people to contribute.

serras commented 8 years ago

Done!

mohanr commented 8 years ago

I can add some basic points like this if it is useful and does not confuse others.

`

             I had cabal.exe locally and realized it is not the correct way.

             D:\Frege>..\Downloads\cabal update
             Downloading the latest package list from hackage.haskell.org
             Note: there is a new version of cabal-install available.
             To upgrade, run: cabal install cabal-install

             D:\Frege>ghc-pkg list Cabal
             D:/Haskell Platform/7.10.3\lib\package.conf.d:
             Cabal-1.22.5.0

             D:\Frege>..\Downloads\cabal install happy
             cabal: The program ghc version >=6.4 is required but it could not be found.
             So I installed Haskell Platform and added the bin folder to the PATH.

`

serras commented 8 years ago

This seems reasonable, although I would prefer to make it OS-independent, and thus write only cabal install happy. But maybe the best option is to tell them either from their Linux distro, or using the Haskell Platform.

mohanr commented 8 years ago

I will complete the installation and send a pull request if I get enough points. You could review

serras commented 8 years ago

The problem seems to be that Emacs is not using the Haskell mode (you can see that at the bottom it says "Fundamental", which is the default mode without highlighting). Furthermore, there seems to be an error finding a file in your system. Do you have something else in your .emacs file? Maybe we can work from there.

mohanr commented 8 years ago

Now I think it worked. All of it. Except this. 'present' is installed successfully.

  `

               λ> :present [1 ..]
                    <interactive>:22:10:
                    Not in scope: `Present.asData'
                    Perhaps you meant one of these:
                     `Present.last' (imported from Data.ByteString.Lazy),
                   `Present.scanl' (imported from Data.ByteString.Lazy),
                   `Present.span' (imported from Data.ByteString.Lazy)

`

serras commented 8 years ago

I think you need to install the present package to make it work.

ghost commented 8 years ago

@serras He said it is installed. I'm thinking it might be an issue with the package itself. @mohanr Can you try installing a different version of the package?