Skip to content

Commit 6a3948e

Browse files
committed
Document: Why use the Hpack format?
1 parent d9d72b4 commit 6a3948e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

doc/tutorial/package_description.md

+13
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,19 @@ may be present in the package's root directory:
132132

133133
</div>
134134

135+
??? question "Why use the Hpack format?"
136+
137+
A `package.yaml` file can be more concise and less repetitive than the Cabal
138+
file that is generated from it. That is because the Hpack format uses
139+
defaults and top-level fields common to sections. The YAML syntax, which may
140+
already be familiar for some users, can also avoid repetition.
141+
142+
In particular, the format's defaults can infer the names of exposed and
143+
other modules.
144+
145+
The format allows a user to specify defaults in a file on GitHub or a local
146+
file.
147+
135148
??? question "I use the Hpack format. Should I also check-in a Cabal file to my repository?"
136149

137150
Yes. This helps people who do not use Stack or the Hpack tool separately.

0 commit comments

Comments
 (0)