Improvement/refactorpis

This PR refactors the grammar of dependent type signatures, such as to minimise lookahead and improve error reporting.

Before this PR, any error in the type signature would result in an error location at the start of the signature, while now it should behave a bit more sensibly.