concept Refine in category idris

appears as: Refine
Type-Driven Development with Idris

This is an excerpt from Manning's book Type-Driven Development with Idris.

  • Refine— Notice that the input and output types for your addition function allow you to give invalid inputs with different dimensions, and then make the type more precise by including the dimensions of the matrices.
  • Refine— Improve an existing definition either by filling in a hole or making its type more precise.
  • Refine— Try an expression search on ?insSort_rhs_1, leading to this:
    insSort : Vect n elem -> Vect n elem
    insSort [] = []
    insSort (x :: xs) = ?insSort_rhs_2
    A sorted empty vector is itself an empty vector, as expected.