summary refs log tree commit diff stats
path: root/lib/prelude.nim
Commit message (Expand)AuthorAgeFilesLines
* add sequtils to prelude (#16431)shadowninja552020-12-231-2/+2
* improve docs for prelude (#16135)flywind2020-11-261-10/+11
* Fix Prelude (#15714)Juan Carlos2020-10-261-1/+2
* Improve prelude so it does not hijacks documentation when used (#15299)Juan Carlos2020-09-111-12/+10
* Nimrod renamed to NimAraq2014-08-281-2/+2
* Nimrod renamed to NimAraq2014-08-281-1/+1
* Removes executable bit for text files.Grzegorz Adam Hankiewicz2013-03-161-0/+0
* year 2012 for most copyright headersAraq2012-01-021-1/+1
* preparations for 0.8.12Araq2011-07-101-0/+0
* bugfix: endless loop in parser; added sphinx wrapperAraq2011-06-141-2/+2
* first steps to thread local heapsAraq2011-06-021-0/+23
5

                                      
















                                        
 


                                                   
           
 
discard """
  output: '''TMatrix[3, 3, system.int]
3'''
"""

import typetraits

type
  TMatrix*[N,M: static[int], T] = object
    data*: array[0..N*M-1, T]

  TMat2[T] = TMatrix[2,2,T]

proc echoMatrix(a: TMatrix) =
  echo a.type.name
  echo TMatrix.N

proc echoMat2(a: TMat2) =
  echo TMat2.M

var m = TMatrix[3,3,int](data: [1,2,3,4,5,6,7,8,9])

echoMatrix m
#echoMat2 m