Visible type applications

Contents
  • Exploring in GHCi
  • Clarifying point-free functions
  • Resolving type ambiguity
  • Increasing type safety
Video
  • 7 minutes

TypeApplications allows you to instantiate one or more of a polymorphic function’s type arguments to a specific type. Use the @ keyword to apply the function to a type. This has a lot of benefits both for learning and for writing code.

The TypeApplications GHC extension first appeared in GHC 8.0. GHC documentation for TypeApplications.

Sign up for access to the full page, plus the complete archive and all the latest content.