A flan is a tart, a type of pie, with a base of shortcrust pastry. An example is a quiche. In both savoury and sweet flans the filling tends to be based on a thick custard. However there are some types of flans not based on custard, such as the bakewell tart. The British savoury flans may have diverged from the sweeter Spanish flans in the Middle Ages.