File: shape-params5.fut

package info (click to toggle)
haskell-futhark 0.25.27-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 17,836 kB
  • sloc: haskell: 99,384; ansic: 12,821; python: 3,394; yacc: 783; javascript: 558; sh: 550; lisp: 395; makefile: 263
file content (13 lines) | stat: -rw-r--r-- 248 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
type^ nn 'u = { f : u }

def connect '^u (a: nn u) (b: nn u) : nn (u, u) =
  { f = (a.f, a.f)
  }

def nn1 : nn ((n: i64) -> [n]i32 -> [n]i32) =
  { f = \n (xs: [n]i32) -> xs
  }

def foo = connect nn1 nn1

def main [n] (xs: [n]i32) = foo.f.0 n xs