Composable, heritable first-class states