File: stacktrace.fut

package info (click to toggle)
haskell-futhark 0.25.32-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 18,236 kB
  • sloc: haskell: 100,484; ansic: 12,100; python: 3,440; yacc: 785; sh: 561; javascript: 558; lisp: 399; makefile: 272
file content (13 lines) | stat: -rw-r--r-- 348 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- We can produce useful stack traces on errors, at least for
-- non-recursive functions.
-- ==
-- input { [1] 1 }
-- error: stacktrace.fut:7.*stacktrace.fut:9.*stacktrace.fut:11.*stacktrace.fut:13

def f (xs: []i32) (i: i32) = xs[i]

def g (xs: []i32) (i: i32) = f xs i

def h (xs: []i32) (i: i32) = g xs i

def main (xs: []i32) (i: i32) = h xs i