The standard prelude contains
the : (a : Type) -> (value: a) -> a the _ = id
which can be used to provide explicit types:
the Integer 10 the Nat 6 the (Vect 3 Int) [1,2,3]
Here also with [namespace] [expr] , which grants namespace privileges inside expr . It seems closer to % , but the more commonly used.
with Vect [['a', 'b']] -- Vect 1 (Vect 2 Char) with List [['a', 'b']] -- List (List Char)
You can do the syntax extension for the :
syntax [expr] "%" [type] = the type expr 5%Nat 10%Int
But not for with .
source share