Skip to content

Commit ddb4d10

Browse files
Add dummy package for creating a .ghc.environment
1 parent 544640d commit ddb4d10

File tree

6 files changed

+39
-0
lines changed

6 files changed

+39
-0
lines changed

docs/ghc-env/Main.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Main where
2+
3+
main :: IO ()
4+
main = putStrLn "Hello, Haskell!"

docs/ghc-env/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
This directory contains a dummy `.cabal` file for creating a `.ghc.environment` file with a consistent set of packages.
2+
3+
To create a `.ghc.environment` file in this directory, run
4+
5+
```
6+
./mk-ghc-env.sh
7+
```
8+
9+
Put your worksheet into this directory as well, and enter `.` in the "cabal — .ghc.environment" settings
10+
11+
![](settings-back-end-cabal.png)

docs/ghc-env/cabal.project

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
packages: .
2+
write-ghc-environment-files: always

docs/ghc-env/ghc-env.cabal

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cabal-version: 3.0
2+
name: ghc-env
3+
synopsis: Dummy .cabal file to generate a consistent set of packages.
4+
version: 0.1.0.0
5+
build-type: Simple
6+
7+
executable package-db-dummy
8+
main-is: Main.hs
9+
build-depends:
10+
, base
11+
, Chart
12+
, Chart-diagrams
13+
, deltaq >=1.1 && <1.2
14+
, diagrams-lib
15+
, diagrams-svg
16+
, hyper
17+
, hyper-extra
18+
19+
build-tool-depends: hyper-haskell-server:hyper-haskell-server
20+
hs-source-dirs: .

docs/ghc-env/mk-ghc-env.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
cabal build && cabal install hyper-haskell-server --installdir=.
6.15 KB
Loading

0 commit comments

Comments
 (0)