[Agda] Simple DepType Pattern Matching

Wouter Swierstra wss at cs.nott.ac.uk
Sat Sep 12 20:12:10 CEST 2009


Hi Yuya,

Try the following definition:

> f : Ty unit -> Unit
> f (ty .unit) = unit


You need to use a "dot pattern" in the pattern match. You can read  
more about this on the Agda wiki:

http://wiki.portal.chalmers.se/agda/agda.php?n=Docs.DatatypeAndFunctionDefinitions

Hope this helps,

   Wouter



More information about the Agda mailing list