diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2022-10-06 10:04:14 +0300 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-12-05 14:21:53 +0200 |
| commit | d69313ce44a9415555033926c6a64b4120455502 (patch) | |
| tree | 37a9fe4bc783f4f661d5eeb78e7cb0ccc8956247 /src/Utils.hs | |
| parent | 694021a9bd1dd0420a8594ea24218c47fbbab51e (diff) | |
Add "stack trace" output on error
Diffstat (limited to 'src/Utils.hs')
| -rw-r--r-- | src/Utils.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Utils.hs b/src/Utils.hs index 8dd233f..ec8cfc8 100644 --- a/src/Utils.hs +++ b/src/Utils.hs @@ -201,6 +201,10 @@ throwL :: String -> String -> LContext a throwL p s = throwError $ LException mp s where mp = if p == "" then Nothing else Just p +appendError :: String -> LException -> LContext a +appendError as (LException psM es) = + throwError $ LException psM $ es ++ "\n " ++ as + asPairsM :: [a] -> LContext [(a, a)] asPairsM [] = return [] asPairsM (a:b:rest) = do |
