Repository navigation
Restructure Getting Started docs to get to a running program faster. - #7551
Conversation
|
@ptkato: i'm afraid this may be breaking your changes regarding |
| Haskell application. | ||
|
|
||
| Every project needs a name, we'll call this example "proglet". | ||
| **TL;DR;** ``mkdir proglet && cd proglet && cabal init && cabal run proglet`` |
There was a problem hiding this comment.
| **TL;DR;** ``mkdir proglet && cd proglet && cabal init && cabal run proglet`` | |
| **TL;DR;** ``mkdir proglet && cd proglet && cabal init --simple --exe && cabal run proglet`` |
@ptkato - this fails on the following:
λ athena proglet → cabal run proglet
Resolving dependencies...
Build profile: -w ghc-8.10.4 -O1
In order, the following will be built (use -v for more details):
- proglet-0.1.0.0 (exe:proglet) (first run)
Configuring executable 'proglet' for proglet-0.1.0.0..
Preprocessing executable 'proglet' for proglet-0.1.0.0..
Building executable 'proglet' for proglet-0.1.0.0..
[1 of 1] Compiling Main ( app/Main.hs, /home/tapas/haskell/proglet/dist-newstyle/build/x86_64-linux/ghc-8.10.4/proglet-0.1.0.0/x/proglet/build/proglet/proglet-tmp/Main.o )
app/Main.hs:1:8: error:
Could not load module ‘Prelude’
It is a member of the hidden package ‘base-4.14.1.0’.
Perhaps you need to add ‘base’ to the build-depends in your .cabal file.
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
1 | module Main where
| ^^^^It looks like the dependency heuristic is not finding base in the exe case for Simple type builds. Do you mind fixing? (Edit: turns out we forgot to do this on all of the Simple ones)
There was a problem hiding this comment.
Fixed in #7552. You can now run the following and it will build with output:
mkdir proglet && cd proglet && cabal init --simple --exe && cabal run progletThere was a problem hiding this comment.
Done (both doc tweak and approval of PR).
|
We can't afford to maintain different documentation for different branches, so the documentation follows the state (in particular of |
|
@m-renaud: would you like to review? |
|
@m-renaud: BTW, by mistake ( |
|
@m-renaud: would you like to conclude your review so that I can merge? Or backport these changes to your original PR and merge yourself? |
|
@m-renaud: thank you! |
Rebased (with resolved conflicts) version of #6157 by @m-renaud .
Edit: we can't afford to maintain different documentation for different branches, so the documentation follows the state (in particular of
cabal init) on branch master. This, sadly, means that this commit won't be backported to 3.6. The upside is that we can wait until @m-renaud returns and reviews.I've squashed all changes for easier rebasing. The diff between #6157 and the version in this PR is the following:
Details