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

Review/Eliminate Forceable #5

Closed
ivanperez-keera opened this issue Mar 5, 2015 · 4 comments
Closed

Review/Eliminate Forceable #5

ivanperez-keera opened this issue Mar 5, 2015 · 4 comments
Assignees

Comments

@ivanperez-keera
Copy link
Owner

Yampa defines a Forceable type class that implements one-level-deep NF evaluation. Default implementations are given for tuples and lists.

Instances are also given for Event and other types but, afaict, the main class function force is not used anywhere.

Maybe it should be removed? There's other, more interesting forms of forcing (namely, deepseq).

@ivanperez-keera ivanperez-keera changed the title Forceable Review/Eliminate Forceable Mar 5, 2015
ivanperez-keera added a commit that referenced this issue Jun 19, 2015
Yampa used to include its own version of deepseq, called forceable.
While code can use Forceable, it is better to rely on standard
implementations. That is why Forceable was deprecated in favour of
NFData, which defines an interchangeable interface.

This change includes a dependency on the deepseq package. The only
instance of Forceable that was included in Yampa was for Event,
which now instances NFData as well. Due to the change in API,
the version minor is increased (0.10.2).
ivanperez-keera added a commit that referenced this issue Jun 19, 2015
Yampa used to include its own version of 'deepseq', called 'Forceable'.
While code can use Forceable, it is better to rely on standard
implementations. That is why Forceable was deprecated in favour of
NFData, which defines an interchangeable interface. Forceable is
still included, but its use is discouraged and the compiler shows
a warning.

This commit includes a dependency on the deepseq package. The only
instance of Forceable that was included in Yampa was for Event,
which now instances NFData as well. Due to the change in API,
the version minor is increased (0.10.2).
ony added a commit to ony/Yampa-core that referenced this issue Jun 24, 2015
* upstream/master: (94 commits)
  Introduces dependency on DeepSeq (see ivanperez-keera#5).
  Adds changes to changelog
  Adapts tests to new API
  Adds 2 entries to changelog
  Disables test by default. Version bump.
  Version bump. Exposes more modules
  Link to hackage page
  Fixes cabal's lower bound to include test suite
  Typo
  Changelog
  Version bump. Documents changes.
  Documents changes
  Version bump
  Moves pause to separate module. Removes swap.
  Removes old code
  Removes old code
  No longer exports old stuff
  Moves code around. Simplifies modules. Marks functions as deprecated.
  Expand tabs
  Module deprecated
  Marks entries as deprecated
  Trailing space removed
  Trailing spaces removed
  Note regarding 0.9.7
  Version bump
  Notes
  Moves hlint annotations to affected functions. GHC wasn't playing along.
  Markdown
  Link to Google Play game
  Work across modules
  Introduces hlint notes and corrections
  Adds hlint test using Kmett's hlint.hs from folds
  HLint preferences
  Note on safezip
  Minor changes to alignment
  Adds documentation and minimal module.
  Minor style changes
  Documentation
  Documentation.
  Minor alignment adjustments
  Expand tabs
  Expand tabs
  Minor style changes
  Moves freezing inside switches
  Moves things around.
  SourceGraph dir should be ignored.
  Removes unused code. Makes imports explicit
  Splits core in three. Renames it as InternalCore.
  Splits core in three. Renames it as InternalCore.
  Removes useless comments
  ...
@ivanperez-keera
Copy link
Owner Author

@ivanperez-keera
Copy link
Owner Author

The only other project I could find that actively uses this is: https://github.com/ivanperez-keera/SpaceInvaders.

Complete search (on github): https://github.com/search?p=3&q=forceable+Yampa+extension%3Ahs&type=Code&utf8=%E2%9C%93

@thalerjonathan
Copy link

@ivanperez-keera thanks for the hint, but its either old prototyping code or code taken from others and added to my phd repository as examples (I haved made this explicit so that it is clear that it is not my code). So I will leave it untouched as I am not the maintainer of this code.

@ivanperez-keera
Copy link
Owner Author

Ok, thanks. Just came back to this and saw you'd already had answered this. Apparently I'm becoming senile...

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

No branches or pull requests

2 participants