Closed 414owen closed 3 years ago
λ> show $ fromNonEmpty [1, 2, 3] "fromNonEmpty 1 :| [2,3]" λ> read @(DNonEmpty Int) $ show $ fromNonEmpty [1, 2, 3] fromNonEmpty *** Exception: Prelude.read: no parse
λ> show (fromNonEmpty [1, 2, 3 :: Int]) "fromNonEmpty (1 :| [2,3])" λ> read @(DNonEmpty Int) $ show $ fromNonEmpty [1, 2, 3] fromNonEmpty (1 :| [2,3])
Full disclosure: this change is ported directly from dlist-nonempty.
Thanks for that! Would you mind adding a test for that case?
Previous behaviour
New behaviour
Full disclosure: this change is ported directly from dlist-nonempty.