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

Mind map

Modules

ORJUELA GARCIA LUIS HERNANDO Ingeniería Spanish

Map content

Modules

  1. Allow code reuse

  2. Import modules using "import <module name>"

  3. In GHCI you can add modules using ":m + <module name>

    • you can hide functions from the imported module using hiding keyword
    • To avoid namespace collision can add qualified keyword
      • Add an alias using as <alias>
  4. haskell has a standart library

    • A library is composed by modules
      • Data.LIst
        • Is a standard module to work with lists
        • has list functions
          • intersperse
          • Intercalate
          • transpose
          • Concat
          • ConcatMap
          • ETC ...
      • Data.Char
        • It's a standard module to work with characters
        • Has functions
          • isControl
          • isSpace
          • IsMark
          • IsNumber
          • ETC ...
      • Data.Map
        • Association list aslo called Dictionaries
        • Has functions
          • fromLIst
          • Empty
          • insert
          • null
          • Size
          • toList
          • ETC ...
      • Data.Set
        • They are like a sets in mathematics
          • Have functions to operate sets
            • fromList
            • Intersection
            • Difference
            • Union
            • ETC...
        • Must have a qualified import
          • Clash with list and prelude
    • The standard library import the prelude module by defect
  5. Are composed by functions, types and typeclasses

  6. Can make custom modules

    • use module <module name> (<functions to add>) where <function derfinion>

Information

Description
Ingeniería Mind Map on Modules, created by ORJUELA GARCIA LUIS HERNANDO on 24/09/2019.
Views
0
Rating

More on Haskell Modules and Libraries

Feedback

What is it about?

What do you think of the new look?

How do you like it?