Giter Site home page Giter Site logo

glow2-haskell's Introduction

WIP retargetable/portable backend for glow, written in Haskell.

This is a replacement for the highly EVM/Ethereum-specific consensus code generator and participant runtime that is part of Glow; it parses the anf intermediate form generated by the scheme frontend, and then handles generating target-specific code and interacting with particular blockchains.

Building

We use plain old cabal to build glow (not stack). To build:

cabal build all

We currently develop using the GHC 9.2.x series; if your distribution ships something different, we recommend using ghcup to get an appropriate version of the compiler.

Style guidelines

Everything in this section is a guideline, not a hard-and-fast rule; don't deviate from this for no reason, but if there is a strong reason to go against this advice, just do it, don't ask permission.

Language Extensions

Using more advanced language features is OK, but make sure they're actually buying you something that's worth the extra complexity & cognitive load. Err on the side of keeping it simple.

Imports

As much as possible, import modules qualified, or import individual items from modules; do not import whole modules unqualified. This makes it easier to keep track of where identifiers are coming from.

For some kinds of code it may make sense to violate this for one or two imports, e.g. a module defining a parser might want to just import everything from several modules from megaparsec. But avoid having multiple unrelated unqualified imports in the same module; it gets hard to follow quickly.

Formatting

Use ormolu to auto-format the code. scripts/format.sh will do this for the whole codebase, but you should set up your editor to use it.

Stick to ascii; no Greek letters in variable names, use forall instead of โˆ€, etc. This rule is mainly to make sure our style is easy to actually type. The one exception to this is if you have a unicode character in a string literal, in which case the literal character is usually preferred.

glow2-haskell's People

Contributors

zenhack avatar alexknauth avatar

Stargazers

Niko avatar Zoe Braiterman avatar

Watchers

Alex Plotnick avatar  avatar  avatar MJG avatar Zoe Braiterman avatar

Forkers

zbraiterman

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.