Haskell from Another Site
()
About this ebook
Build your knowledge of Haskell types with this insightful resource.
The first book of its type on learning how types work in the Haskell programming language. It contains many simplified diagrams and descriptions of methods, datatypes, newtypes, and classes. The first two chapters help you configure the IDE, stack, and cabal so that you can practice writing and understanding type signatures while reading the rest of the book. The author mainly teaches how to deal with errors that occur.
It covers a wide variety of topics, including:
- IDE configuration (Visual Studio Code)
- Cabal and Stack
- Comparison of Cabal file contents to Package.yaml
- Reading and understanding errors when using Stack
- Links to additional resources
- Reading and understanding documentation
- Reading and understanding source code
- Type signatures prediction
- Lambdabot commands
This book is ideal for people who know anything about the language but are not yet able to explore new areas of the language on their own. If you haven't figured out how to deal with programming in this language, then all the more reason this book is for you.
Jagoda Górska
I'm a graduate Computer Science and Econometrics at the College of Economics and Computer Science in Cracow, where I wrote my thesis on the usage of functional languages in business. Since 2015, I have been active as a programming languages enthusiast, writing patches and developing open source programs from time to time through a version control system. Since 2021, I'm is also developing as an electronics engineer.
Related to Haskell from Another Site
Related ebooks
Beginning x64 Assembly Programming: From Novice to AVX Professional Rating: 0 out of 5 stars0 ratingsLearn Multithreading with Modern C++ Rating: 0 out of 5 stars0 ratingsRust for C++ Programmers: Learn how to embed Rust in C/C++ with ease (English Edition) Rating: 0 out of 5 stars0 ratingsGetting Started with Docker Rating: 0 out of 5 stars0 ratingsArch Linux: Fast and Light! Rating: 3 out of 5 stars3/5Higher-Order Perl: Transforming Programs with Programs Rating: 5 out of 5 stars5/5Julia for Data Analysis Rating: 0 out of 5 stars0 ratingsClassic Computer Science Problems in Swift: Essential techniques for practicing programmers Rating: 0 out of 5 stars0 ratingsClojure Programming Cookbook Rating: 0 out of 5 stars0 ratingsCommon LISP: The Language Rating: 4 out of 5 stars4/5The Clojure Workshop: Use functional programming to build data-centric applications with Clojure and ClojureScript Rating: 0 out of 5 stars0 ratingsThe Joy of Clojure Rating: 4 out of 5 stars4/5Modern C for Absolute Beginners: A Friendly Introduction to the C Programming Language Rating: 0 out of 5 stars0 ratingsClojure Web Development Essentials Rating: 0 out of 5 stars0 ratingsLearn ClojureScript: Functional programming for the web Rating: 0 out of 5 stars0 ratingsCommon LISP: A Gentle Introduction to Symbolic Computation Rating: 4 out of 5 stars4/5Scala in Action Rating: 0 out of 5 stars0 ratingsGet Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond Rating: 0 out of 5 stars0 ratingsGetting Started with LLVM Core Libraries Rating: 0 out of 5 stars0 ratingsLearning Shell Scripting with Zsh Rating: 0 out of 5 stars0 ratingsGit in Practice Rating: 4 out of 5 stars4/5Graph Databases in Action: Examples in Gremlin Rating: 0 out of 5 stars0 ratingsGet Programming with Haskell Rating: 0 out of 5 stars0 ratingsClean C++20: Sustainable Software Development Patterns and Best Practices Rating: 0 out of 5 stars0 ratingsVim: The Basics Rating: 1 out of 5 stars1/5Essential Algorithms: A Practical Approach to Computer Algorithms Using Python and C# Rating: 5 out of 5 stars5/5Classic Computer Science Problems in Java Rating: 0 out of 5 stars0 ratingsVisualizing Graph Data Rating: 0 out of 5 stars0 ratingsMath for Programmers: 3D graphics, machine learning, and simulations with Python Rating: 4 out of 5 stars4/5Rx.NET in Action Rating: 0 out of 5 stars0 ratings
Programming For You
Java for Beginners: A Crash Course to Learn Java Programming in 1 Week Rating: 5 out of 5 stars5/5Game Development with Unreal Engine 5: Learn the Basics of Game Development in Unreal Engine 5 (English Edition) Rating: 0 out of 5 stars0 ratingsExcel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5HTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5C# Programming from Zero to Proficiency (Beginner): C# from Zero to Proficiency, #2 Rating: 0 out of 5 stars0 ratingsPython Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5Python: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Learn JavaScript in 24 Hours Rating: 3 out of 5 stars3/5Python QuickStart Guide: The Simplified Beginner's Guide to Python Programming Using Hands-On Projects and Real-World Applications Rating: 0 out of 5 stars0 ratingsPYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5Python Machine Learning By Example Rating: 4 out of 5 stars4/5Problem Solving in C and Python: Programming Exercises and Solutions, Part 1 Rating: 5 out of 5 stars5/5Python Data Structures and Algorithms Rating: 5 out of 5 stars5/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5The Unofficial Guide to Open Broadcaster Software: OBS: The World's Most Popular Free Live-Streaming Application Rating: 0 out of 5 stars0 ratingsPython GUI Programming Cookbook - Second Edition Rating: 5 out of 5 stars5/5Learn SQL in 24 Hours Rating: 5 out of 5 stars5/5
Reviews for Haskell from Another Site
0 ratings0 reviews
Book preview
Haskell from Another Site - Jagoda Górska
Haskell from Another Side
Copyright 2021 Jagoda Górska
Published by Jagoda Górska at Smashwords
Smashwords Edition License Notes
This ebook is licensed for your personal enjoyment only. This ebook may not be re-sold or given away to other people. If you would like to share this book with another person, please purchase an additional copy for each recipient. If you’re reading this book and did not purchase it, or it was not purchased for your use only, then please return to your favorite ebook retailer and purchase your own copy. Thank you for respecting the hard work of this author.
Table of Contents
Preface
1. Programming with IDE
2. Stack and Cabal configuration
Information inside stack.yaml
Information inside package.yaml and .cabal
Appearance of the Setup.hs file depending on the build type
Fixing continuous inconsistency in dependency versions
Frequently asked questions about stack and cabal
3. Use of documentation on the example of a base package
Reading datatype
Reading newtype
Reading class
Reading functions
4. Reading and understanding source code
5. Type signature prediction
6. Understanding error messages
7. Lambdabot and Hackage
Send Feedback
About the Author
Connect with me
Preface
This book sheds a slightly different light on programming in Haskell. It is not a typical book that sticks to preconceived rules. The purpose of the book is to help someone who is interested in learning the language but does not know how to deal with it. The book should be treated as a bridge to discover the world of this language on your own, which will eventually allow you to get closer to advanced topics after some time. If you are very experienced and know a lot, you may find the tips a bit unusual or confusing. Nevertheless, I encourage you to read it because maybe it will help you find your own way to develop in this language.
Who is this book for?
This book is for people who have a basic understanding of the Haskell language, but have lost the courage to learn further or have difficulty in understanding it. It is an ideal book for those who have not yet found a way to explore things unknown to them in this world and would like to be more independent. After all, it is not the what
but the how
that is more important.
1. Programming with IDE
Many people have no idea what to program in when it comes to IDEs. However, there are some solutions that are multiplatform, and you can read about them at wiki.haskell.org/IDEs. The first example that comes to my mind is the free Visual Studio Code, which offers many extensions for this programming language. I use it most often myself.
If you want to see these extensions, you need to select the sixth icon, counting from top to bottom. If you look closely, you will see these icons on the left side. The icon we are interested in is highlighted in white in the picture (and marked in red by me). However, you should remember one thing before you start using these extensions. It is worth reading sections like requirements
or configuration
, without which the extension will not work properly or even at all. For example, for the haskell-linter
extension it looks like this:
From the content, it seems that the hlint
package version 1.9.1 or above is required for the extension to work. The path, where the package was installed, should be visible in the IDE and the place where this path should be included is shown in the illustration. So let's install hlint
with the stack or cabal. If you don't have them installed, download from the repository, if you have Linux or if not – from the official website. On this website everything is listed for each system. Install the package like this:
stack update
stack install hlint
or:
cabal update
cabal install hlint
If we want to open a terminal in this IDE, look above in the main menu, in the Terminal
tab and select New Terminal
. When the terminal appears, type the stack or cabal commands. We did not specify the program version because in that case, after stack update
or cabal update
we will install the latest available package version (unless we are installing inside a project that contains its own stack.yaml file. If you want to start by generating a project, see further).
If we want to add configuration content as we are asked to, we obviously need to know where. When the extension is installed, a gear appears instead of the blue Install
button if, of course, you have previously clicked on it with your mouse. You have to select this gear and choose Extension Settings
:
In the image below, we see the setting options for our extension. However, we want to put a line which we still remember about. This line must be placed in settings.json, and we