In Idris, one can explicitly name arguments in function type declarations, like
length : (str : String) -> Nat
But when I try to name the return value, like in
length : (str : String) -> (lengthOfStr : Nat)
the idris compiler throws an error
unexpected end of input expecting "->"
Why doesn't the same syntax for naming arguments work for return values? Is there a way to name return values in Idris (so they can be referenced in the doc-string)?