From ca212d7b1322fde84caec3d7c16c1ba48deab60e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Such=C3=A1nek?= Date: Thu, 26 Mar 2026 06:36:41 +0000 Subject: [PATCH 1/2] Add links checking --- .github/workflows/links.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/links.yaml diff --git a/.github/workflows/links.yaml b/.github/workflows/links.yaml new file mode 100644 index 0000000..0fc0161 --- /dev/null +++ b/.github/workflows/links.yaml @@ -0,0 +1,29 @@ +name: Check links + +on: + pull_request: + push: + schedule: + - cron: "0 6 * * 1" + workflow_dispatch: + +jobs: + lychee: + name: Links in Markdown files + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v5 + + - name: Check links in Markdown files + uses: lycheeverse/lychee-action@v2 + with: + fail: true + args: >- + --verbose + --no-progress + --timeout 20 + --retry-wait-time 5 + --max-retries 2 + './**/*.md' From b487600ad8bf2511428d5f649e3376faa1c7bf82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Such=C3=A1nek?= Date: Thu, 16 Apr 2026 09:11:15 +0200 Subject: [PATCH 2/2] Fix broken links --- README.md | 3 +- project-guide.md | 4 +- references.md | 174 ++++++----------------- tutorials/00_intro.md | 24 ++-- tutorials/01_fp-env.md | 14 +- tutorials/02_functions-types.md | 10 +- tutorials/03_branching.md | 8 +- tutorials/04_containers-functions.md | 6 +- tutorials/05_typeclasses.md | 10 +- tutorials/06_io-exc-typeclasses.md | 7 +- tutorials/07_test-doc-debug.md | 4 +- tutorials/08_webapp.md | 26 ++-- tutorials/09_elm-intro.md | 6 +- tutorials/10_elm-tea.md | 10 +- tutorials/12_elm-real-world-use-cases.md | 1 - tutorials/97_monadtrans.md | 4 +- tutorials/98_template-haskell.md | 7 +- tutorials/99_exts-deptypes.md | 15 +- tutorials/images/module-mapping.svg | 2 +- 19 files changed, 115 insertions(+), 220 deletions(-) diff --git a/README.md b/README.md index 140d128..5b46b71 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![License: CC BY-SA 4.0](https://img.shields.io/badge/License-CC%20BY--SA%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-sa/4.0/) [![DOI](https://zenodo.org/badge/118425348.svg)](https://zenodo.org/badge/latestdoi/118425348) -Materials of [MI-AFP] (*Applied Functional Programming*) course tutorials +Materials of MI-AFP (*Applied Functional Programming*) course tutorials ## Content @@ -29,7 +29,6 @@ This project is licensed under the Creative Commons Public License [CC BY-SA 4.0 [issue]: https://help.github.com/articles/about-issues/ [pull request]: https://help.github.com/articles/about-pull-requests/ [CC BY-SA 4.0]: https://creativecommons.org/licenses/by-sa/4.0/deed.cs -[MI-AFP]: http://bk.fit.cvut.cz/en/predmety/00/00/00/00/00/00/05/42/92/p5429206.html [MI-AFP organization]: https://github.com/MI-AFP [MI-PYT]: https://github.com/cvut/MI-PYT [LICENSE]: LICENSE diff --git a/project-guide.md b/project-guide.md index bdbe6cd..cd464e8 100644 --- a/project-guide.md +++ b/project-guide.md @@ -63,8 +63,6 @@ Important part of a productive environment (and not just for team, even if you a The most famous version control systems these days are [Git](https://git-scm.com) and [SVN (subversion)](https://subversion.apache.org). Frequently, you can stick with rule that SVN is more suitable for larger and binary files (although there is Git LFS) or when good integration for specific tool is supplied (for example, Enterprise Architect). The core difference is in approach that SVN is centralized and you need to lock part that you want to change, this is where Git will require you resolve merge conflicts. Merging and branches in SVN are more complicated than in Git (this many be subjective). -![Git vs. Subversion (git-tower.com)](https://www.git-tower.com/learn/content/01-git/01-ebook/en/02-desktop-gui/07-appendix/02-from-subversion-to-git/centralized-vs-distributed.png) - For more see: https://www.perforce.com/blog/vcs/git-vs-svn-what-difference ### GitHub, GitLab, and others @@ -142,7 +140,7 @@ To avoid that, you need some people to do reviews for you and do the review for As already being said few times, there are services that can be easily integrated with GitHub or GitLab in order to do something with your project automatically when you push commits, create pull request, release new version, or do some other action. The "something" can be actually anything and you can write such "[CI tool](https://en.wikipedia.org/wiki/Continuous_integration)" even by yourself. -* Continuous Integration - This term is used usually when your software is built (all parts are integrated), and tested with automatic tests or at least attempt to execute it is done. The result is that at that moment your code is (at least somehow) working. It is nice to see in your commits history which were working and which were not. For this, you can use [Travis CI](travis-ci.org), [Semaphore CI](https://semaphoreci.com), AppVeyor, and many others. +* Continuous Integration - This term is used usually when your software is built (all parts are integrated), and tested with automatic tests or at least attempt to execute it is done. The result is that at that moment your code is (at least somehow) working. It is nice to see in your commits history which were working and which were not. For this, you can use [Travis CI](https://travis-ci.org), [Semaphore CI](https://semaphoreci.com), AppVeyor, and many others. * Continuous Inspection - Services that does static inspection of your code, they can verify dependencies of your project, evaluate coverage, and others. One of the examples is [SonarQube](https://www.sonarqube.org), but again there are many similar services. * Continuous Delivery - If your code passed the build and test phases, it can be deployed somewhere. The deployment can have many realizations, from actual deployment on some web hosting or app server (realized, for example, by service like [Heroku](https://www.heroku.com) or [AWS](https://aws.amazon.com)), though publishing new documentation on [ReadTheDocs](https://readthedocs.org), to uploading installation packages to some registry. All depends what you need, want, and how you will set it up. diff --git a/references.md b/references.md index fa68f57..6af79fc 100644 --- a/references.md +++ b/references.md @@ -2,133 +2,89 @@ ## Rationale - * https://dzone.com/articles/why-haskell-matters - * http://programmers.stackexchange.com/questions/279316/what-exactly-makes-the-haskell-type-system-so-revered-vs-say-java/ - * https://www.reddit.com/r/haskell/comments/3f4s3r/advantages_and_disadvantages_of_haskell_in/ - * https://code.facebook.com/posts/745068642270222/fighting-spam-with-haskell/ - * https://www.reddit.com/r/haskell/comments/3h7fqr/what_are_haskellers_critiques_of_scala/ - * https://www.reddit.com/r/haskell/comments/3h5og6/i_now_tend_to_think_that_the_concepts_behind_all/ - * http://jfeltz.com/posts/2015-08-30-cost-decreasing-software-architecture.html - * https://medium.com/@bryanmikaelian/haskell-changed-me-f98ebbb84333 - * http://www.leonmergen.com/code/2015/12/04/on-stateless-software-design-what-is-state.html - * https://www.futurelearn.com/courses/functional-programming-haskell/1/steps/115453 - * http://baatz.io/posts/haskell-in-a-startup/ + * https://wiki.haskell.org/Why_Haskell_matters + * https://programmers.stackexchange.com/questions/279316/what-exactly-makes-the-haskell-type-system-so-revered-vs-say-java/ + * https://baatz.io/posts/haskell-in-a-startup/ * https://lexi-lambda.github.io/blog/2016/06/12/four-months-with-haskell/?utm_source=all - * http://www.stephendiehl.com/posts/production.html - * https://www.reddit.com/r/haskell/comments/46jaqx/i_really_want_to_use_haskell_but_im_having/ * https://www.wagonhq.com/blog/haskell-for-industry - * http://www.lihaoyi.com/post/WhatsFunctionalProgrammingAllAbout.html + * https://www.lihaoyi.com/post/WhatsFunctionalProgrammingAllAbout.html * https://kseo.github.io/posts/2017-01-27-how-i-learned-haskell.html * https://hackernoon.com/easing-haskells-intimidating-glare-2341095e88aa * https://www.fpcomplete.com/blog/2016/11/mastering-time-to-market-haskell ## Courses and Fundamental topics - * http://learnyouahaskell.com - * http://haskellbook.com/ - * https://www.edx.org/course/introduction-functional-programming-delftx-fp101x-0 - * http://book.realworldhaskell.org - * http://dev.stephendiehl.com/hask/ + * https://learnyouahaskell.github.io/ + * https://haskellbook.com/ + * https://i.iinfo.cz/files/root/k/real-world-haskell.pdf * https://wiki.haskell.org * https://www.fpcomplete.com/ - * http://nptel.ac.in/courses/106106137/ - * https://www.reddit.com/r/haskell/comments/3j36wc/haskell_tutorial_collection/ - * http://www.happylearnhaskelltutorial.com/ - * http://learn.hfm.io/higher_order.html + * https://nptel.ac.in/courses/106106137/ + * https://www.happylearnhaskelltutorial.com/ * https://github.com/takenobu-hs/type-introduction-illustrated - * http://stackoverflow.com/questions/15530511/how-to-edit-nth-element-in-a-haskell-list + * https://stackoverflow.com/questions/15530511/how-to-edit-nth-element-in-a-haskell-list * https://www.youtube.com/playlist?list=PLsAEIIjTPIo83ufYYkaPjUwZUuTe1LoZP - * http://www.scs.stanford.edu/11au-cs240h/notes/ - * https://www.futurelearn.com/courses/functional-programming-haskell - * https://m.reddit.com/r/haskell/comments/4ooxqc/does_anyone_have_a_progressive_list_of_beginner/ - * http://cheatsheet.codeslower.com/ - * https://github.com/warreee/haskell - * http://lotz84.github.io/haskellbyexample/ - * http://ndmitchell.com/downloads/slides-drive-by_haskell_contributions-09_jun_2017.pdf - * http://bitemyapp.com + * https://www.scs.stanford.edu/11au-cs240h/notes/ + * https://cheatsheet.codeslower.com/ + * https://lotz84.github.io/haskellbyexample/ + * https://ndmitchell.com/downloads/slides-drive-by_haskell_contributions-09_jun_2017.pdf + * https://bitemyapp.com * https://kseo.github.io/posts/2017-01-28-build-your-haskell-project-continuously.html - * http://www.atamo.com/articles/how-to-read-pearls-by-richard-bird/ + * https://www.atamo.com/articles/how-to-read-pearls-by-richard-bird/ * https://mmhaskell.com/blog/2017/1/30/the-easiest-haskell-idiom ## Problems Solving - * https://www.reddit.com/r/haskell/comments/469n8s/best_practices_for_modifiable_state_in_haskell/ * https://www.youtube.com/watch?v=p-NBJm0kIYU - * http://research.microsoft.com/en-us/um/people/simonpj/papers/financial-contracts/contracts-icfp.htm - * https://www.reddit.com/r/haskell/comments/3ez1k4/how_would_you_design_this_program_in_haskell/ - * http://blog.ezyang.com/2010/05/design-patterns-in-haskel/ - * https://www.reddit.com/r/haskell/comments/3r8x5m/best_way_to_model_a_deck_of_cards/ - * http://ideas.cs.uu.nl/FPTutor/ - * http://www.parsonsmatt.org/2015/12/09/exploratory_haskell.html - * http://abailly.github.io/posts/event-source.html + * https://research.microsoft.com/en-us/um/people/simonpj/papers/financial-contracts/contracts-icfp.htm + * https://blog.ezyang.com/2010/05/design-patterns-in-haskel/ + * https://www.parsonsmatt.org/2015/12/09/exploratory_haskell.html + * https://abailly.github.io/posts/event-source.html * https://mmhaskell.com/blog/2017/7/24/getting-the-users-opinion-options-in-haskell ## Specific Topics * https://hackhands.com/lazy-evaluation-works-haskell/ - * http://jelv.is/blog/Haskell-Monads-and-Purity/ - * http://brandon.si/code/the-state-monad-a-tutorial-for-the-confused/ - * http://www.haskellforall.com/2015/10/polymorphism-for-dummies.html - * http://www.gilmi.xyz/post/2015/08/12/how-haskell-models-io - * https://www.reddit.com/r/haskell/comments/3hqvzi/how_to_accomplish_edits_of_a_large_dataset_in - * https://www.reddit.com/r/haskell/comments/3is2ay/what_gui_libray_do_you_userecommend/ - * https://www.reddit.com/r/haskell/comments/3wxggs/whats_the_best_way_to_create_gui_for_haskell/ - * http://www.alexeyshmalko.com/2015/haskell-string-types/ - * https://www.reddit.com/r/haskell/comments/3u5ryh/fast_way_to_serialize_haskell_objects/ - * http://kwangyulseo.com/2014/02/06/multi-line-strings-in-haskell/ - * https://github.com/asivitz/Hickory - * https://m.reddit.com/r/haskell/comments/4vh4sg/recommended_way_of_dealing_with_db_associations/ - * https://m.reddit.com/r/haskell/comments/4shcin/whats_the_best_way_to_create_prebuilt_binaries_of/ + * https://jelv.is/blog/Haskell-Monads-and-Purity/ + * https://brandon.si/code/the-state-monad-a-tutorial-for-the-confused/ + * https://www.haskellforall.com/2015/10/polymorphism-for-dummies.html + * https://www.alexeyshmalko.com/2015/haskell-string-types/ * https://two-wrongs.com/parser-combinators-parsing-for-haskell-beginners * https://jeltsch.wordpress.com/2016/02/22/generic-programming-in-haskell/ - * http://blog.ssanj.net/posts/2014-09-23-A-Simple-Reader-Monad-Example.html + * https://blog.ssanj.net/posts/2014-09-23-A-Simple-Reader-Monad-Example.html * https://www.athiemann.net/2017/07/02/superrecord.html * https://www.schoolofhaskell.com/user/fumieval/encoding-objects - * http://www.stephendiehl.com/posts/strings.html * https://mmhaskell.com/blog/2017/5/15/untangling-haskells-strings - * https://medium.com/@jonathangfischoff/the-partial-options-monoid-pattern-31914a71fc67 - * http://vaibhavsagar.com/blog/2017/05/29/imperative-haskell/ + * https://vaibhavsagar.com/blog/2017/05/29/imperative-haskell/ * https://hackernoon.com/type-class-patterns-and-anti-patterns-efd045c5af66 * https://philipnilsson.github.io/Badness10k/posts/2017-05-07-escaping-hell-with-monads.html - * https://medium.com/@sjsyrek/five-minutes-to-monoid-fe6f364d0bba - * http://foswiki.cs.uu.nl/foswiki/pub/Swierstra/ResearchTalks/tree-oriented-programming-slides.pdf * https://hackernoon.com/typeclass-instance-selection-fea1068920e6 * https://two-wrongs.com/dynamic-dispatch-in-haskell-how-to-make-code-extendable * https://e.xtendo.org/monad#1 - * http://www.cs.nott.ac.uk/~pszgmh/fold.pdf - * http://www.parsonsmatt.org/2017/02/17/ooph_data_inheritance.html + * https://www.parsonsmatt.org/2017/02/17/ooph_data_inheritance.html ### Lenses - * http://www.haskellforall.com/2013/05/program-imperatively-using-haskell.html - * https://m.reddit.com/r/haskell/comments/4s84tc/examples_of_why_lens_is_useful/ - * http://www.mchaver.com/posts/2017-07-12-lens-tutorial-1.html + * https://www.haskellforall.com/2013/05/program-imperatively-using-haskell.html ### Databases - * http://stackoverflow.com/questions/104960/are-there-any-orm-tools-for-haskell + * https://stackoverflow.com/questions/104960/are-there-any-orm-tools-for-haskell * https://github.com/begriffs/postgrest/blob/master/README.md ### GUI * https://begriffs.com/posts/2016-07-27-tikhon-on-frp.html * https://github.com/gelisam/frp-zoo - * https://www.stackbuilders.com/tutorials/haskell/gui-application/ ## Tooling - * https://www.haskell.org/hoogle/ + * https://hoogle.haskell.org/ * https://github.com/alanz/HaRe - * https://www.fpcomplete.com/ - * https://www.reddit.com/r/haskell/comments/3ni7fb/is_there_any_ide_or_plugin_for_haskell_that_does/ - * https://www.reddit.com/r/haskell/comments/3oa0ht/is_there_a_simple_way_to_automatically_visualize/ - * https://www.reddit.com/r/haskell/comments/3voe9p/debugging_haskell_programs/ * https://functor.tokyo/blog/2017-07-28-ghc-warnings-you-should-enable ### VIM - * http://www.stephendiehl.com/posts/vim_haskell.html - * http://blog.mno2.org/posts/2011-11-17-vim-plugins-for-haskell-programmers.html * https://github.com/eagletmt/neco-ghc * https://github.com/begriffs/haskell-vim-now @@ -141,82 +97,40 @@ ## Libraries * https://github.com/krispo/awesome-haskell - * http://haskelliseasy.readthedocs.io/en/latest/ - * http://www.haskellforall.com/2015/08/state-of-haskell-ecosystem-august-2015.html?m=1 - * http://projects.haskell.org/diagrams/doc/quickstart.html + * https://haskelliseasy.readthedocs.io/en/latest/ + * https://www.haskellforall.com/2015/08/state-of-haskell-ecosystem-august-2015.html?m=1 + * https://projects.haskell.org/diagrams/doc/quickstart.html ## Architecture - * http://stackoverflow.com/questions/3077866/large-scale-design-in-haskell - * http://stackingyourmonads.benkolera.com/#/ - * https://dshevchenko.biz/hs-research/Haskell-in-the-Large.pdf - -## Web Development - - * https://www.stackbuilders.com/tutorials/functional-full-stack/purescript-bridge/ + * https://stackoverflow.com/questions/3077866/large-scale-design-in-haskell ### Server Side - * https://www.slant.co/topics/727/~haskell-web-frameworks-for-building-restful-web-services - * http://stackoverflow.com/questions/5645168/comparing-haskells-snap-and-yesod-web-frameworks - * http://zyghost.com/articles/Renderable.html + * https://stackoverflow.com/questions/5645168/comparing-haskells-snap-and-yesod-web-frameworks + * https://zyghost.com/articles/Renderable.html * https://robots.thoughtbot.com/a-rest-api-with-haskell-and-snap ### Client Side - * http://haste-lang.org/ + * https://haste-lang.org/ * https://github.com/ghcjs/ghcjs - * https://www.airpair.com/haskell/posts/haskell-tutorial-introduction-to-web-apps - * http://ifeanyi.co/posts/client-side-haskell/ + * https://ifeanyi.co/posts/client-side-haskell/ * https://speakerdeck.com/mkscrg/electron-react-and-haskell-oh-my - * http://stackoverflow.com/questions/9210412/recommended-reading-tutorials-to-understand-reactive-banana-frp-library - -## Examples and Projects - - * https://m.reddit.com/r/haskell/comments/571tu3/what_are_some_good_open_source_projects_for/ - * http://utdemir.com/posts/modeling-the-hardest-logic-puzzle-ever-in-haskell.html - * http://zyghost.com/articles/Renderable.html - * https://www.reddit.com/r/haskell/comments/3l2b7q/good_midsized_projects_for_learning_haskell/ - * https://gist.github.com/ToJans - * https://www.reddit.com/r/haskell/comments/3pqdln/large_applications_written_using_frp/ - * https://github.com/divipp/lensref/wiki - * https://www.youtube.com/watch?v=sl2zo7tzrO8 - * https://lotz84.github.io/haskellbyexample/ - * https://m.reddit.com/r/haskell/comments/557fx1/how_to_model_road_intersections/ - * http://bitemyapp.com/posts/2015-04-26-installing-a-haskell-game.html - * https://github.com/pmikkelsen/game-of-life - * https://github.com/rjohnsondev/haskellshop - * https://github.com/google/codeworld - * https://github.com/jtdaugherty/brick - * https://github.com/lunky/IntroToFunctionalProgramming - * http://www.kovach.me/posts/2014-08-09-twitter.html - + * https://stackoverflow.com/questions/9210412/recommended-reading-tutorials-to-understand-reactive-banana-frp-library ## Style - * http://stackoverflow.com/questions/7746894/are-there-pronounceable-names-for-common-haskell-operators - * https://www.reddit.com/r/haskell/comments/3ple0s/google_styleguide_for_haskell/ - * https://m.reddit.com/r/haskell/comments/578amb/haskell_code_standards/ + * https://stackoverflow.com/questions/7746894/are-there-pronounceable-names-for-common-haskell-operators ## Advanced - * https://ocharles.org.uk/blog/pages/2014-12-01-24-days-of-ghc-extensions.html - * http://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/ - * https://www.reddit.com/r/haskell/comments/3m9nyp/category_theory_the_essence_of_interfacebased/ - * https://www.reddit.com/r/haskell/comments/3k17md/is_there_anything_more_powerful_than_monads/ - * https://www.reddit.com/r/haskell/comments/3lnhkp/monad_and_comonad_insights/ - * http://fvisser.nl/post/2013/okt/1/fclabels-2.0.html - * http://www.parsonsmatt.org/2015/11/15/template_haskell.html - * https://www.reddit.com/r/haskell/comments/3vfrik/can_i_put_constraints_on_type_constructors/ - * https://www.reddit.com/r/haskell/comments/3wxh7a/transducers_why_and_how/ - * https://www.reddit.com/r/haskell/comments/3wkofz/traversal_of_lens_with_maybe_fields/ + * https://www.parsonsmatt.org/2015/11/15/template_haskell.html * https://wiki.haskell.org/GADTs_for_dummies - * https://m.reddit.com/r/haskell/comments/4sihcv/haskell_the_bad_parts/ * https://blog.jle.im/entry/io-monad-considered-harmful.html - * https://m.reddit.com/r/haskell/comments/4prbba/what_can_i_do_with_comaybe/ - * http://www.haskellforall.com/2016/02/auto-generate-command-line-interface.html - * http://www.haskellforall.com/2016/02/from-mathematics-to-map-reduce.html + * https://www.haskellforall.com/2016/02/auto-generate-command-line-interface.html + * https://www.haskellforall.com/2016/02/from-mathematics-to-map-reduce.html ## Fun - * http://www.willamette.edu/~fruehr/haskell/evolution.html + * https://www.willamette.edu/~fruehr/haskell/evolution.html diff --git a/tutorials/00_intro.md b/tutorials/00_intro.md index b17c8aa..b49d44d 100644 --- a/tutorials/00_intro.md +++ b/tutorials/00_intro.md @@ -10,15 +10,15 @@ It might happen that you encounter a more advanced concept or piece of code that ## Outline -1. [FP and Haskell environment](01_fp-env.md) -2. [Functions and basics of data types](02_functions-types.md) -3. [Structure of code and branching in FP](03_branching.md) -4. [Important data types, handling errors](04_types-errors.md) -5. [Advanced functions, typeclasses intro](05_functions-typeclasses.md) -6. [IO, testing, and documentation](06_io-test-doc.md) -7. [Advanced type classes 1](07_common-typeclasses-1.md) -8. [Advanced type classes 2](08_common-typeclasses-2.md) -9. [Web application in Haskell](09_webapp.md) -10. [Frontend and FRP](10_frontend-frp.md) -11. [Performance and Debugging](11_performance-debug.md) -12. [GHC Extensions and Dependent Types](12_exts-deptypes.md) +1. [FP and Haskell environment](./01_fp-env.md) +2. [Functions and basics of data types](./02_functions-types.md) +3. [Structure of code and branching in FP](./03_branching.md) +4. [Containers and higher-order functions](./04_containers-functions.md) +5. [Typeclasses - custom and predefined](./05_typeclasses.md) +6. [IO in Real Programs](./06_io-exc-typeclasses.md) +7. [Tests, Documentation, Debugging and Performance](./07_test-doc-debug.md) +8. [Web application in Haskell](./08_webapp.md) +9. [Elm - Introduction](./09_elm-intro.md) +10. [Elm - The Elm Architecture](./10_elm-tea.md) +11. [Elm - Building Web Applications](./11_elm-building-web-apps.md) +12. [Elm - Real World Use Cases](./12_elm-real-world-use-cases.md) diff --git a/tutorials/01_fp-env.md b/tutorials/01_fp-env.md index 76e0a9e..0b611fe 100644 --- a/tutorials/01_fp-env.md +++ b/tutorials/01_fp-env.md @@ -50,7 +50,7 @@ If you are interested in deeper theoretical foundations, the following resources * [Lambda calculus (Wikipedia)](https://en.wikipedia.org/wiki/Lambda_calculus) * [Lambda calculus (Stanford Encyclopedia of Philosophy)](https://plato.stanford.edu/entries/lambda-calculus/) -* [The Lambda Calculus for Absolute Dummies](http://palmstroem.blogspot.cz/2012/05/lambda-calculus-for-absolute-dummies.html) +* [The Lambda Calculus for Absolute Dummies](https://palmstroem.blogspot.cz/2012/05/lambda-calculus-for-absolute-dummies.html) For FIT CTU students, related material is covered in: @@ -896,7 +896,7 @@ As mentioned, Stack handles dependencies automatically. You specify them in `pac First, you must find the package you need (using [Hoogle], [Hackage], or [Stackage]) and then add it to the `dependencies` section of `package.yaml`. It is good practice to check the license, documentation, and whether the package is actively maintained. -If you look up `Data.Set` ([Hoogle], [Stackage] or [Hackage]), you will find out that it is in package `containers` licensed under BSD with maintainer email libraries@haskell.org (see [here](http://hackage.haskell.org/package/containers/docs/Data-Set.html)). In Stackage, you can also see which version is included in the snapshot (resolver) you use. +If you look up `Data.Set` ([Hoogle], [Stackage] or [Hackage]), you will find out that it is in package `containers` licensed under BSD with maintainer email libraries@haskell.org (see [here](https://hackage.haskell.org/package/containers/docs/Data-Set.html)). In Stackage, you can also see which version is included in the snapshot (resolver) you use. However, if you now try to add the follow in your `Lib.hs`: @@ -941,7 +941,7 @@ True False ``` -Further, [Stack] also provides [dependency visualization](https://docs.haskellstack.org/en/stable/dependency_visualization/) via well-known tool Dot (GraphViz) and more detailed options... +Further, [Stack] also provides dependency visualization via well-known tool Dot (GraphViz) and more detailed options... ## Task assignment @@ -949,9 +949,9 @@ For the first assignment, use the `hw01` project and follow the instructions in ## Further reading -* [Why Functional Programming Matters](https://wiki.ccmi.fit.cvut.cz/_media/programming:why_functional_programming_matters.pdf) -* [Why Haskell Matters](https://dzone.com/articles/why-haskell-matters) -* [Learn You a Haskell for Great Good](http://learnyouahaskell.com) +* [Why Functional Programming Matters](https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf) +* [Why Haskell Matters](https://wiki.haskell.org/Why_Haskell_matters) +* [Learn You a Haskell for Great Good](https://learnyouahaskell.github.io/) * [School of Haskell](https://www.schoolofhaskell.com/school/starting-with-haskell/introduction-to-haskell) * [Stack User Guide](https://docs.haskellstack.org/en/stable/GUIDE/) * [GHC User Guide](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/) @@ -962,7 +962,7 @@ For the first assignment, use the `hw01` project and follow the instructions in [Hackage]: https://hackage.haskell.org [Haskell]: https://www.haskell.org [Haskell 2010]: https://www.haskell.org/onlinereport/haskell2010/ -[Hoogle]: https://www.haskell.org/hoogle/ +[Hoogle]: https://hoogle.haskell.org/ [hpack]: https://github.com/sol/hpack [Stack]: https://docs.haskellstack.org [Stackage]: https://www.stackage.org diff --git a/tutorials/02_functions-types.md b/tutorials/02_functions-types.md index 082361b..c3d84b9 100644 --- a/tutorials/02_functions-types.md +++ b/tutorials/02_functions-types.md @@ -746,10 +746,10 @@ For the second assignment, navigate to the `hw02` project and follow the instruc ## Further reading -* [Learn You a Haskell for Great Good](http://learnyouahaskell.com) +* [Learn You a Haskell for Great Good](https://learnyouahaskell.github.io/) * [School of Haskell](https://www.schoolofhaskell.com/school/starting-with-haskell/introduction-to-haskell) -[containers]: http://hackage.haskell.org/package/containers -[Data.List]: hackage.haskell.org/package/base/docs/Data-List.html -[Data.String]: hackage.haskell.org/package/base/docs/Data-String.html -[Data.Tuple]: hackage.haskell.org/package/base/docs/Data-Tuple.html +[containers]: https://hackage.haskell.org/package/containers +[Data.List]: https://hackage.haskell.org/package/base/docs/Data-List.html +[Data.String]: https://hackage.haskell.org/package/base/docs/Data-String.html +[Data.Tuple]: https://hackage.haskell.org/package/base/docs/Data-Tuple.html diff --git a/tutorials/03_branching.md b/tutorials/03_branching.md index d61aac3..62ab300 100644 --- a/tutorials/03_branching.md +++ b/tutorials/03_branching.md @@ -1061,16 +1061,14 @@ For the assignment, navigate to the `hw03` project and follow the instructions i ## Further reading -* [Learn You a Haskell for Great Good](http://learnyouahaskell.com) (chapters 4, 7) +* [Learn You a Haskell for Great Good](https://learnyouahaskell.github.io/) (chapters 4, 7) * [Haskell: Pattern matching](https://en.wikibooks.org/wiki/Haskell/Pattern_matching) * [Haskell: Control structures](https://en.wikibooks.org/wiki/Haskell/Control_structures) * [Haskell: List comprehension](https://wiki.haskell.org/List_comprehension) * [Haskell: Lazy evaluation](https://wiki.haskell.org/Lazy_evaluation) -* [Haskell: Laziness](https://en.wikibooks.org/wiki/Haskell/Lazines) * [Haskell: Modules](https://en.wikibooks.org/wiki/Haskell/Modules) * [Haskell: Import](https://wiki.haskell.org/Import) * [Haskell: Import modules properly](https://wiki.haskell.org/Import_modules_properly). -* [24 Days of GHC Extensions: Bang Patterns](https://ocharles.org.uk/blog/posts/2014-12-05-bang-patterns.html) -* [Oh my laziness](http://alpmestan.com/posts/2013-10-02-oh-my-laziness.html) -* [Haskell String Types](http://www.alexeyshmalko.com/2015/haskell-string-types/) +* [GHC Extensions: Bang Patterns](https://limperg.de/ghc-extensions/#bangpatterns) +* [Haskell String Types](https://www.alexeyshmalko.com/2015/haskell-string-types/) * [Untangling Haskells strings](https://mmhaskell.com/blog/2017/5/15/untangling-haskells-strings) diff --git a/tutorials/04_containers-functions.md b/tutorials/04_containers-functions.md index a20bdf5..47479bb 100644 --- a/tutorials/04_containers-functions.md +++ b/tutorials/04_containers-functions.md @@ -15,7 +15,7 @@ The goal is not category theory though. The goal is to see that Haskell programs We already know the basic data types from the `base` package such as: * [`Bool`](https://hackage.haskell.org/package/base/docs/Data-Bool.html) -* numeric types ([`Int`](https://hackage.haskell.org/package/base/docs/Data-Int.html), [`Integer`](https://hackage.haskell.org/package/base/docs/Data-Integer.html), [`Double`](https://hackage.haskell.org/package/base/docs/Data-Double.html), ...) +* numeric types ([`Int`](https://hackage.haskell.org/package/base/docs/Data-Int.html), [`Integer`](https://hackage.haskell.org/package/base/docs/GHC-Integer.html), [`Double`](https://hackage.haskell.org/package/base/docs/Prelude.html#t:Double), ...) * [`Char`](https://hackage.haskell.org/package/base/docs/Data-Char.html) * [lists](https://hackage.haskell.org/package/base/docs/Data-List.html) `[a]` * [tuples](https://hackage.haskell.org/package/base/docs/Data-Tuple.html) `(a, b)` @@ -888,9 +888,9 @@ For the assignment, navigate to the `hw04` project and follow the instructions i * [Haskell containers](https://haskell-containers.readthedocs.io/en/latest/) * [Haskell - Handling errors in Haskell](https://wiki.haskell.org/Handling_errors_in_Haskell) * [Haskell - error](https://wiki.haskell.org/Error) -* [8 ways to report errors in Haskell](http://www.randomhacks.net/2007/03/10/haskell-8-ways-to-report-errors/) +* [8 ways to report errors in Haskell](https://www.randomhacks.net/2007/03/10/haskell-8-ways-to-report-errors/) [containers]: https://hackage.haskell.org/package/containers [GHC]: https://www.haskell.org/ghc/ [Hackage]: https://hackage.haskell.org -[Hoogle]: https://www.haskell.org/hoogle/ +[Hoogle]: https://hoogle.haskell.org/ diff --git a/tutorials/05_typeclasses.md b/tutorials/05_typeclasses.md index 5fcaf7a..1c4d4ef 100644 --- a/tutorials/05_typeclasses.md +++ b/tutorials/05_typeclasses.md @@ -595,7 +595,7 @@ class Functor f => Applicative f where --(<$>) :: (a -> b) -> f a -> f b -- this is from functor ``` -Function `pure` only lifts something into applicative structure `f`. The more interesting part is the ["tie-fighter"](http://starwars.wikia.com/wiki/TIE/LN_starfighter) operator `<*>` that applies a lifted function over an applicative. You can find out in the documentation following similar functions and partial functions as in [Data.Functor](https://hackage.haskell.org/package/base/docs/Data-Functor.html): +Function `pure` only lifts something into applicative structure `f`. The more interesting part is the "tie-fighter" operator `<*>` that applies a lifted function over an applicative. You can find out in the documentation following similar functions and partial functions as in [Data.Functor](https://hackage.haskell.org/package/base/docs/Data-Functor.html): ```haskell (<*) :: f a -> f b -> f a @@ -664,7 +664,7 @@ In Haskell terminology, we call `Functor f => f a` an **action**. Actions have t ### Monad — sequencing dependent effects -The most famous (and [scary](https://camo.githubusercontent.com/f2c3667a2cdf19c0cf203fad44c81d197c4cd740/68747470733a2f2f692e696d67666c69702e636f6d2f317a6e707a622e6a7067) :-)) typeclass for Haskell students is [Control.Monad](https://hackage.haskell.org/package/base/docs/Control-Monad.html). It defines basic operations over a monad, a term from category theory. From the perspective of a Haskell programmer, however, it is best to think of a monad as an "abstract datatype of actions". Haskell's `do` expressions provide a convenient syntax for writing monadic expressions. This time we will start Monads (operations, laws, basic behavior, etc.) and next time we will get deeper with some more practical use-cases. +The most famous (and often scary) typeclass for Haskell students is [Control.Monad](https://hackage.haskell.org/package/base/docs/Control-Monad.html). It defines basic operations over a monad, a term from category theory. From the perspective of a Haskell programmer, however, it is best to think of a monad as an "abstract datatype of actions". Haskell's `do` expressions provide a convenient syntax for writing monadic expressions. This time we will start Monads (operations, laws, basic behavior, etc.) and next time we will get deeper with some more practical use-cases. ```haskell class Applicative m => Monad m where @@ -877,9 +877,9 @@ For the assignment, navigate to the `hw05` project and follow the instructions i * [Typeclassopedia](https://wiki.haskell.org/Typeclassopedia) * [Haskell: OOP vs type classes](https://wiki.haskell.org/OOP_vs_type_classes) * [WikiBooks Haskell: Classes and types](https://en.wikibooks.org/wiki/Haskell/Classes_and_types) -* [Functors, Applicatives, And Monads In Pictures](http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html) +* [Functors, Applicatives, And Monads In Pictures](https://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html) * [Haskell and Category Theory](https://en.wikibooks.org/wiki/Haskell/Category_theory) * [Category Theory for Programmers by Bartosz Milewski](https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface) -* [LYAH: Functors, Applicative Functors and Monoids](http://learnyouahaskell.com/functors-applicative-functors-and-monoids) -* [LYAH: A Fistful of Monads](http://learnyouahaskell.com/a-fistful-of-monads) +* [LYAH: Functors, Applicative Functors and Monoids](https://learnyouahaskell.github.io/functors-applicative-functors-and-monoids) +* [LYAH: A Fistful of Monads](https://learnyouahaskell.github.io/a-fistful-of-monads) * [Haskell: Monad](https://wiki.haskell.org/Monad) diff --git a/tutorials/06_io-exc-typeclasses.md b/tutorials/06_io-exc-typeclasses.md index 1cf2ab2..51781f3 100644 --- a/tutorials/06_io-exc-typeclasses.md +++ b/tutorials/06_io-exc-typeclasses.md @@ -1223,11 +1223,10 @@ For the assignment, navigate to the `hw06` project and follow the instructions i * [Haskell: Lenses and functional references](https://en.wikibooks.org/wiki/Haskell/Lenses_and_functional_references) * [Haskell Wiki: Foldable and Traversable](https://wiki.haskell.org/Foldable_and_Traversable) * [Haskell Wiki: State monad](https://wiki.haskell.org/State_Monad) -* [Monadic parsing combinators](http://eprints.nottingham.ac.uk/223/1/pearl.pdf) -* [LYAH: For a Few Monads More](http://learnyouahaskell.com/for-a-few-monads-more) +* [LYAH: For a Few Monads More](https://learnyouahaskell.github.io/for-a-few-monads-more) * [Arrows](https://www.haskell.org/arrows/) -* [Lens](http://lens.github.io/tutorial.html) +* [Lens](https://lens.github.io/tutorial.html) * [Control.Lens.Tutorial](https://hackage.haskell.org/package/lens-tutorial/docs/Control-Lens-Tutorial.html) * [SchoolOfHaskell: Lens tutorial](https://www.schoolofhaskell.com/school/to-infinity-and-beyond/pick-of-the-week/a-little-lens-starter-tutorial) -* [Lenses In Pictures](http://adit.io/posts/2013-07-22-lenses-in-pictures.html) +* [Lenses In Pictures](https://adit.io/posts/2013-07-22-lenses-in-pictures.html) * [Next Level MTL, George Wilson: BFPG 2016-06 (Lens, Monad transformers)](https://www.youtube.com/watch?v=GZPup5Iuaqw) diff --git a/tutorials/07_test-doc-debug.md b/tutorials/07_test-doc-debug.md index ebc2a7e..1c5e6c9 100644 --- a/tutorials/07_test-doc-debug.md +++ b/tutorials/07_test-doc-debug.md @@ -58,7 +58,7 @@ When to use HUnit: ### QuickCheck -[QuickCheck](https://hackage.haskell.org/package/QuickCheck) is built around the idea that instead of writing many example tests, you write properties your code should satisfy — and QuickCheck tries to falsify them using randomly generated inputs. All from a simple example to complex tutorials of such definitions are explained in the [manual](http://www.cse.chalmers.se/~rjmh/QuickCheck/manual.html). +[QuickCheck](https://hackage.haskell.org/package/QuickCheck) is built around the idea that instead of writing many example tests, you write properties your code should satisfy — and QuickCheck tries to falsify them using randomly generated inputs. All from a simple example to complex tutorials of such definitions are explained in the [manual](https://www.cse.chalmers.se/~rjmh/QuickCheck/manual.html). When to use QuickCheck: @@ -1431,12 +1431,10 @@ The homework to practice IO (again), testing, and writing project documentation * [A Gentle Introduction to Haskell: Input/Output](https://www.haskell.org/tutorial/io.html) * [Haskell: Simple input and output](https://en.wikibooks.org/wiki/Haskell/Simple_input_and_output) -* [Real World Haskell: Testing and quality assurance](http://book.realworldhaskell.org/read/testing-and-quality-assurance.html) * [WikiBooks Haskell: Testing](https://en.wikibooks.org/wiki/Haskell/Testing) * [Haddock User Guide](https://www.haskell.org/haddock/doc/html/index.html) * [QuickCheck and Magic of Testing](https://www.fpcomplete.com/blog/2017/01/quickcheck) * [Haskell: Debugging](https://wiki.haskell.org/Debugging) * [Haskell: Performance](https://wiki.haskell.org/Performance) * [Haskell: Concurrency](https://wiki.haskell.org/Concurrency) -* [Real World Haskell: Concurrent and Multicore Programming](http://book.realworldhaskell.org/read/concurrent-and-multicore-programming.html) * [GHC: Concurrent and Parallel Haskell](https://downloads.haskell.org/~ghc/7.0.3/docs/html/users_guide/lang-parallel.html) diff --git a/tutorials/08_webapp.md b/tutorials/08_webapp.md index a69406e..bc2983b 100644 --- a/tutorials/08_webapp.md +++ b/tutorials/08_webapp.md @@ -126,7 +126,7 @@ As with other languages, you usually don't want to build a web application from There are several frameworks in Haskell (see [here](https://wiki.haskell.org/Web/Frameworks)) and here is our list of the most used ones: -- [Happstack](http://happstack.com) +- [Happstack](https://happstack.com) - [Scotty](https://github.com/scotty-web/scotty) - [Servant](https://haskell-servant.github.io) - [Snap](http://snapframework.com) @@ -235,7 +235,7 @@ The architecture of IHP is based on the Model-View-Controller (MVC) pattern, whi ### Scotty -[Scotty](https://github.com/scotty-web/scotty) is another Haskell web framework inspired by Ruby's [Sinatra](http://sinatrarb.com), using [WAI](https://hackage.haskell.org/package/wai) and [Warp](https://hackage.haskell.org/package/warp) (a fast, light-weight web server for WAI applications). You can write your own application just with WAI (Web Application Interface), but Scotty provides you with abstractions from a low-level communication. Sadly, there is not so much documentation about Scotty, everything is just on [GitHub](https://github.com/scotty-web/scotty). Scotty uses primarily [Blaze HTML](https://hackage.haskell.org/package/blaze-html) for HTML "templates", however, as we explained, you may also integrate it with any templating library you like. +[Scotty](https://github.com/scotty-web/scotty) is another Haskell web framework inspired by Ruby's [Sinatra](https://sinatrarb.com), using [WAI](https://hackage.haskell.org/package/wai) and [Warp](https://hackage.haskell.org/package/warp) (a fast, light-weight web server for WAI applications). You can write your own application just with WAI (Web Application Interface), but Scotty provides you with abstractions from a low-level communication. Sadly, there is not so much documentation about Scotty, everything is just on [GitHub](https://github.com/scotty-web/scotty). Scotty uses primarily [Blaze HTML](https://hackage.haskell.org/package/blaze-html) for HTML "templates", however, as we explained, you may also integrate it with any templating library you like. #### "Hello World" @@ -293,7 +293,7 @@ You might ask "What about styles?" or "What if want to have some JavaScript ther #### Hastache templates -If you are already familiar with some web development, you've probably heard about the popular [{{ mustache }}](http://mustache.github.io) templates. In Haskell, we have Haskell implementation of Mustache templates called [hastache](https://hackage.haskell.org/package/hastache). +If you are already familiar with some web development, you've probably heard about the popular [{{ mustache }}](https://mustache.github.io) templates. In Haskell, we have Haskell implementation of Mustache templates called [hastache](https://hackage.haskell.org/package/hastache). ```haskell import Text.Hastache @@ -400,11 +400,11 @@ main = do Again, several abstraction levels are available. First, you can employ a low-level approach where you incorporate SQL in the code. For that, you can usually use module `Database.X` where `X` is type of datase: -- [Database.SQLite](http://hackage.haskell.org/package/sqlite-simple) -- [Database.MySQL](http://hackage.haskell.org/package/mysql) -- [Database.PostgreSQL](http://hackage.haskell.org/package/PostgreSQL) -- [Database.MongoDB](http://hackage.haskell.org/package/mongoDB) -- [Database.Redis](http://hackage.haskell.org/package/redis) +- [Database.SQLite](https://hackage.haskell.org/package/sqlite-simple) +- [Database.MySQL](https://hackage.haskell.org/package/mysql) +- [Database.PostgreSQL](https://hackage.haskell.org/package/PostgreSQL) +- [Database.MongoDB](https://hackage.haskell.org/package/mongoDB) +- [Database.Redis](https://hackage.haskell.org/package/redis) - etc. A slightly better services are provided by mid-level libraries: @@ -412,7 +412,7 @@ A slightly better services are provided by mid-level libraries: - [Database.MySQL.Simple](https://hackage.haskell.org/package/mysql-simple) - [Database.PostgreSQL.Simple](https://hackage.haskell.org/package/postgresql-simple) -Going higher with the abstraction, you can then use [Haskell Database Connectivity (HDBC)](http://hackage.haskell.org/package/HDBC) for SQL databases. A good introduction to HDBC is in [Chapter 21 - Using Databases](http://book.realworldhaskell.org/read/using-databases.html) of the [Real World Haskell](http://book.realworldhaskell.org/) book. +Going higher with the abstraction, you can then use [Haskell Database Connectivity (HDBC)](https://hackage.haskell.org/package/HDBC) for SQL databases. A good introduction to HDBC is in Chapter 21 - Using Databases of the [Real World Haskell](https://i.iinfo.cz/files/root/k/real-world-haskell.pdf) book. ```sql CREATE TABLE test(id INTEGER PRIMARY KEY, str TEXT);\ @@ -798,10 +798,6 @@ The homework to complete a simple web app is in repository [MI-AFP/hw08](https:/ ## Further reading -* [YesodBook: Persistent](https://www.yesodweb.com/book/persistent) -* [adit.io: Making A Website With Haskell](http://adit.io/posts/2013-04-15-making-a-website-with-haskell.html) -* [24 Days of Hackage: blaze-html](https://ocharles.org.uk/blog/posts/2012-12-22-24-days-of-hackage-blaze.html) +* [YesodBook - Persistent](https://www.yesodweb.com/book/persistent) +* [adit.io - Making A Website With Haskell](https://adit.io/posts/2013-04-15-making-a-website-with-haskell.html) * [Haskell web frameworks](https://wiki.haskell.org/Web/Frameworks) -* [Reddit: What Haskell web framework do you use and why? ](https://www.reddit.com/r/haskell/comments/332s1k/what_haskell_web_framework_do_you_use_and_why/) -* [Reddit: Web development using Haskell](https://www.reddit.com/r/haskell/comments/2wfap0/web_development_using_haskell/) -* [Is Haskell a Good Choice for Web Applications?](http://jekor.com/article/is-haskell-a-good-choice-for-web-applications) diff --git a/tutorials/09_elm-intro.md b/tutorials/09_elm-intro.md index b4062f9..c0786fb 100644 --- a/tutorials/09_elm-intro.md +++ b/tutorials/09_elm-intro.md @@ -1010,7 +1010,7 @@ _Note_: Elm is using (same as React) Virtual DOM feature ### Elm Reactor -It is a quick and simple tool to run Elm project during development. Run `elm reactor` in the project root. It starts a server at [http://localhost:8000](http://localhost:8000) where we can navigate to Elm files. +It is a quick and simple tool to run Elm project during development. Run `elm reactor` in the project root. It starts a server at `http://localhost:8000` where we can navigate to Elm files. ## Elm program @@ -1046,7 +1046,7 @@ GHCJS is a compiler for Haskell to JavaScript that uses GHC API. It supports a w - [Reflex](https://reflex-frp.org) - A composable, cross-platform functional reactive programming framework for Haskell. - [miso](https://haskell-miso.org) - A tasty Haskell front-end framework. -### [PureScript](http://www.purescript.org) +### [PureScript](https://www.purescript.org) PureScript is a strongly-typed functional programming language that compiles to JavaScript. It is similar to Haskell with [some differences](https://github.com/purescript/documentation/blob/master/language/Differences-from-Haskell.md). It has a lot of packages published in [Pursuit](https://pursuit.purescript.org). Also, some frameworks for building web applications are there, e.g.: @@ -1054,8 +1054,6 @@ PureScript is a strongly-typed functional programming language that compiles to - [Halogen](https://github.com/slamdata/purescript-halogen) - A declarative, type-safe UI library for PureScript. - [Pux](https://github.com/alexmingoia/purescript-pux) - A library for building type-safe web applications. -If you are interested, you can have a look at this comparison: [Benchmarks: GHCJS (Reflex, Miso) & Purescript (Pux, Thermite, Halogen)](https://medium.com/@saurabhnanda/benchmarks-fp-languages-libraries-for-front-end-development-a11af0542f7e) - ### [ReasonML](https://reasonml.github.io) Reason is a new syntax and toolchain based on OCaml programing language created by Facebook. The syntax is closer to JavaScript than OCaml. It is intended for development of front-end web applications and compiles to JavaScript. Using existing JavaScript and OCaml packages is possible. diff --git a/tutorials/10_elm-tea.md b/tutorials/10_elm-tea.md index b7d4052..03ddef5 100644 --- a/tutorials/10_elm-tea.md +++ b/tutorials/10_elm-tea.md @@ -112,7 +112,7 @@ type Msg = getTodo : Cmd Msg getTodo = Http.get - { url = "http://example.com/todo" + { url = "https://example.com/todo" , expect = Http.expectJson GotTodo todoDecoder } ``` @@ -132,7 +132,7 @@ type Msg = postTodo : Todo -> Cmd Msg postTodo todo = Http.post - { url = "http://example.com/todo" + { url = "https://example.com/todo" , body = Http.jsonBody <| encodeTodo todo , expect = Http.expectWhatever TodoSaved } @@ -152,7 +152,7 @@ postTodoRequest = Http.request { method = "POST" , headers = [] - , url = "http://example.com/todo" + , url = "https://example.com/todo" , body = Http.jsonBody <| encodeTodo todo , expect = Http.expectWhatever TodoSaved , timeout = Nothing @@ -165,7 +165,7 @@ postTodoRequest = Opaque types are types that hide their internal implementation details within a module. While this statement seems benign on its surface, it’s an incredibly important concept in an ecosystem that enforces semantic versioning. -_Note_: Taken from [Charlie Koster, medium.com](https://ckoster22.medium.com/advanced-types-in-elm-opaque-types-ec5ec3b84ed2) +_Note_: Taken from Charlie Koster, medium.com: *Advanced Types in Elm - Opaque Types* ```elm module Email exposing (Email, decodeEmail, toString) @@ -215,7 +215,7 @@ _Note_: From `Email` module, we expose only `Email` type without variant `EmailI ## Further Reading -- [Opaque types](https://ckoster22.medium.com/advanced-types-in-elm-opaque-types-ec5ec3b84ed2) +- [Opaque types](https://sporto.github.io/elm-patterns/advanced/opaque-types.html) - [Make impossible states impossible](https://www.youtube.com/watch?v=IcgmSRJHu_8&ab_channel=elm-conf) - [krisajenkins/remotedata](https://package.elm-lang.org/packages/krisajenkins/remotedata/latest/RemoteData) - [Elm Europe 2017 - Evan Czaplicki - The life of a file](https://www.youtube.com/watch?v=XpDsk374LDE) diff --git a/tutorials/12_elm-real-world-use-cases.md b/tutorials/12_elm-real-world-use-cases.md index 2da81c2..4cdc7f3 100644 --- a/tutorials/12_elm-real-world-use-cases.md +++ b/tutorials/12_elm-real-world-use-cases.md @@ -300,5 +300,4 @@ The other option is to [use ports](https://stackoverflow.com/a/52569683/2492795) - [SVG: Scalable Vector Graphics](https://developer.mozilla.org/en-US/docs/Web/SVG) - [Line Charts - A library for plotting line charts in SVG. Written in all Elm.](https://github.com/terezka/line-charts) - [Working with Files](https://elm-lang.org/blog/working-with-files) -- [Type-Safe & Composable GraphQL in Elm](https://medium.com/open-graphql/type-safe-composable-graphql-in-elm-b3378cc8d021) - [Elm Port Examples](https://github.com/MattCheely/elm-port-examples) diff --git a/tutorials/97_monadtrans.md b/tutorials/97_monadtrans.md index 1061889..23dae5b 100644 --- a/tutorials/97_monadtrans.md +++ b/tutorials/97_monadtrans.md @@ -16,7 +16,7 @@ Monad transformer is a wrapper type that has: ## MonadT, MaybeT and EitherT -When using monad transformers in Haskell, package [transformers](http://hackage.haskell.org/package/transformers) provide them for basic monads such as `Maybe`, `List`, `Reader`, `Writer`, or `State`. Be careful, others are separately in different packages such as `Either` in [either](https://hackage.haskell.org/package/either). It is quite common to use `T` as suffix after monad name to name its transformer. +When using monad transformers in Haskell, package [transformers](https://hackage.haskell.org/package/transformers) provide them for basic monads such as `Maybe`, `List`, `Reader`, `Writer`, or `State`. Be careful, others are separately in different packages such as `Either` in [either](https://hackage.haskell.org/package/either). It is quite common to use `T` as suffix after monad name to name its transformer. ### Maybe with IO @@ -400,12 +400,10 @@ heCheckIfRegistrationIsEnabled = heCheckIfFeatureIsEnabled "Registration" (gener ## References -* [Real World Haskell - Monad Transformers](http://book.realworldhaskell.org/read/monad-transformers.html) * [Wikibooks - Haskell/Monad Transformers](https://en.wikibooks.org/wiki/Haskell/Monad_transformers) * [Wikipedia - Monad Transformer](https://en.wikipedia.org/wiki/Monad_transformer) * [Monday Morning Haskell - Monads 6](https://mmhaskell.com/monads-6) = source of most of the examples * [A Gentle Introduction to Monad Transformers](https://github.com/kqr/gists/blob/master/articles/gentle-introduction-monad-transformers.md) * [A Gentle Introduction to Monad Transformers](https://github.com/kqr/gists/blob/master/articles/gentle-introduction-monad-transformers.md) -* [Monad Transformers aren’t hard!](https://medium.com/@alexander.zaidel/monad-transformers-arent-hard-23387c7ef4a6) * [Haskell Wiki - Monad Transformers Explained](https://wiki.haskell.org/Monad_Transformers_Explained) diff --git a/tutorials/98_template-haskell.md b/tutorials/98_template-haskell.md index 7fa44fd..74267d6 100644 --- a/tutorials/98_template-haskell.md +++ b/tutorials/98_template-haskell.md @@ -6,8 +6,8 @@ Template Haskell is an experimental language extension to the Haskell programmin With Template Haskell (TH) you can write code that generates code (i.e. metaprogramming). Sometimes it is considered as bad and result of failing to address some problem in a normal programming way. On the other hand, in some situations it can really simplify your work when you need to really generate amount of similar and complex code from simpler specification. There are some typical use cases of Template Haskell: -* **Deriving of type class instances** - You know keyword `deriving` and we said that you can use it for basic typeclasses such as `Show`, `Read`, or `Ord`. Well, there are ways how to derive also othes. One is using [GHC.Generics](https://wiki.haskell.org/GHC.Generics) but that might slow down the compilation significantly. The other is TH and that way is used for example by [aeson](http://hackage.haskell.org/package/aeson) library when deriving instances for transformation from and to JSON. -* **Domain Specific Languages (DSLs)** - DSLs are trendy, nice, and cool way how to code things without actually writing the code itself but using different syntax in special quotes. They are integrated into systems built in Haskell. Examples of such DLSs are the language for model declaration used in [persistent](http://hackage.haskell.org/package/persistent), and various other mini-languages used in the [yesod](http://hackage.haskell.org/package/yesod) web framework that we have already shown. +* **Deriving of type class instances** - You know keyword `deriving` and we said that you can use it for basic typeclasses such as `Show`, `Read`, or `Ord`. Well, there are ways how to derive also othes. One is using [GHC.Generics](https://wiki.haskell.org/GHC.Generics) but that might slow down the compilation significantly. The other is TH and that way is used for example by [aeson](https://hackage.haskell.org/package/aeson) library when deriving instances for transformation from and to JSON. +* **Domain Specific Languages (DSLs)** - DSLs are trendy, nice, and cool way how to code things without actually writing the code itself but using different syntax in special quotes. They are integrated into systems built in Haskell. Examples of such DLSs are the language for model declaration used in [persistent](https://hackage.haskell.org/package/persistent), and various other mini-languages used in the [yesod](https://hackage.haskell.org/package/yesod) web framework that we have already shown. * **Compile-time construction of values of refined types** - It simply turns invalid inputs into compilation failures. * **Compile-time loading and processing of data from external files** - This is very useful sometimes to avoid loading resources on the beginning of every run of the application. Even though it involves running IO during compilation, it’s a relatively innocent use case of that dangerous feature. @@ -22,7 +22,7 @@ The core of TH is the `Q` monad (short for “quotation”) that hosts all funct * Putting and getting some custom state that is then shared by all TH code in the same module. * Running IO during compilation, so we can e.g. read something from a file. -Everything needed for basic TH is in [template-haskell](http://hackage.haskell.org/package/template-haskell) package, including the definition of the `Q` monad and other types and typeclasses that we will mention afterwards. +Everything needed for basic TH is in [template-haskell](https://hackage.haskell.org/package/template-haskell) package, including the definition of the `Q` monad and other types and typeclasses that we will mention afterwards. ```haskell newtype Q a = Q { unQ :: forall m. Quasi m => m a } @@ -148,7 +148,6 @@ There are many more options to do with Template Haskell especially when it comes * [Template Haskell tutorial (Mark Karpov)](https://markkarpov.com/tutorial/th.html) * [Wikipedia - Template Haskell](https://en.wikipedia.org/wiki/Template_Haskell) * [Template Haskell Is Not Scary](https://www.parsonsmatt.org/2015/11/15/template_haskell.html) -* [24 Days of GHC Extensions: Template Haskell](https://ocharles.org.uk/guest-posts/2014-12-22-template-haskell.html) * [Syntax of Template Haskell and Quasiquotes](https://riptutorial.com/haskell/example/18471/syntax-of-template-haskell-and-quasiquotes) * [Intro to Template Haskell](https://typeclasses.com/news/2018-10-intro-template-haskell) * [Template Haskell 101](https://www.schoolofhaskell.com/user/marcin/template-haskell-101) diff --git a/tutorials/99_exts-deptypes.md b/tutorials/99_exts-deptypes.md index b95cbcb..7cbe87d 100644 --- a/tutorials/99_exts-deptypes.md +++ b/tutorials/99_exts-deptypes.md @@ -8,7 +8,7 @@ Language extensions are used to enable language features in Haskell that may see ### TypeFamilies -This extension allows use and definition of indexed type and data families to facilitate type-level programming. Indexed type families, or type families for short, are type constructors that represent sets of types. Set members are denoted by supplying the type family constructor with type parameters, which are called type indices. The difference between vanilla parametrized type constructors and family constructors is much like between parametrically polymorphic functions and (ad-hoc polymorphic) methods of type classes. Parametric polymorphic functions behave the same in all type instances, whereas class methods can change their behaviour in dependence on the class type parameters. Similarly, vanilla type constructors imply the same data representation for all type instances, but family constructors can have varying representation types for varying type indices. (see [GHC docs](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#type-families)) +This extension allows use and definition of indexed type and data families to facilitate type-level programming. Indexed type families, or type families for short, are type constructors that represent sets of types. Set members are denoted by supplying the type family constructor with type parameters, which are called type indices. The difference between vanilla parametrized type constructors and family constructors is much like between parametrically polymorphic functions and (ad-hoc polymorphic) methods of type classes. Parametric polymorphic functions behave the same in all type instances, whereas class methods can change their behaviour in dependence on the class type parameters. Similarly, vanilla type constructors imply the same data representation for all type instances, but family constructors can have varying representation types for varying type indices. ```haskell {-# LANGUAGE TypeFamilies #-} @@ -61,7 +61,7 @@ Complete example: [Haskell - GADT](https://en.wikibooks.org/wiki/Haskell/GADT) ### QuasiQuotes -[Quasiquoting](https://wiki.haskell.org/Quasiquotation) allows programmers to use custom, domain-specific syntax to construct fragments of their program. Along with Haskell's existing support for domain specific languages, you are now free to use new syntactic forms for your EDSLs. We've already seen it used in Yesod or Debug. Another simple use is with [Text.RawString.QQ](http://hackage.haskell.org/package/raw-strings-qq/docs/Text-RawString-QQ.html) to allow multiline strings: +[Quasiquoting](https://wiki.haskell.org/Quasiquotation) allows programmers to use custom, domain-specific syntax to construct fragments of their program. Along with Haskell's existing support for domain specific languages, you are now free to use new syntactic forms for your EDSLs. We've already seen it used in Yesod or Debug. Another simple use is with [Text.RawString.QQ](https://hackage.haskell.org/package/raw-strings-qq/docs/Text-RawString-QQ.html) to allow multiline strings: ```haskell {-# LANGUAGE QuasiQuotes #-} @@ -78,7 +78,7 @@ multiline = [r|
|]
 ```
 
-You can, of course, write your own DSL or simplify the syntax for yourself. All you have to do is implement your [QuasiQuoter](http://hackage.haskell.org/package/template-haskell/docs/Language-Haskell-TH-Quote.html#t:QuasiQuoter) (part of Template Haskell). For example, you can create a simple string-string map with semicolon and newlines:
+You can, of course, write your own DSL or simplify the syntax for yourself. All you have to do is implement your [QuasiQuoter](https://hackage.haskell.org/package/template-haskell/docs/Language-Haskell-TH-Quote.html#t:QuasiQuoter) (part of Template Haskell). For example, you can create a simple string-string map with semicolon and newlines:
 
 ```haskell
 {-# LANGUAGE TemplateHaskell #-}
@@ -152,7 +152,7 @@ Beautiful, right?!
 
 ### Template Haskell
 
-[Template Haskell](http://hackage.haskell.org/package/template-haskell) is a GHC extension to Haskell that adds compile-time metaprogramming facilities. The original design can be found here: http://research.microsoft.com/en-us/um/people/simonpj/papers/meta-haskell/. You could have seen part of it in action in the previous section about quasiquoting but it can do much more although quasiquotes are an important part of it. Great explanation is [here](https://ocharles.org.uk/blog/guest-posts/2014-12-22-template-haskell.html) and [here](https://markkarpov.com/tutorial/th.html).
+[Template Haskell](https://hackage.haskell.org/package/template-haskell) is a GHC extension to Haskell that adds compile-time metaprogramming facilities. The original design can be found here: https://research.microsoft.com/en-us/um/people/simonpj/papers/meta-haskell/. You could have seen part of it in action in the previous section about quasiquoting but it can do much more although quasiquotes are an important part of it. Great explanation is [here](https://serokell.io/blog/introduction-to-template-haskell) and [here](https://markkarpov.com/tutorial/th.html).
 
 ## Dependent and Refinement Types
 
@@ -166,7 +166,7 @@ Dependent types add complexity to a type system. Deciding the equality of depend
 
 ### Agda
 
-[Agda](http://wiki.portal.chalmers.se/agda/pmwiki.php) is a dependently typed functional programming language originally developed by Ulf Norell at Chalmers University of Technology with the implementation described in his PhD thesis. But current version, Agda 2, is a completely rewritten previous Agda from 1999.
+[Agda](https://wiki.portal.chalmers.se/agda/pmwiki.php) is a dependently typed functional programming language originally developed by Ulf Norell at Chalmers University of Technology with the implementation described in his PhD thesis. But current version, Agda 2, is a completely rewritten previous Agda from 1999.
 
 Visit https://github.com/agda/agda where you find some examples as well!
 
@@ -190,7 +190,7 @@ where clauses, with a rule, simple case expressions, pattern matching let and la
 * Totality checking
 * Hugs-style interactive environment
 
-On their website, you can find a documentation with [examples](https://www.idris-lang.org/example/) such as Vectors:
+On their website, you can find a documentation with [examples](https://www.idris-lang.org/pages/example.html) such as Vectors:
 
 ```idris
 infixr 5 ::
@@ -247,8 +247,7 @@ evenList     =  0 `C` 2 `C` 8 `C` N
 ## Further reading
 
 * [Haskell Wiki - Language extensions](https://wiki.haskell.org/Language_extensions)
-* [24 Days of GHC Extensions](https://ocharles.org.uk/blog/pages/2014-12-01-24-days-of-ghc-extensions.html)
 * [Agda](https://github.com/agda/agda)
 * [Idris](https://www.idris-lang.org)
-* [Idris - tutorial](http://docs.idris-lang.org/en/latest/tutorial/)
+* [Idris - tutorial](https://docs.idris-lang.org/en/latest/tutorial/)
 * [LiquidHaskell](https://ucsd-progsys.github.io/liquidhaskell-blog/)
diff --git a/tutorials/images/module-mapping.svg b/tutorials/images/module-mapping.svg
index f45d8f1..5a6737c 100644
--- a/tutorials/images/module-mapping.svg
+++ b/tutorials/images/module-mapping.svg
@@ -1 +1 @@
-
Main
Main
Page 1
Page 1
Page 2
Page 2
Component 1
Component 1
Component 2
Component 2
Component 1
Component 1
Component 2
Component 2
Text is not SVG - cannot display
\ No newline at end of file +
Main
Main
Page 1
Page 1
Page 2
Page 2
Component 1
Component 1
Component 2
Component 2
Component 1
Component 1
Component 2
Component 2
Text is not SVG - cannot display
\ No newline at end of file