Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 38198bc

Browse files
authored
Merge pull request #29 from github/update-stack-docs
Docs: specify we use cabal (and stack internally)
2 parents e3d4e80 + ed3ccc6 commit 38198bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/why-haskell.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Semantic is written in Haskell and we expect newcomers to the code base to have
44

55
# What is Haskell?
66

7-
Haskell is a standardized, general-purpose, compiled, purely functional programming language with non-strict semantics and strong static typing[[1][]]. We use the venerable [Glasgow Haskell Compiler][GHC] (GHC) and the build system [Stack][]. That opening sentence is dense enough that you could spend many hours researching the history and merits of things like "purely functional", "non-strict semantics", and "strong static typing". We'll leave that as an exercise to the reader and instead focus on a couple of interesting aspects of the language that we lean on heavily in Semantic.
7+
Haskell is a standardized, general-purpose, compiled, purely functional programming language with non-strict semantics and strong static typing[[1][]]. We use the venerable [Glasgow Haskell Compiler][GHC] (GHC) and the build system [cabal][], having also used [Stack][] internally. That opening sentence is dense enough that you could spend many hours researching the history and merits of things like "purely functional", "non-strict semantics", and "strong static typing". We'll leave that as an exercise to the reader and instead focus on a couple of interesting aspects of the language that we lean on heavily in Semantic.
88

99
# Why Haskell?
1010

@@ -49,6 +49,7 @@ Haskell is a pleasure to work in everyday. It's both productive and eye-opening.
4949
At this point, we are pretty firmly attached to Haskell's language features to enable many of the objectives of this project: abstract interpretation, graph analysis, effect analysis, code writing, AST matching, etc. Could you implement Semantic in another programming language? Certainly. An early prototype of the semantic diff portion of the project was done in Swift, but it quickly became unwieldy and even the first rough Haskell prototype was considerably more performant. Since adopting Haskell, we've had no trouble plugging into the rest of GitHub's infrastructure: running as a command line tool, a web server (HTTP/JSON), and now a Twirp RPC server. We've been an early adopter of Kubernetes and Moda and now ~~gRPC~~ Twirp at GitHub, often shipping our application on these new infrastructure components well ahead of other teams. We've managed our own build systems, quickly adopted new technologies like Docker, shipped in Enterprise, and much, much more in the short lifespan of the project. We've yet to be constrained by our language choice. If anything, we are amazed daily at Semantic's ability to abstract and represent the syntax and evaluation semantics of half a dozen (and counting) programming languages while keeping all the benefits of a strong static type system. If we'd chosen a more "popular" language it's likely we'd be mired in hundreds of thousands of lines of code and complaining about our tech debt, application performance, and the burden of adding any more languages. As it stands today, we've got 20k lines of Haskell code and some incredible program analysis capabilities at our disposal with little fear of adding more languages or supporting the changing needs of GitHub.
5050

5151
[1]: https://en.wikipedia.org/wiki/Haskell_(programming_language)
52+
[cabal]: https://cabal.readthedocs.io/en/latest/
5253
[Stack]: https://docs.haskellstack.org/en/stable/README/
5354
[GHC]: https://en.wikipedia.org/wiki/Glasgow_Haskell_Compiler
5455
[Facebook]: https://github.com/facebook/Haxl

0 commit comments

Comments
 (0)