Like this:
import Control.Applicative
-- rest of imports as in question
data List a = Nil | Cons a (List a)
deriving Show -- for testing
-- definition of list as in question
parseList :: Parser (List Int)
parseList = foldr Cons Nil <$> many (decimal <* endOfLine)
Testing in GHCi:
*Main> parse parseList list
Done "" Cons 0 (Cons 1 (Cons 2 (Cons 5 Nil)))