Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1596638.1596654acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Finding the needle: stack traces for GHC

Published: 03 September 2009 Publication History
  • Get Citation Alerts
  • Abstract

    Even Haskell programs can occasionally go wrong. Programs calling head on an empty list, and incomplete patterns in function definitions can cause program crashes, reporting little more than the precise location where error was ultimately called. Being told that one application of the head function in your program went wrong, without knowing which use of head went wrong can be infuriating. We present our work on adding the ability to get stack traces out of GHC, for example that our crashing head was used during the evaluation of foo, which was called during the evaluation of bar, during the evaluation of main. We provide a transformation that converts GHC Core programs into ones that pass a stack around, and a stack library that ensures bounded heap usage despite the highly recursive nature of Haskell. We call our extension to GHC StackTrace.

    Supplementary Material

    JPG File (findingtheneedle.jpg)
    MP4 File (findingtheneedle.mp4)

    References

    [1]
    T. Allwood, S. P. Jones, and S. Eisenbach. Explicit call stack paper resources. http://code.haskell.org/explicitCallStackPaper/.
    [2]
    A. Gill and C. Runciman. Haskell program coverage. In G. Keller, editor, Haskell, pages 1--12. ACM, 2007.
    [3]
    G. U. Guide. The ghci debugger. http://www.haskell.org/ghc/docs/latest/html/users_guide/ghci-debugger.h%tml.
    [4]
    S. P. Jones and P. Wadler. A static semantics for haskell. Draft paper, Glasgow, 91.
    [5]
    S. Marlow, J. Iborra, B. Pope, and A. Gill. A lightweight interactive debugger for haskell. In G. Keller, editor, Haskell, pages 13--24. ACM, 2007.
    [6]
    J. Meacham. Jhc. http://repetae.net/computer/jhc/jhc.shtml.
    [7]
    W. Partain. The nofib benchmark suite of haskell programs. In J. Launchbury and P. M. Sansom, editors, Functional Programming, Workshops in Computing, pages 195--202. Springer, 1992.
    [8]
    P. Sansom and S. Peyton Jones. Formally based profiling for higher-order functional languages. ACM Transactions on Programming Langauges and Systems, 19(1), 1997.
    [9]
    M. Sulzmann, M. M. T. Chakravarty, S. L. P. Jones, and K. Donnelly. System F with type equality coercions. In F. Pottier and G. C. Necula, editors, TLDI, pages 53--66. ACM, 2007.
    [10]
    G. Trac. Annotations. http://hackage.haskell.org/trac/ghc/wiki/Annotations.
    [11]
    M. Wallace, O. Chitil, T. Brehm, and C. Runciman. Multiple-view tracing for Haskell: a new Hat. In R. Hinze, editor, Preliminary Proceedings of the 2001 ACM SIGPLAN Haskell Workshop, pages 151--170, Firenze, Italy, Sept. 2001. Universiteit Utrecht UU-CS-2001-23. Final proceedings to appear in ENTCS 59(2).

    Cited By

    View all
    • (2023)CSI: Haskell - Tracing Lazy Evaluations in a Functional LanguageProceedings of the 35th Symposium on Implementation and Application of Functional Languages10.1145/3652561.3652562(1-13)Online publication date: 29-Aug-2023
    • (2015)Algorithmic debugging of real-world haskell programs: deriving dependencies from the cost centre stackACM SIGPLAN Notices10.1145/2813885.273798550:6(33-42)Online publication date: 3-Jun-2015
    • (2015)Algorithmic debugging of real-world haskell programs: deriving dependencies from the cost centre stackProceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/2737924.2737985(33-42)Online publication date: 3-Jun-2015
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    Haskell '09: Proceedings of the 2nd ACM SIGPLAN symposium on Haskell
    September 2009
    148 pages
    ISBN:9781605585086
    DOI:10.1145/1596638
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 03 September 2009

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. debugging
    2. stack trace

    Qualifiers

    • Research-article

    Conference

    ICFP '09
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 57 of 143 submissions, 40%

    Upcoming Conference

    ICFP '24

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)5
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 10 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)CSI: Haskell - Tracing Lazy Evaluations in a Functional LanguageProceedings of the 35th Symposium on Implementation and Application of Functional Languages10.1145/3652561.3652562(1-13)Online publication date: 29-Aug-2023
    • (2015)Algorithmic debugging of real-world haskell programs: deriving dependencies from the cost centre stackACM SIGPLAN Notices10.1145/2813885.273798550:6(33-42)Online publication date: 3-Jun-2015
    • (2015)Algorithmic debugging of real-world haskell programs: deriving dependencies from the cost centre stackProceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/2737924.2737985(33-42)Online publication date: 3-Jun-2015
    • (2011)High coverage testing of Haskell programsProceedings of the 2011 International Symposium on Software Testing and Analysis10.1145/2001420.2001465(375-385)Online publication date: 17-Jul-2011
    • (2011)From stack traces to lazy rewriting sequencesProceedings of the 23rd international conference on Implementation and Application of Functional Languages10.1007/978-3-642-34407-7_7(100-115)Online publication date: 3-Oct-2011
    • (2010)Experience reportACM SIGPLAN Notices10.1145/1932681.186359545:9(369-374)Online publication date: 27-Sep-2010
    • (2010)Experience reportProceedings of the 15th ACM SIGPLAN international conference on Functional programming10.1145/1863543.1863595(369-374)Online publication date: 27-Sep-2010
    • (2010)Do stack traces help developers fix bugs?2010 7th IEEE Working Conference on Mining Software Repositories (MSR 2010)10.1109/MSR.2010.5463280(118-121)Online publication date: May-2010

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media