在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):alexwl/haskell-code-explorer开源软件地址(OpenSource Url):https://github.com/alexwl/haskell-code-explorer开源编程语言(OpenSource Language):Haskell 66.4%开源软件介绍(OpenSource Introduction):Haskell Code ExplorerHaskell Code Explorer is a web application for exploring and understanding Haskell codebases. It provides IDE-like code intelligence features such as types and documentation on hover, "go to definition", "find references" and semantic highlighting. Examples:
The public instance of Haskell Code Explorer is available at https://haskell-code-explorer.mfix.io. It contains core libraries (ghc, base, etc.) and a subset of packages from a Stackage snapshot. Haskell Code Explorer consists of an indexer, an HTTP server, and a JavaScript application. The indexer uses GHC API to create a data structure that contains detailed information about the source code of a Cabal package. The HTTP server reads that data structure into memory and responds to HTTP requests from the JavaScript application. MotivationReading and understanding code is an essential part of the software development process. Understanding code in any statically typed language is much easier when code intelligence features (types on hover, go-to-definition, etc.) are available. Code intelligence for Haskell is especially useful because types are informative and precise (thanks to Haskell's purity and global type inference). Features
Installationgit clone https://github.com/alexwl/haskell-code-explorer
cd haskell-code-explorer To build Haskell Code Explorer Stack (https://docs.haskellstack.org/en/stable/README/) is needed. At the moment Haskell Code Explorer supports GHC 8.6.5, 8.6.4, GHC 8.6.3, GHC 8.4.4, GHC 8.4.3, GHC 8.2.2, and 8.0.2. For GHC 8.6.5: stack install For GHC 8.6.4: stack --stack-yaml=stack-8.6.4.yaml install For GHC 8.6.3: stack --stack-yaml=stack-8.6.3.yaml install For GHC 8.4.4: stack --stack-yaml=stack-8.4.4.yaml install For GHC 8.4.3: stack --stack-yaml=stack-8.4.3.yaml install For GHC 8.2.2: stack --stack-yaml=stack-8.2.2.yaml install For GHC 8.0.2: stack --stack-yaml=stack-8.0.2.yaml install Indexing source code of a Cabal package
A package should be built using either cabal-install or stack before indexing ( The version of GHC used to build
If there is no globally installed GHC on the system, then it is possible to use Run stack --resolver=lts-13.20 exec --no-ghc-package-path cabal -- update Index a package using stack exec: stack --resolver=lts-13.20 exec --no-ghc-package-path haskell-code-indexer -- INDEXER_OPTIONS
ExamplesShow all indexer options: haskell-code-indexer -h Index package: haskell-code-indexer --package PATH Index package with specific haskell-code-indexer --package PATH --dist dist-newstyle/build/x86_64-linux/ghc-8.2.2/hpath-0.9.2 Starting HTTP Server
ExamplesShow all server options: haskell-code-server -h Load the indexed package and start the server: haskell-code-server --package PATH --port 8080 Load multiple indexed packages and start the server: haskell-code-server --package PATH1 --package PATH2 --package PATH3 --port 8080 Load the indexed package and start the server, use Hoogle API (https://github.com/ndmitchell/hoogle/blob/3dbf68bfd701f942d3af2e6debb74a0a78cd392e/docs/API.md#json-api) to get documentation for functions and types defined in other packages ( haskell-code-server --package PATH --port 8080 --use-hoogle-api Open http://localhost:8080 in a browser to explore source code of the package. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论