GithubHelp home page GithubHelp logo

core-kythe's Introduction

There are two parts in this repo currently.

The first is a plugin which prints out core and emits kythe cross-links for it.

The second is a nix function which recursively indexes and creates tables for all the dependencies of a project.

Plugin Usage

Enter the environment with the plugin.

nix-shell

(This will take a while (1-2 hours) as it will build GHC).

To use the plugin.

ghc -fplugin KythePlugin -fplugin-opt KythePlugin:logs T.hs
./serve.sh logs/ localhost:8080

Then access localhost:8080 in order to view the cross linked source.

ghcWithIndexer

nix-shell haskell-with-indexer.nix
serve

Will build the conduit package by default and cross-link all its dependencies. There are some problems with the resulting directory structure but everything fundamentally works.

You can modify which package is built by changing ps.conduit in the nix file.

Examples

There are also some examples which can be rendered if kythe is installed.

./serve examples/ localhost:8080

Will render the output for 5 simple files from two projects.

core-kythe's People

Contributors

mpickering avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

core-kythe's Issues

Set the right flags for -ddump-simpl

Currently I don't try and set the right flags (ie -dsuppress-ticks -g -dsuppress-unfoldings) I should modify DynFlags rather than make the user set them.

Cross-module support

I need to work out a way of passing the tick information between modules. For now it will be easiest to serialise to files I think.

Type arguments are not cross referenced.

The binding sites are marked as definition sites but the use sites are not linked back to them.

This is because these types are printed by pprArg and then eventually by ppr_ty in IfaceType.

Permissions issue when serving

I'm following https://github.com/mpickering/core-kythe/blob/23e690883f1b56e830a49e07a8ea1785ee5a390e/README.md#ghcwithindexer

but when I run serve I get:

[nix-shell:~/src/haskell/core-kythe]$ serve
2017/08/29 16:13:15 Error opening db at "/nix/store/xm92l97915kgb83w49sb1wx9vq751g0z-haskell-indexer-local-0.1/share/tbl": could not open LevelDB at "/nix/store/xm92l97915kgb83w49sb1wx9vq751g0z-haskell-indexer-local-0.1/share/tbl": IO error: /nix/store/xm92l97915kgb83w49sb1wx9vq751g0z-haskell-indexer-local-0.1/share/tbl/LOCK: Permission denied

It seems to try to open a LevelDB lock file inside the nix store; that can't work because it's read-only.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.