GoConqr has a new look! Let us know what you think.

Mind map

Making Our Own Types and Typeclasses

JUAN DAVID PARDO REINA Spanish

Map content

Making Our Own Types and Typeclasses

  1. Algebraic data types intro

  2. Data

    • defining a new data type
  3. |

    • Constructor
  4. deriving

  5. module

    • write funcions between commas
      • Ending with, where
  6. Record syntax

    • we've been tasked with creating a data type that describes a person. The info that we want to store about that person is: first name, last name, age, height, phone number, and favorite ice-cream flavor.
  7. Type parameters

    • A value constructor can take some values parameters and then produce a new value
    • type constructors can take types as parameters to produce new types
  8. Derived instances

    • typeclass is a sort of an interface that defines some behavior
    • A type can be made an instance of a typeclass if it supports that behavior
  9. Type synonyms

    • types are equivalent and interchangeable
    • ype synonyms don't really do anything per se, they're just about giving some types different names so that they make more sense to someone reading our code and documentatio
  10. Recursive data structures

    • a constructor in an algebraic data type can have several (or none at all) fields and each field must be of some concrete type. With that in mind

Information

Description
Mind Map on Making Our Own Types and Typeclasses, created by JUAN DAVID PARDO REINA on 30/03/2019.
Views
0
Rating

More on Data Types and Typeclasses

Feedback

What is it about?

What do you think of the new look?

How do you like it?