\documentclass[DIV16,twocolumn,10pt]{scrreprt}
\usepackage{paralist}
\usepackage{graphicx}
\usepackage[final]{hcar}

%include polycode.fmt

\begin{document}

\begin{hcarentry}{(GHC Status Report)}
\report{the GHC developers}
\status{GHC developments continues to race forward with exciting news abounding.}
\makeheader

GHC development churns onward --- and \textbf{GHC 8.0 is right around the corner!}
The final set of bugs are being fixed, and we hope to have a final release
candidate, followed by the final release, in just a few weeks. More exciting
developments await for 8.2 and beyond.

\subsubsection{Major changes in GHC 8.0.1}

GHC 8.0.1, the first release in the 8.0 series, will be released in May 2016.
While this is significantly later than expected, we think that the features that
this release brings should be well worth the wait. These include,

\begin{itemize}
  \item \textbf{Support for simple, implicit callstacks with source locations}\footnote{\url{http://ghc.haskell.org/trac/ghc/wiki/ExplicitCallStack/ImplicitLocations}}
    Implicit parameters providing callstacks/source locations, allowing you to
    have a light-weight means of getting a call-stack in a Haskell application.

  \item \textbf{Injective type families}
    (Wiki\footnote{\url{http://ghc.haskell.org/trac/ghc/wiki/InjectiveTypeFamilies}},
    paper\footnote{\url{http://research.microsoft.com/en-us/um/people/simonpj/papers/ext-f/injective-type-families-acm.pdf}}).
    Allows to annotate type families with injectivity information. Correctness of
    injectivity annotation is then verified by the compiler. Once compiler knows the
    annotation is correct it can us injectivity information during type checking.

  \item \textbf{Applicative do notation}.
    With the new \texttt{-XApplicativeDo} extension, GHC tries to desugar \texttt{do}-notation
    to \texttt{Applicative} where possible, giving a more convenient sugar for
    many common \texttt{Applicative} expressions. See the
    draft paper\footnote{\url{http://research.microsoft.com/en-us/um/people/simonpj/papers/list-comp/applicativedo.pdf}}
    and GHC Wiki\footnote{\url{http://ghc.haskell.org/trac/ghc/wiki/ApplicativeDo}} for details.

  \item A \textbf{beautiful new users guide}\footnote{\url{http://downloads.haskell.org/~ghc/8.0.1-rc4/docs/html/users_guide/}}.
    Now rewritten in reStructured
    Text, and with significantly improved output and documentation.

  \item \textbf{Visible type application}.
    This allows you to say, for example, \texttt{id @Bool} to specialize
    \texttt{id} to \texttt{Bool -> Bool}. With this feature, proxies are needed only
    in data constructors for pattern matching. Visible type patterns are due to be
    included sometime in the indeterminate future. See the
    Wiki\footnote{\url{http://ghc.haskell.org/trac/ghc/wiki/ExplicitTypeApplication}}
    for details.

  \item \textbf{Kind Equalities}, which form the first step to building
    Dependent Haskell. This feature enables promotion of GADTs to kinds, kind
    families, heterogeneous equality (kind-indexed GADTs), and \texttt{* :: *}.
    See the Wiki\footnote{\url{http://ghc.haskell.org/trac/ghc/wiki/DependentHaskell/Phase1}}
    for more information.

  \item \textbf{Record system enhancements}. A new extension
    \texttt{DuplicateRecordFields} will be available in GHC 8.0, allowing
    multiple uses of the same field name with a very limited form of type-directed
    name resolution. Support for polymorphism over record fields is being worked on;
    another provisional new extension \texttt{OverloadedLabels} represents a first
    step in this process. See the GHC
    Wiki\footnote{\url{http://ghc.haskell.org/trac/ghc/wiki/OverloadedRecordFields}}
    for details.

  \item A huge improvement to \textbf{pattern match checking} (including much
    better coverage of GADTs), based on the work of Simon PJ and Georgios
    Karachalias. For more details, see their paper
    \footnote{\url{https://people.cs.kuleuven.be/~george.karachalias/papers/p424-karachalias.pdf}}
    with Tom Schrijvers and Dimitrios Vytiniotis. More information can be
    found in the GHC Wiki\footnote{\url{http://ghc.haskell.org/trac/ghc/wiki/PatternMatchCheck}}.

  \item \textbf{Custom type errors}, allowing library authors to offer more
    descriptive error messages than those offered by GHC. See the
    proposal\footnote{\url{http://ghc.haskell.org/trac/ghc/wiki/Proposal/CustomTypeErrors}}
    for more details.)

  \item \textbf{Improved generics representation} leveraging type-level
    literals. This makes \texttt{GHC.Generics} more expressive and uses new type
    system features to give more natural types to its representations.

  \item A new \textbf{DeriveLift language extension}, allowing the \texttt{Lift}
    type class from \texttt{Language.Haskell.TH.Syntax} to be derived automatically.
    This was introduced in the spirit of \texttt{DeriveDataTypeable} and
    \texttt{DeriveGeneric} to allow easier metaprogramming, and to allow users to
    easily define \texttt{Lift} instances without needing to depend on the existence
    of Template Haskell itself (see \#1830).

  \item \textbf{More Backpack improvements}. There's a new user-facing syntax
    which allows multiple modules to be defined a single file, and we're hoping to
    release at least the ability to publish multiple "units" in a single Cabal file.

  \item \textbf{Support for DWARF-based stacktraces}\footnote{\url{http://ghc.haskell.org/trac/ghc/wiki/DWARF}}. Haskell has at long last
    gained the ability to collect stack-traces of running programs. While still
    experimental, \texttt{base} now includes an interface which user code can use to
    request a representation of the current execution stack when running on a
    supported machine (currently Linux x86-64). Furthermore, the runtime system will
    now provide a backtrace of the currently running thread when thrown a
    \texttt{SIGUSR2} signal. Note that this functionality is highly experimental and
    there are some known issues which can potentially threaten the stability of the
    program.

  \item \textbf{Remote GHCi}\footnote{\url{http://ghc.haskell.org/trac/ghc/wiki/RemoteGHCi}}. The
    \texttt{-fexternal-interpreter} flag tells GHC to run interpreted code in a
    separate process. This provides various benefits, including allowing the
    interpreter to run profiled code (for example), thereby gaining access to
    stack traces\footnote{\url{http://simonmar.github.io/posts/2016-02-12-Stack-traces-in-GHCi.html}}
    in GHCi.

  \item GHC now supports \textbf{environment files}. This is not any fundamental
    new capability but may prove to be a useful convenience. Build systems like
    Cabal call GHC with flags that define an (ephemeral) package environment, such
    as \texttt{-hide-all-packages -package-db=... -package this -package that}. An
    environment file lets the same information be stashed persistently in a file
    that GHC will pick up and use automatically. In principle this allows tools such
    as \texttt{Cabal} to generate an environment file and then you can use
    \texttt{ghc} or \texttt{ghci} directly and get the package environment of your
    project, rather than the default global environment. In addition to environments
    that live in a particular directory, it is possible to make a default global
    environment, or different global environments for different shell sessions.
    See the ``Package environments'' section of the GHC users
    manual\footnote{\url{http://downloads.haskell.org/~ghc/8.0.1-rc4/docs/html/users_guide//packages.html\#package-environments}}
    for more information.

  \item A new \textbf{Strict language extension}\footnote{\url{http://ghc.haskell.org/trac/ghc/wiki/StrictPragma}},
    allowing modules to be compiled such that local bindings are evaluated eagerly.
    Implemented by Adam Sandberg Eriksson based on an proposal by Johan Tibell.

  \item Significant improvements in cross-platform support, including a variety
    of fixes to \textbf{Windows linker support}, great
    improvements in \textbf{reliability on ARM} (GHC
    \#11206\footnote{\url{https://ghc.haskell.org/trac/ghc/ticket/11206}} and others), revived
    \textbf{unregisterised m68k support}\footnote{\url{https://trofi.github.io/posts/191-ghc-on-m68k.html}},
    and new support for \textbf{AIX targets} (Herbert) and Linux
    \textbf{PowerPC 64-bit big- and little-endian native code generation}.

  \item Improved support for \textbf{pattern synonyms}, including record syntax
    (GHC \#8582\footnote{\url{https://ghc.haskell.org/trac/ghc/ticket/8582}})
    and the ability to associate pattern synonyms with type constructors on
    export, implemented by Matthew Pickering. See Matthew's
    blog\footnote{\url{http://mpickering.github.io/posts/2015-12-12-pattern-synonyms-8.html}}
    for details.

\end{itemize}

\subsubsection{Upcoming plans for GHC 8.2}

With the super-major GHC 8.0 release out the door, plans have begun to form for the next major release, 8.2. Given that 8.0 saw a remarkable amount of churn, we hope to make the focus of 8.2 consolidation, stabilization, and optimization.  For this reason, we hope you'll note there are relatively few ''new'' features in the lists below; instead we'd like to encourage contributors to polish, optimize, document, refactor, or finish the features we already have.

Of course, GHC only evolves because of its contributors. Please let us know if you have a pet project that you'd like to see merged!

\paragraph{Libraries, source language, type system}

\begin{itemize}
  \item \textbf{Indexed \texttt{Typeable} representations} (Ben Gamari, Simon Peyton Jones, et al). While GHC has long supported runtime type reflection through the \texttt{Typeable} typeclass, its current incarnation requires care to use, providing little in the way of type-safety. For this reason the implementation of types like \texttt{Data.Dynamic} must be implemented in terms of \texttt{unsafeCoerce} with no compiler verification.

  GHC 8.2 will address this by introducing indexed type representations,
  leveraging the type-checker to verify programs using type reflection. This
  allows facilities like \texttt{Data.Dynamic} to be implemented in a fully
  type-safe manner. See the paper
  \footnote{\url{http://research.microsoft.com/en-us/um/people/simonpj/papers/haskell-dynamic/}}
  for an description of the proposal and the
  Wiki\footnote{\url{https://ghc.haskell.org/trac/ghc/wiki/Typeable/BenGamari}}
  for the current status of the implementation.

  \item Backpack continues its march forward (Edward Z Yang)
  \item Merge \texttt{Bifoldable} and \texttt{Bitraversable} into \texttt{base} (Edward Kmett, Ryan Scott)
  \item Generalize the \texttt{deriving} algorithms for \texttt{Eq}, \texttt{Functor}, etc. to be able to derive the data types in \texttt{Data.Functor.Classes} (\texttt{Eq1}, \texttt{Eq2}, etc.), \texttt{Bifunctor}, \texttt{Bifoldable}, and \texttt{Bitraversable} (Ryan Scott)
  \item Deriving strategies (Ryan Scott): grant users the ability to choose explicitly how a class should be \texttt{derived} (using a built-in algorithm, \texttt{GeneralizedNewtypeDeriving}, \texttt{DeriveAnyClass}, or otherwise), addressing \#10598.
  \item Exhaustiveness checking for \texttt{EmptyCase}s, addressing \#10746. 
\end{itemize}

\paragraph{Back-end and runtime system}

\begin{itemize}
  \item Compact regions (Giovanni Campagna, Edward Yang,
    This runtime system
    feature allows a referentially "closed" set of heap objects to be collected
    into a "compact region", allowing cheaper garbage collection, heap-object
    sharing between processes, and the possibility of inexpensive serialization.
    See the patch\footnote{\url{https://phabricator.haskell.org/D1264}} and
    paper\footnote{\url{http://ezyang.com/papers/ezyang15-cnf.pdf}} for more information.

  \item Refactoring and improvements to the cost-center profiler (Ben Gamari): Allow heap profiler samples to be directed to the GHC eventlog, allowing correlation with other program events, enabling easier analysis by tooling and eventual removal of the old, rather crufty \texttt{.hp} profile format. 

  \item Further improvements to debugging information (Ben Gamari): There are still a number of outstanding issues with GHC's DWARF implementation, some of which even carry the potential to crash the runtime system during stacktrace collection. GHC 8.2 will hopefully have these issues resolved, allowing debugging information to be used by end-user code in production.

  With stable stack unwinding support comes a number of opportunities for new serial and parallel performance analysis tools (e.g. statistical profiling) and debugging. As GHC's debugging information improves, we expect to see tooling developed to support these applications. See the DWARF status page\footnote{\url{https://ghc.haskell.org/trac/ghc/wiki/DWARF/80Status}} for futher information.

  \item Support for NUMA systems (Simon Marlow, in progress\footnote{\url{https://github.com/simonmar/ghc/tree/numa}}).  The aim is to reduce the number of remote memory accesses for multi-socket systems that have a mixture of local and remote memory.

  \item Experimental changes to the scheduler (Simon Marlow, in progress\footnote{\url{https://github.com/simonmar/ghc/commit/7e05ec18b4eda8d97e37015d415e627353de6b50}}) that enable the number of threads used for GC to be lower than the \texttt{-N} setting.
\end{itemize}

\paragraph{Frontend, build system and miscellaneous changes}

\begin{itemize}
  \item New Shake-based build system, \texttt{hadrian}, will be merged.  (Andrey Mokhov)
  \item The improved LLVM backend plan plan didn't make
    the cut for 8.0, but will for 8.2. See the GHC Wiki\footnote{\url{http://ghc.haskell.org/trac/ghc/wiki/ImprovedLLVMBackend}} for details. (Austin Seipp)
\end{itemize}

\subsubsection{Development updates and acknowledgments}

2015 has been a remarkable year for GHC development. Over the last twelve months the GHC repository gained nearly 2500 commits by over one hundred authors. Of these authors, nearly half are first-time contributors. At the time of writing alone alone there is over one dozen open and actively updated differentials on Phabricator. It seems fair to say that GHC's development community is stronger than ever.

We have been very lucky to have Thomas Miedema, who has devoted countless hours triaging bugs, cleaning up the build system, advising new contributors, and generally helping out in a multitude of ways which often go un-noticed. We all have benefited immensely from Thomas' hard work and generosity; thanks Thomas!

Another contributor deserving of recognition is Herbert Valerio Riedel, who meticulously handles many of the finer details of GHC development: over the past year Herbert has spent numerous weekends thinking through compatibility considerations for library and warning changes, managing GHC's interaction with its external core libraries, cleaning up GHC's build system, and maintaining his invaluable PPA repository for Ubuntu and Debian-based systems. Our releases wouldn't be nearly as smooth without Herbert's attention to detail.

On the Windows front, Tamar Christina has been doing amazing work cleaning up the many nooks that have gone unattended until now. His work on the runtime linker should mean that GHC 8.0 will be considerably more reliable when linking against many Windows libraries.

The past year has brought a number of new contributors: Ryan Scott and Michael Sloan have picked up various generics and Template Haskell projects, Andrew Farmer has contributed a number of fixes to the cost-centre profiler, and Bartosz Nitka has made numerous contributions improving compiler determinism. We also also saw the beginnings of some very interesting work from Ömer Sinan Ağacan, who is looking at teaching GHC to unpack sum types. David Lupochainsky and Herbert Valerio Riedel have also started honing GHC's warnings system by both bringing consistency to the currently rather organic flags and making the messages themselves more informative. George Karachalias merged his full rewrite of the pattern match checker, which is now far more precise than GHC's previous implementation.

In recent years the growth of the Haskell community has required that we better develop our infrastructure for change management. This lead to the formation of the Core Libraries Committee, which is now in its third year. As such, we are now beginning to see some of the committee's efforts come to fruition. With GHC 8.0 progress was made on all three active proposals:

\begin{itemize}
 \item \texttt{Semigroup}-\texttt{Monoid} proposal: the \texttt{Data.Semigroup} module is now available in \texttt{base} and there are now opt-in warnings for missing \texttt{Semigroup} instances in preparation for the eventual addition of \texttt{Semigroup} as a superclass of \texttt{Monoid}

 \item \texttt{MonadFail} proposal: the \texttt{Control.Monad.Fail} module is available in \texttt{base} and a \texttt{-XMonadFailDesugaring} language extension has been introduced, allowing users to use the new class in \texttt{do} desugaring
 
 \item \texttt{ExpandFloating} proposal: \texttt{expm1}, \texttt{log1p}, \texttt{log1pexp}, \texttt{log1mexp} have been added to the \texttt{Floating} class with defaults
\end{itemize}

We are also excited to see the revitalization of the Haskell Prime process with the formation of the Haskell 2020 committee. This committee will attempt to formalize some of the better-understood GHC language extensions and introduce them into the language standard. We look forward to watching this process progress.

Finally, GHC HQ would like to thank Futureice GmbH for the donation of a Mac Mini to
the project. This machine will be used for continuous integration and general
testing on Mac OS X targets. Thanks Futureice!

Of course, GHC has also benefited from countless more contributors who we don't have room to acknowledge here. We'd like to thank everyone who has contributed patches, bug reports, code reviews, and discussion to the GHC community over the last year. GHC only improves through your efforts!


\FurtherReading
\begin{itemize}
  \item GHC website: 

     \url{http://haskell.org/ghc/}
  \item GHC users guide:

     \url{http://downloads.haskell.org/~ghc/master/users_guide/}
  \item \texttt{ghc-devs} mailing list:
  
     \url{https://mail.haskell.org/mailman/listinfo/ghc-devs}
\end{itemize}

\end{hcarentry}

\end{document}
