Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Dev How To
Logo
Dev How To

Table of Contents

  • Command Line
    • Man, Info and Help
    • Shell Built-In Commands
    • Shell Argument Syntax
    • End Of Options ‘–’
    • Echo and Printf
    • Redirections
    • Bash Brace Expansion
    • Bash Parameter Expansion
    • Bash Aliases
    • Bash Arrays
    • du Command
    • Intro
    • grep - Global Regular Expression and Print
    • tar | Command Line
    • Find files and store in array
    • File Conversion
    • HackerRank Shell Challenges and Solutions
    • The End
  • Git
    • Git Commit Messages
    • More Git Commit Message Examples
    • Git Commit Messages
    • Bad Git Commit Messages
    • Git Branches: push, pull, merge and rebase
    • Git Branching
    • Git Merge
    • Git Reset
    • Git Revisions
    • Inspecting a Git Repository
    • Run Commands on Files Based on Git Status
  • Go
    • Intro to Go
    • Unit testing in Go
    • Go Strings
    • Intro to Go arrays
    • Intro to Go slices
    • Go Error Handling
    • Date and Time in Go
  • Text Editors
    • Emacs
      • Emacs Practical Editing Examples
      • Emacs Org-Mode Tips
    • Vim
      • CoC LSP
      • Search and Replace Until Next UpperCase Char
      • Neovim Telescope Tips
  • Haskell
    • Syntax
    • Haskell Sectioning
    • Haskell Programming From First Principles (book)
      • 04 - Data Types
        • Datatypes
        • Data Types Questions and Answers
      • ch09 Exercises :: Lists
  • Ruby
    • Unit Tests | Ruby
    • RSpec | Ruby
    • Scope | Ruby
    • HackerRank Ruby Tutorial
    • Bundler | Ruby
    • RVM | Ruby
    • Pry | Ruby
  • Ruby on Rails
    • Command Line | Ruby on Rails
    • Ruby on Rails and Docker
    • Unit Tests | Ruby on Rails
    • Models and Migrations | Ruby on Rails
  • PureScript
    • Read, Eval, Print, Loop: REPL
    • Type Signatures
    • Functions
    • Modules
    • Types
      • Char and String Types
      • Data Types
      • Number Types
    • Char and String Types
    • Number Types
    • Data Types
    • Lists
    • PureScript Explained
      • const
      • apply, ‘$’
      • applyFlipped, ‘#’
      • Cons (Data.List)
  • JavaScript
    • Logging
    • Arrays
    • Async Examples with Ramda
    • Do It With Ramda Part I
    • Gotchas, Surprises and Pain Points | JavaScript
    • JavaScript Performance
    • LeetCode 30 Days of JavaScript
  • TypeScript
    • tsconfig.json Examples
    • Structural Typing
    • Any and Unknown Top Types
    • Type Aliases and Interfaces
    • Object Types
    • Union Types
    • Intersection Types
    • keyof
    • Mapped Types
    • Functions | TypeScript
    • infer keyword | TypeScript
    • React Component-Related Types
  • Scheme
    • Building and Installing Chicken Scheme 5.3.0rc3 on macOS Big Sur
  • Deno Runtime
    • Project Root Absolute Imports and Import Maps in Deno
  • How to Design Programs
    • Beginning Student Languages
  • Algorithms
    • Big-O of Arrays and Objects
    • Space Complexity Examples
    • Logarithms
    • Problem-Solving
    • Helper Functions
    • Split Int Into Even Parts
  • Mostly Adequate Guide to Functional Programming
    • 02 - First Class Functions
    • 02 Currying
  • Composable Functional JavaScript
    • 01 - Create linear data flow with container style types (Box)
    • 02 - Refactor Imperative to Composed Expression using Box
    • 03 - Enforce a null check with composable code branching using Either
    • 04 - Use chain for composable error handling with nested Eithers
    • 05 - A collection of Either examples compared to imperative code
    • Helper Functions
  • Codewars Challenges
    • 6kyu
      • Find Int That Appears Odd Number of Times
      • Which Are In
      • Friend or Foe
    • 7kyu
      • Sort Numbers
      • Valid Parentheses
      • Vowel Count
      • Simple Fun: Diplomas
  • HackerRank Challenges
    • Problem Solving
      • Diagonal Difference
      • Birthday Cake Candles
      • Compare The Triplets
      • Grading Students
      • Plus Minus
      • Sherlock and Array
      • Staircase
      • Strong Password
      • Time Conversion
      • Camel Case
      • Ice Cream Parlor
      • Missing Numbers
      • Mini Max Sum
    • Easy HackerRank Challenges
      • A Very Big Sum
      • Grading Students
    • Helper Functions
  • Programming
    • Unnest Logic From Inside Conditions
  • Docker
    • Bridge Network Examples
  • Databases and SQL
    • PSQL CLI :: PostgreSQL
    • Useful PostgreSQL Commands
    • Basic SQL
    • Basic HackerRank SQL Challenges
  • Design Patterns
    • Template Method Pattern
    • Strategy Pattern
  • SOLID Principles
    • Open Closed Principle
    • Liskov Substitution Principle
    • Interface Segregation Principle
    • Dependency Inversion Principle
  • Character Encoding
    • Useful Unicode Symbols
  • Software Engineering
  • Miscellaneous Tips
    • PlantUML on Sphinx/Read The Docs
    • Paste Image Into Finder
Back to top
View this page

Types¶

PureScript ships with a few type facilities to help us deal with types. Basically, we have:

  • Type Alias;

  • Data Type;

  • Algebraic Data Types (Product Types and Coproduct or Sum Types);

  • New Type;

See their related pages for more details.

PureScript

  • Char and String Types
    • Char
    • String
    • Unicode
      • Char
      • String
  • Data Types
    • Product and Coproduct types
    • Type Variables
    • :kind
    • More examples
  • Number Types
    • Typing a number
    • Negative Numbers
    • References
Copyright © 2025 Fernando Basso | Text licensed under CC BY-NC-SA 4.0 and code licensed under GPLv3
| Built with Sphinx and @pradyunsg's Furo theme. | Show Source | Dev How To Gitlab Repository