Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7983991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:07:37+00:00 2026-06-04T11:07:37+00:00

Given a Haskell project, is there a way to automatically calculate the entire list

  • 0

Given a Haskell project, is there a way to automatically calculate the entire list of dependencies? All the libraries it depends on as well as libraries that have been included but are not required.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T11:07:38+00:00Added an answer on June 4, 2026 at 11:07 am

    As I said in the comments, cabal-install already does this (I’m using cabal-install 0.14.0) by guessing the packages via module lookup (like GHCi). It doesn’t have any real intelligence w.r.t. versions so it just sets the version to the match major version of what you have installed.

    Below you can see me making a dummy package that imports Data.Vector and cabal-install infers I am using vector 0.9.*.

    [tommd@mavlo blah]$ pwd
    /tmp/blah
    [tommd@mavlo blah]$ cat Data/Blah.hs 
    module Data.Blah where
    
    import Data.Vector
    [tommd@mavlo blah]$ cabal init
    Package name? [default: blah] 
    ...SNIP...
    What does the package build:
       1) Library
       2) Executable
    Your choice? 1
    Include documentation on what each field means (y/n)? [default: n] 
    
    Guessing dependencies...           <--- SEE, SEE! YAY!
    
    Generating LICENSE...
    Warning: unknown license type, you must put a copy in LICENSE yourself.
    Generating Setup.hs...
    Generating blah.cabal...
    
    You may want to edit the .cabal file and add a Description field.
    [tommd@mavlo blah]$ cat blah.cabal 
    -- Initial blah.cabal generated by cabal init.  For further documentation, 
    -- see http://haskell.org/cabal/users-guide/
    
    name:                blah
    version:             0.1.0.0
    synopsis:            Sisponys
    -- description:         
    -- license:             
    license-file:        LICENSE
    author:              Me
    maintainer:          No@No.No
    -- copyright:           
    -- category:            
    build-type:          Simple
    cabal-version:       >=1.8
    
    library
      exposed-modules:     Data.Blah
      -- other-modules:       
      build-depends:       base ==4.5.*, vector ==0.9.*    <-- SEE?? SEE! YIPPEE!!
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to serialize (read/show) functions in Haskell? For example given that:
Does Haskell standard library have a function that given a list and a predicate,
Suppose that my Haskell function is given an input, which is supposed to be
Given a package, how can I automatically find all its sub-packages?
I've just given Leksah a try for Haskell development it's nice and all but
I am looking for a Haskell function that returns the capturing groups of all
Could any Haskell experts out there please clarify something for me: Given a simplified
I have the following (imperative) algorithm that I want to implement in Haskell: Given
Given the following tree structure in Haskell: data Tree = Leaf Int | Node
In Haskell function type ( -> ) is given, it's not an algebraic data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.