Mind map
Expression's Type
Map content
Expression's Type
Compilation Time
- More Secure Code
- Error Capture
- Greater control of execution
Inference of Types
- No need to Specify
- "Label" of each expression
- Related to a Category
- Command :t tells us the type of Expression
- expression :: type
Functions
- Give it an explicit type in the declaration
- Separated by ->
- There are no differences between Parameters and the type that it returns.
- Returns: Last element of the declaration
- Parameters: Remaining
- Give it an explicit type in the declaration
Used Types
- Int
- Integer
- Float
- Double
- Bool
- Char
Variable Types
- It does not start in uppercase
- Polymorphic functions
- Take any type and return it
- They are usually letters (a, b, c, d, e ...)
Classes Types
- Define behavior
- Operators are Functions!
- Before the => is Class restriction
- Used Classes
- Eq: Comparison =
- Ord: Order
- Show: Text Chains Samples
- Read: Resolve Chains and return something!
- Enum: Sequentially Ordered
- Bounded
- Num: Number Type
- Integral: Whole Numbers
- Floating: Floating comma
Information
- Description
- Ingeniería Mind Map on Expression's Type, created by Daniel Almanza on 18/02/2018.
- Created by
- Daniel Almanza
- Views
- 0
- Rating
More on Data Types and Typeclasses