about summary refs log blame commit diff
path: root/tests/lang/eval-okay-types.nix
blob: 8cb225e247fbf6f7a33d60977e93f2c25f46c96d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                            

                        










                        
with builtins;

[ (isNull null)
  (isNull (x: x))
  (isFunction (x: x))
  (isFunction "fnord")
  (isString ("foo" + "bar"))
  (isString [ "x" ])
  (isInt (1 + 2))
  (isInt { x = 123; })
  (isBool (true && false))
  (isBool null)
  (isAttrs { x = 123; })
  (isAttrs null)
  (typeOf (3 * 4))
  (typeOf true)
  (typeOf "xyzzy")
  (typeOf null)
  (typeOf { x = 456; })
  (typeOf [ 1 2 3 ])
  (typeOf (x: x))
  (typeOf ((x: y: x) 1))
  (typeOf map)
  (typeOf (map (x: x)))
]