mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-12-30 00:04:55 +03:00
666373e9db
See test idris2/basic035; implicitly binds an auto-implicit for interfaces if no name is given, or an implicit argument if a name is given.
20 lines
386 B
Idris
20 lines
386 B
Idris
import Data.Vect
|
|
|
|
using (Show a, Eq a)
|
|
foo : a -> String
|
|
foo x = show x ++ show x
|
|
|
|
bar : Int -> Int
|
|
bar x = x + x
|
|
|
|
using (xs : Vect n a, n : Nat) -- get reordered in dependency order by
|
|
-- the usual implicit rules
|
|
baz : xs = xs
|
|
|
|
data Test : Type -> Type -> Type where
|
|
|
|
using (Test a b)
|
|
needle : a -> b -> ()
|
|
nardle : a -> ()
|
|
noo : b -> ()
|