Skip to content
  • Zhou Fangyi's avatar
    Data.Maybe: add callstack for fromJust (Trac #15559) · 614028e3
    Zhou Fangyi authored and Ben Gamari's avatar Ben Gamari committed
    Per feature request, add `HasCallStack` to `fromJust` in `Data.Maybe`
    and use `error` instead of `errorWithoutStackTrace`. This allows
    `fromJust` to print call stacks when throwing the error.
    
    Also add a new test case for the behaviour, modify existing test cases
    for new signature
    
    Test Plan: New test cases
    
    Reviewers: hvr, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: ulysses4ever, rwbarton, carter
    
    GHC Trac Issues: #15559
    
    Differential Revision: https://phabricator.haskell.org/D5256
    614028e3