Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain what type errors have to do with purity #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gelisam
Copy link

@gelisam gelisam commented Feb 15, 2015

To someone who isn't yet familiar with Haskell's syntax, the string
concatenation example looks like the type error is that a string is
being concatenated with a function. Here is an example which better
explains how using an IO computation in a pure context can lead to a
type error.

As a bonus, the new text no longer claims that "you cannot mix and match
purity with impurity". It's not true: we can mix them, but the result
must be marked as impure.

To someone who isn't yet familiar with Haskell's syntax, the string
concatenation example looks like the type error is that a string is
being concatenated with a function. Here is an example which better
explains how using an IO computation in a pure context can lead to a
type error.

As a bonus, the new text no longer claims that "you cannot mix and match
purity with impurity". It's not true: we can mix them, but the result
must be marked as impure.
@chrisdone
Copy link
Member

Cool. Content sounds good from looking at the commit, I'll pull it to check the size before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants