Stack Traces in Haskell

Examensarbete för masterexamen

Please use this identifier to cite or link to this item: https://hdl.handle.net/20.500.12380/198373
Download file(s):
File Description SizeFormat 
198373.pdfFulltext966.06 kBAdobe PDFView/Open
Type: Examensarbete för masterexamen
Master Thesis
Title: Stack Traces in Haskell
Authors: Rouhani-Kalleh, Arash
Abstract: This thesis presents ideas for how to implement Stack Traces for the Glasgow Haskell Compiler. The goal is to come up with an implementation with such small overhead that organizations do not hesitate to use it for their binaries running in production. Since the implementation is aiming for efficiency it will be heavily tied to only GHC. This work has been made possible thanks to a very recent contribution [1] that implements debug data for binaries compiled with GHC. Thanks to that contribution, this thesis can almost entirely focus on managing the GHC stack. Three different designs of stack values is presented, they allow creation in constant time and we implement one of these designs. The overhead of these designs can be kept small by utilizing laziness and the special linked list structure of the GHC stack. The other contribution is the work on the Haskell API that is exposed to programmers. We have implemented an API where the Haskell programmer can create the stack value at will and examine its content. Different ways of incorporating stack traces into the catching and throwing mechanism have been analyzed and we have found a rethrowing semantics for Haskell that is backwards compatible, convenient to use and easy to implement in GHC. The design in this paper allows stack values to be first class values.
Keywords: Data- och informationsvetenskap;Informations- och kommunikationsteknik;Computer and Information Science;Information & Communication Technology
Issue Date: 2014
Publisher: Chalmers tekniska högskola / Institutionen för data- och informationsteknik (Chalmers)
Chalmers University of Technology / Department of Computer Science and Engineering (Chalmers)
URI: https://hdl.handle.net/20.500.12380/198373
Collection:Examensarbeten för masterexamen // Master Theses



Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.