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

Export a type alias for the core set of Pux effects #20

Merged

Conversation

damncabbage
Copy link
Contributor

(For the sake of reuse and convenience.)

When an app developer writes their own app effects type alias, eg.

type AppEffects eff = (log :: CONSOLE | eff)

... This allows two things:

  • main to have a type using (CoreEffects (AppEffects eff)).
  • Individual update functions to, if the shortcut is appropriate, have only (AppEffects eff), to avoid the common problem where PureScript complains about getting two instances of channel or exception if an update function is declared with either.

(I mention only having one App effect-set above, but in reality I'd have a few finer-grained aliases.)

…ype alias.

When an app developer writes their own effects type alias, eg.

  type AppEffects eff = (log :: CONSOLE | eff)

... This allows two things:

* `main` to have a type using `(CoreEffects (AppEffects eff))`.
* Individual `update` functions to, if the shortcut is appropriate,
  have *only* `(AppEffects eff)`, to avoid the common problem where
  PureScript complains about getting two instances of `channel` or
  `exception` if an `update` function is declared with either.
@damncabbage
Copy link
Contributor Author

I honestly can't figure out what the build error is. Even following the "This log is too long to be displayed. Please reduce the verbosity of your build or download the raw log" instructions to see the raw log, I can't get to the end of the list. npm test runs fine locally.

@alexmingoia
Copy link
Owner

Thanks for this! I like it. Don't worry about the test, Travis is really weird with purescript for a number of reasons.

@alexmingoia alexmingoia merged commit 66e654b into alexmingoia:master Apr 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants