====== HaskSheet ====== This DokuWiki is my personal cheat sheet reagarding the Haskel programming language, tools and its packages (libraries). You are welcome, if this is also useful for you, and if you want to participate. Please, find the discussion boxes at the end. Some more Background about this site is [[background|here]]. ===== My code snippets ===== ==== Basics ==== * [[codesnippets:firsthaskellprogram|First Haskell program]] * [[codesnippets:bindingandpatternmatching|Binding and pattern matching]] * [[codesnippets:letandwhereconstructs|Let and where constructs]] * [[codesnippets:datatypenewtype|Data, type, and newtype]] * [[codesnippets:recordsyntax|Record syntax]] * [[codesnippets:lists|Lists]] * [[codesnippets:tuples|Tuples]] * [[codesnippets:typesignatures|Type signatures]] * [[codesnippets:import|Imports]] * [[codesnippets:patternmatching|Pattern matching, again]] * [[codesnippets:lambdas|Lambdas and currying]] * [[codesnippets:typeclasses|Type classes and its instances, and the deriving mechanism]] * [[codesnippets:typedefaulting|Type defaulting]] * [[codesnippets:listcomprehension|List comprehension]] * GHC extensions and options * ''[[codesnippets:typesynonyminstances|{-# LANGUAGE TypeSynonymInstances #-}]]'' * ''[[codesnippets:flexibleinstances|{-# LANGUAGE FlexibleInstances #-}]]'' * ''[[codesnippets:typeapplications|{-# LANGUAGE TypeApplications #-}]]'' * ''[[codesnippets:fnowarnorphans|{-# OPTIONS_GHC -fno-warn-orphans #-}]]'' * ''[[codesnippets:fnowarnmissingsignatures|{-# OPTIONS_GHC -fno-warn-missing-signatures #-}]]'' * Prelude including its type classes * see also: [[modules:prelude|Prelude overview]] * [[codesnippets:compositionoperator|Composition operator]] * [[codesnippets:folds|Folds]] * [[codesnippets:scans|Scans]] * [[codesnippets:applicative|Applicative]] * [[codesnippets:monads|Monads]] * [[codesnippets:maybe|Maybe]] * [[codesnippets:either|Either]] * [[codesnippets:statemonads|State monads]] ==== Advanced ==== * [[codesnippets:templatehaskell|TemplateHaskell]] * [[codesnippets:hint|Interpreted Haskell code by package hint]] ==== Safety ==== Proposed properties of safety by using ''{-# LANGUAGE Safe #-}'': * type safety * referential transparency, * strict module encapsulation * modular reasoning * semantic consistency * See also [[https://wiki.haskell.org/Safe_Haskell|Safe Haskell]] ==== Use case examples ==== * [[codesnippets:filesystemioandstreams|Filesystem IO and streams]] * [[codesnippets:octets|Octets]] * [[codesnippets:datastructuresfromsymboltrees|Creating data structures from symbol trees]] * [[codesnippets:randomvalues|Random values]] * [[codesnippets:statefuldecoder|Stateful decoder]] * [[codesnippets:twopagesgenericparser|A generic parser on two pages]] * [[codesnippets:accumulatingwithinmonadiccontextswithoutfolds|Accumulating within monadic contexts without folds]] ==== Debugging ==== * [[codesnippets:debugging|Debugging]] ===== Strategies and Methods ===== ==== Structure, types, classes, and so on ==== * [[codesnippets:avoidconflictprelude|Avoiding name conflict with prelude]] * [[codesnippets:parametrictypeforanintermediatevaluewhencombiningfunctions|Parametric type for an intermediate value when combining functions]] * [[codesnippets:equivalentfunctioncompositions|Equivalent function compositions]] ==== Conventions ==== * [[codesnippets:codingconventions|Coding conventions]] * [[codesnippets:testingconventions|Testing conventions]] ==== Haddock Markups ==== * [[codesnippets:haddockexamples|Haddock examples]] ==== Verification and Validation ==== * [[codesnippets:verificationandvalidation|Verification and Validation Plan]] ===== Modules, packages, and libraries ===== * [[modules:prelude|Prelude overview]] ===== Tool Stack ===== * Documentation: * [[https://docs.haskellstack.org/en/stable/README/|The Haskell Tool Stack]] * [[https://www.fpcomplete.com/blog/2015/08/new-in-depth-guide-stack/|New in-depth guide to stack - by FPComplete]] * [[toolsetup:testframework|Test framework setup]] * [[toolsetup:lateststackresolver|Latest stack resolver]] * [[toolsetup:listinginstalledpackages|Listing installed packages]] * [[toolsetup:buildingapackagelocally|Building a package locally from source]] ===== More Tools ===== * [[https://tryhaskell.org/|Try Haskell - an online Haskell interpreter]] ===== Further sources ===== ==== Search, and lookup ==== * **[[https://hoogle.haskell.org/|Hoogle]]** * [[https://hackage.haskell.org/package/CheatSheet-2.9/src/CheatSheet.pdf|Haskell Cheat Sheet]] ==== Reference ==== * [[https://www.haskell.org/|haskell.org]] * [[https://www.haskell.org/documentation/|haskell.org - Dokumentation]] * [[https://www.haskell.org/definition/haskell2010.pdf|Haskell 2010 Language Report]] * [[https://downloads.haskell.org/~ghc/latest/docs/html/libraries/|latest Libraries at haskell.org]] * [[https://www.stackage.org/|Stackage]] ==== For beginners ==== hard enough... * [[http://learnyouahaskell.com/chapters|Learn You a Haskell for Great Good!]] ==== Advanced ==== * [[https://smunix.github.io/dev.stephendiehl.com/hask/tutorial.pdf|What I Wish I Knew When Learning Haskell]] ==== Supplementary ==== * [[https://riptutorial.com/haskell|RIP Tutorial - Haskell]] * [[https://en.wikibooks.org/wiki/Haskell|Wikibooks - Haskell]] ===== Videos ===== * [[https://www.youtube.com/c/GrahamHuttonNotts/videos|Graham Hutton on YouTube]], lectures about: * Types and type classes * List comprehensions * Recursion * Higher order functions * Applicative functors * Monads * ... * [[https://www.youtube.com/channel/UC3xdLFFsqG701QAyGJIPT1g/videos|Philipp Hagenlocher on YouTube]], at least 43 lectures about: * Haskell basics topics, like types, let and where * Haskell intermediate topics, like folds * Haskell advance topics, like monad transformers * [[https://www.youtube.com/watch?v=iSmkqocn0oQ|Simon Peyton Jones - Haskell is useless]] * I love this video! * [[https://www.youtube.com/watch?v=QyJZzq0v7Z4|Why isn't functional programming the norm? – Richard Feldman]] * Conclusion: Let's build a game changing application with haskell! ===== Contact ===== * [[communication:contactform|Contact form]] ===== Legal stuff ===== * [[legal:imprint|Imprint]] * [[legal:privacypolicy|Privacy policy]] * [[legal:license|License]] ===== ✎ ===== ~~DISCUSSION~~