Even Wiik Thomassen  committed 93c551c

Start working on chapter on external core.

  • Participants
  • Parent commits a9e917d

Comments (0)

Files changed (4)

 \chapter{GHC's external core}
+This chapter describes \gls{ghc}'s external core functionality, its limitations
+and issues (\autoref{sec:issues}), and what needs to be done to improve it.
+External core is an external representation of the Core datastructure used in
+\gls{ghc}'s compilation process\footnote{\gls{ghc}'s compilation process can be
+seen in \mypref{fig:ghc-compilation}.}. As explained in \autoref{sec:ghc},
+\gls{ghc} desugar Haskell to Core, after which \gls{ghc}'s main optimizations
+are performed as semantics-preserving transformations on Core. The language
+that the Core datastructure implements is described in \mypref{sec:core}.
+External core representation of a Haskell source file is produced by giving
+\gls{ghc} the flag \mycode{-fext-core}. \gls{ghc} also supports parsing
+external core back into Core, and there is a Haskell package for parsing
+and working with external core called \textit{extcore}\footnote{External core
+parser package extcore:}.
+PyHaskell takes Haskell code converted to external core as input, which it
+then converts to a \gls{json} representation before it parses and evaluates
+it. PyHaskell's pipeline is explained in detail in \mypref{sec:pipeline}.
+\section{Limitations and issues}
+While Core has been improved and upgraded to different iterations of \sysf
+(currently \sysfp), external core has been neglected and drifted out of sync
+with Core. 
+%getting External Core and Core back in sync
+\section{Improvements and solutions}
+\subsection{GHC API}
+Why not GHC API.
+\section{Future work}
 While Haskell is a very large implicitly-typed language, it can be fully
-translated into Core, an explicitly-typed and statically-typed intermediate
+translated into Core, an explicitly- and statically-typed intermediate
 The theory behind Core has changed over the years, and the Core name

File pyhaskell.tex

 \section{Previous work}
 % Changeset d23acda9d37f is last before start of thesis.
 TODO: Describe in a high-level way what work has gone into it so far.
 package called extcore\footnote{extcore package: \url{}}.
 Finally the JSCore file is parsed and interpreted by PyHaskell~\cite{skrede}.
+TODO: explain and link to \mypref{ghc-optimizations} how we miss out on some,
+and unboxing is only half-done.
 second goal PyPy has developed a meta-tracing \gls{jit} that is a part of the
 RPython translation toolchain~\cite{bolz11, rigo06, bolz12}.
+TODO: Something about the PyPy interpeter.
+TODO: Something about the different RPython VMs.
 \section{Just-in-time compilation}
+First why jit.
+Second method jit and trace-based jit.
+More trace-based jit.
 % From Schillings paper:
 % Trace-based Just-in-time (TJIT) compilation [2,1] has been used successfully
 % to optimize statically typed languages such as Java [13] and C#/CIL [3] as well as