Giter Club home page Giter Club logo

Comments (8)

ocharles avatar ocharles commented on May 17, 2024

I should note that haskell-process-cabal-build does work, and the repl seems to have the correct module loaded.

from haskell-mode.

chrisdone avatar chrisdone commented on May 17, 2024

I don't think this is anything to do with haskell-mode.

Try:

$ ghci
> :l yourfile.hs

If it doesn't work please close this ticket.

from haskell-mode.

ocharles avatar ocharles commented on May 17, 2024

That doesn't work because my system has MonadCatchIO-transformers and MonadCatchIO-mtl. But my cabal file only selects one of these, so haskell-mode should be clever enough to do the same.

from haskell-mode.

chrisdone avatar chrisdone commented on May 17, 2024

So this is a feature request to run GHCi with Cabal dependency information and options.

I think cabal interactive will provide such a feature and cabal-ghci provides it in the mean time. Not sure it's worth bothering re-implementing such code in Emacs.

from haskell-mode.

pheaver avatar pheaver commented on May 17, 2024

Yes, the problem is that ghci does not care about your .cabal file and thus will not hide packages not listed in the .cabal file. One fix is to define a .ghci file that hides one of those packages.

from haskell-mode.

ocharles avatar ocharles commented on May 17, 2024

Well I've put a .ghci file in src, so it works fine from the command line if I launch ghci in there. However, the GHCI that is launched by haskell-emacs doesn't seem to respect that working directory. It seems it instead launches GHCI and then does a :cd. If I add ~/.ghci then it does work, but this doesn't quite seem like a solution. Thoughts?

from haskell-mode.

chrisdone avatar chrisdone commented on May 17, 2024

Try popping it in the same directory as your .cabal file, that's where it starts the process (and then indeed, it does :cd into the working directory). Should work?

from haskell-mode.

ocharles avatar ocharles commented on May 17, 2024

Aha - perfect, thank you! Apologies for somewhat wasting your time.

from haskell-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.