3 ms·
I know idris (apart from improving some haskell warts) also adds dependent types. Are there any good simple examples of dependent type use, that isnot vectors-o
by alkonaut 9y ago
I know idris (apart from improving some haskell warts) also adds dependent types. Are there any good simple examples of dependent type use, that isnot vectors-of-length-N?
- mej10 9y agoThe type safe printf implementation is pretty cool as another small example. https://github.com/mukeshtiwari/Idris/blob/master/Printf.idr https://github.com/mukeshtiwari/Idris/blob/master/Printf.idr
- nv-vn 9y agoYes. They're amazing for theorem proving (see Agda, Idris). They're also useful for refinement types, proving type class laws like for monads, etc.
- alkonaut 9y agoIs there a hello world-y example of refinement types, similar to Vectors with length?