View Item 
        •   Utrecht University Student Theses Repository Home
        • UU Theses Repository
        • Theses
        • View Item
        •   Utrecht University Student Theses Repository Home
        • UU Theses Repository
        • Theses
        • View Item
        JavaScript is disabled for your browser. Some features of this site may not work without it.

        Browse

        All of UU Student Theses RepositoryBy Issue DateAuthorsTitlesSubjectsThis CollectionBy Issue DateAuthorsTitlesSubjects

        Compiling Agda to Haskell with fewer coercions

        Thumbnail
        View/Open
        Thesis.pdf (432.9Kb)
        Publication date
        2017
        Author
        Kusee, W. H.
        Metadata
        Show full item record
        Summary
        The Agda programming language is most often used as a theorem prover. Agda programs can also be compiled using the GHC backend, which translates an Agda program to a Haskell program that can be compiled by the GHC compiler. Because the Agda programming language has multiple features that are difficult to translate to Haskell automatically, the GHC backend creates simple Haskell programs that may contain type errors. Coercions (using the Haskell unsafeCoerce function) are then inserted to avoid these type errors. This thesis changes the GHC backend so that it only inserts coercions where necessary, by utilizing the type errors that GHC reports and inserting coercions at those locations. To further lower the number of needed coercions, the translation of Agda data types is improved by retaining more type information in the generated Haskell data types.
        URI
        https://studenttheses.uu.nl/handle/20.500.12932/28191
        Collections
        • Theses
        Utrecht university logo