He wrote
either :: (LoginError -> Text) -> (Text -> Text) -> (Either LoginError Text -> Text)
But shouldn't it be either :: (LoginError -> Text) -> (Text -> Text) -> (Either LoginError Text) -> Text