Git Product home page Git Product logo

Comments (7)

mrkkrp avatar mrkkrp commented on August 28, 2024

Why do you want to cabal install req? Use new- or v2- commands.

from req.

mrkkrp avatar mrkkrp commented on August 28, 2024

You create a .cabal file that describes your package and its dependencies and then you do cabal new-build or cabal v2-build and it builds it solving the package version constraints just for this single package in isolation. If you install packages globally you'll quickly find yourself in dependency hell. It's something we did in ~2013 or so.

Or use stack. Or use nix.

from req.

epogrebnyak avatar epogrebnyak commented on August 28, 2024

It's something we did in ~2013 or so.

I'm learning, so maybe a good lesson in package management.

I'm setting up a remote linux instance, where I can use http-client and req with ghci interpreter, so there really isn't a package I'm developping or supporting now.

I'm trying to get an example from req README to run. So far I installed haskell platfrom with sudo apt-get install haskell-platform and I want to run

Prelude> import Network.HTTP.Req

<no location info>: error:
    Could not find module ‘Network.HTTP.Req’

Is cabal install req --force-reinstalls too risky? Maybe I should reinstall HTTP after running it.

stack would be good for a package too, but not for global installation right?

nix I know nothing about yet, seems quite learning curve.

from req.

epogrebnyak avatar epogrebnyak commented on August 28, 2024

cabal install req --force-reinstalls worked fine for running a README example

from req.

mrkkrp avatar mrkkrp commented on August 28, 2024

Usually I experiment by creating a small project. You can do it either with stack or with cabal. I'm not sure why you need a remote linux instance though, you could do it locally on your computer.

The install commands are usually for binaries. What they do is they build the packages and put their executables on PATH (if configured properly).

from req.

epogrebnyak avatar epogrebnyak commented on August 28, 2024

Usually I experiment by creating a small project.

That's a useful tip, not usually found on tutorials. Should learn to use more often.

why you need a remote linux instance though

I'm locked on Windows - in my path I have non-latin characters for home directory, so many installations fail (eg entropy package) and WSL is not yet compatible with cabal and tools using it.

So my choices were either a big local virtualisation or a small remote machine. I use VS Code remote features to handle the remote, so in stable situation it is a good combo.

from req.

mrkkrp avatar mrkkrp commented on August 28, 2024

Should we close this one?

from req.

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.