GithubHelp home page GithubHelp logo

bgamari / haskell-src-exts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haskell-suite/haskell-src-exts

0.0 3.0 0.0 955 KB

Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer

License: Other

Haskell 100.00% Shell 0.01%

haskell-src-exts's Introduction

Haskell Source Extensions

haskell-src-exts is a package for handling and manipulating Haskell source code. It is a descendant of the haskell-src package that is part of the standard libraries, but extends this to support a number of syntactic extensions, e.g. MPTCs, fundeps, GADTs, TH etc. The aim is to support all extensions recognized by the community, as determined by what is implemented in compilers and tools.

Apart from the more standard extensions supported by e.g. GHC, haskell-src-exts provides support for HaRP (Haskell Regular Patterns) and HSX (Haskell Source with XML) syntax.

Package structure

The modules that comprise haskell-src-exts all reside in the hierarchic namespace Language.Haskell.Exts, or its more feature-rich sibling Language.Haskell.Exts.Annotated. Notable exposed modules include:

  • Language.Haskell.Exts[.Annotated] - Imports and re-exports all the below, and also defines some functions that combine functionality from several modules.
  • Language.Haskell.Exts[.Annotated].Syntax - The abstract syntax tree that the other modules work on.
  • Language.Haskell.Exts[.Annotated].Build - Combinators for building abstract syntax.
  • Language.Haskell.Exts[.Annotated].Parser - Functions for parsing Haskell source code into an abstract syntax representation.

Non-comprehensive list of supported extensions

  • Multi-parameter type classes (MPTCs)
  • Functional dependencies
  • Associated types, type families
  • Liberal class and instance heads
  • Implicit parameters (ghc and hugs)
  • Explicit kind signatures
  • Pattern guards
  • Generalized algebraic data types (GADTs)
  • Template Haskell (TH)
  • Universal and existential quantification (forall)
  • Empty data type declarations
  • Unboxed tuples (# #)
  • Standalone deriving
  • Regular patterns
  • Haskell XML, HSX style
  • Pragmas

As-of-yet unsupported extensions:

  • Constraint kinds
  • do-rec notation
  • Multi-way if statements
  • Lambda-case

Portability and dependencies

The package itself is Haskell98-compliant and should build with any Haskell compiler.

License

The haskell-src-exts Package is distributed under a derived BSD-style license. It derives from several sources, all of which are distributable under BSD-style or compatible licenses. See the file LICENSE for the complete license text.

haskell-src-exts's People

Contributors

niklasbroberg avatar unkindpartition avatar hesselink avatar meiersi avatar greenrd avatar bgamari avatar asr avatar phischu avatar saizan avatar aslatter avatar bsl avatar josefs avatar ndmitchell avatar nh2 avatar samb avatar skogsbaer avatar facundominguez avatar gnomnain avatar gracjan avatar eclipsefp avatar

Watchers

James Cloos avatar  avatar  avatar

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.