Giter Site home page Giter Site logo

ghc-server's Introduction

ghc-server

A server interface to GHC. Work in progress. No official release yet.

Purpose

Generally it should replace use of GHC, GHCi, hlint, hdevtools, ghc-mod in one big program that you can communicate with via a simple s-expression/JSON-based protocol.

Supported

  • Asynchonrous s-expression-based communication layer.
  • Compilation.
  • Type checking.
  • Loading modules.
  • REPL evaluation.
  • Type info.
  • Kind info.
  • Connecting to a remote instance.
  • Setting compile flags.
  • Setting package-conf flag.

Planned / might do

  • Sub-expression type info.
  • Go to definition.
  • Autocompletion.
  • Additional JSON-based communication layer.
  • Test suite against all supported GHC versions.
  • Show generated Core for a module / function.
  • Show generated CMM for a module / function.
  • Show generated assembly for a module / function.
  • Hlint checking.
  • Hoogle generation.
  • Jump to documentation.
  • Structured-haskell-mode parser.
  • Haskell-names-based scope resolution.
  • Capture stderr and stdout separately to evaluation.
  • Figure out compile flags from Cabal file.
  • Support presentations (via present package).
  • Programmatic access to scope, type info, instances, etc.
  • Managed handling of Cabal configuration.
  • Make better debugging available.
  • Watch statements/variables.
  • Automatic import management.
  • Whatever I feel like doing.

Major GHC releases supported

I test compilation against the following GHC versions.

  • GHC 7.8
  • GHC 7.6
  • GHC 7.4
  • GHC 7.2

This is achieved via a wrapper module called GHC.Compat which wraps any function or type that has changed between GHC versions.

What about GHCi, Scion, hdevtools, ghc-mod, FP Haskell Center, etc.?

There are many approaches to this problem. Consider this a vanity project on par with Frank Sinatra's I did it My Way…. As an Emacs user I'm very particular about my development environment. I change it from day to day as I please, sometimes with bad ideas, sometimes with good ideas. Here I have the freedom to make the Haskell setup that I want. I will treat the GHC library like XMonad's library, and make a program out of it.

As always, when taking inspiration for a development environment, one should always look at the Lisp world. Here, SLIME is my inspiration. The SBCL compiler exposes a wealth of information to the user. More than anyone could ever want. SBCL makes sense of that information and gives the user as much as is asked for.

ghc-server's People

Contributors

chrisdone avatar

Watchers

 avatar  avatar  avatar

Forkers

philonous

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.