haskell / haskell/text

lines is not equivalent to (splitOn "\n")

Open
#270 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
Haskell
Stars
421
Forks
163
PR merge metrics
No merged PRs in 30d

Description

```
λ> Data.Text.lines "\n"
[""]
λ> Data.Text.splitOn "\n" "\n"
["",""]
```

This surprised me a bit. I think it should be documented at least.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the documented behavior of Data.Text.lines and Data.Text.splitOn, using the examples in the issue as the reference case. Document why the two functions differ for a trailing newline, and confirm that the examples and explanation accurately describe the observed results.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.