File: g.fut

package info (click to toggle)
haskell-futhark 0.25.32-2
  • 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: 277
file content (7 lines) | stat: -rw-r--r-- 217 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
-- Test that size constraints on opaque types are respected.

type vec [n] = {vec: [n]i64}

entry mk_vec (n: i64) : vec [n] = {vec=iota n}

entry use_vec [n] (x: vec [n]) (y: vec [n]) = i64.sum (map2 (+) x.vec y.vec)