Miscellaneous Idris code