concept Ctrl - Alt - C in category idris

appears as: Ctrl-Alt-C
Type-Driven Development with Idris

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

When you press Ctrl-Alt-C in Atom with the cursor over a variable on the left side of a definition, it performs a case split on that variable, giving the possible patterns the variable can match. But where do these patterns come from?

  • Define— Case-split on xs with Ctrl-Alt-C, leading to this:
    insSort : Vect n elem -> Vect n elem
    insSort [] = ?insSort_rhs_1
    insSort (x :: xs) = ?insSort_rhs_2