Type Theory with Records: a General Framework for Modelling Spatial Language