Skip to content

HasCallstack #1

@unhammer

Description

@unhammer

Nice guide! Regarding https://github.com/keithfancher/haskell-notes/blob/master/haskell-notes.md#stack-traces
you may be interested in
HasCallStack
(also a blog post if you prefer those over manuals)
This does require annotating functions with an extra constraint, but I find it useful for things at the edges of the system (DB, network calls).

(Someone made a plugin that automatically adds it, I haven't tried.)

As of 9.10, ghc automatically adds traces to exceptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions