This appendix provides a quick reference for the interactive editing commands used while building Idris programs in Atom. The emphasis is on working productively with code as it is being written, especially when defining functions, inspecting types, and refining incomplete programs.
Several commands help create and transform code structures automatically. You can add a new definition skeleton, split a function into pattern-matching cases, insert a with block for additional pattern matching, or lift a hole into a top-level function so it can be developed separately. There is also a command for replacing a hole with a case expression based on an intermediate result, which supports step-by-step program construction.
Other commands support inspection and validation during editing. You can display documentation or the type of the identifier under the cursor, reload the buffer to re-type-check it, or search for an expression that satisfies the type of a hole. Together, these shortcuts make the editor an active part of type-driven development by helping the programmer discover, test, and complete code interactively.
FAQ
What does Ctrl-Alt-A do in Idris’s Atom editing commands?It adds a skeleton definition for the name under the cursor.What is the purpose of the case split command?Ctrl-Alt-C splits a definition into pattern-matching clauses for the name under the cursor.How do I display documentation for a name in Atom while editing Idris code?Use Ctrl-Alt-D to display documentation for the name under the cursor.What does the lift hole command do?Ctrl-Alt-L lifts a hole to the top level as a new function declaration.How is the match command used in Idris interactive editing?Ctrl-Alt-M replaces a hole with a case expression that matches on an intermediate result.What happens when I reload the current buffer?Ctrl-Alt-R reloads and type-checks the current buffer.How can I search for an expression that fits a hole’s type?Use Ctrl-Alt-S, which searches for an expression that satisfies the type of the hole under the cursor.How do I check the type of the name under the cursor?Ctrl-Alt-T displays the type of the name under the cursor.What does with block insertion do?Ctrl-Alt-W adds a with block after the current line, containing a new pattern-matching clause with an extra argument.Which Atom shortcut is used to add a skeleton definition for the current name?Ctrl-Alt-A is used to add a skeleton definition for the name under the cursor.
pro $24.99 per month
access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!