-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Comments
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).
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).
* 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 ...
Just so you know, @thalerjonathan, the class |
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 |
@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. |
Ok, thanks. Just came back to this and saw you'd already had answered this. Apparently I'm becoming senile... |
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 functionforce
is not used anywhere.Maybe it should be removed? There's other, more interesting forms of forcing (namely, deepseq).
The text was updated successfully, but these errors were encountered: