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

Mind map

Making Our Own Types and Typeclasses

JUAN SEBASTIÁN JIMÉNEZ NIETO Spanish

Map content

Making Our Own Types and Typeclasses

  1. Algebraic data types intro

    • data types
      • Bool
      • Int
      • Char
      • Maybe
  2. Record syntax

    • Store information
      • data values
    • Getters and Setters
    • Status function
  3. Type parameters

    • constructor
      • values parameters
      • produce new values
    • Values can arrays
    • Parameters containin more data
    • parameterized data
    • in Haskell to never add typeclass constraints in data declarations.
  4. Derived instances

    • Typeclasses 101
      • typeclass
        • sort of an interface that defines some behavior
    • functions defined by the typeclasses
    • typeclasses
      • Eq
      • Ord
      • Enum
      • Bounded
      • Show
      • Read
      • just
  5. Type synonyms

    • types are equivalent and interchangeable
    • giving some types different
    • distinction between type constructors and value constructors
      • Either
      • Maybe
      • Nothing
  6. Recursive data structures

    • constructors have fields that are of the same type
      • recursive data types
    • constructor
      • cons
    • define functions as operators
  7. Typeclasses 102

    • our own typeclasses
    • types instances of our typeclasses
    • cicles
      • for
      • where
        • Eq
    • instance keyword.
      • defining new typeclasses and instance
    • subclasses of other typeclasses
  8. A yes-no typeclass

    • strictly using Bool
    • boolean semantics works
      • tells us for sure if it's true or not
    • takes one value
  9. The Functor typeclass

    • things that can be mapped over
    • fmap
      • can hold
        • Int
        • Char
        • Bool
    • works only on lists
    • is just map
    • Types that can act like a box can be functors
  10. Kinds and some type-foo

    • types are applied to type constructors
    • kinds
      • little labels
    • mapped the f over the first field

Information

Description
Mind Map on Making Our Own Types and Typeclasses, created by JUAN SEBASTIÁN JIMÉNEZ NIETO on 23/09/2018.
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?