F# Type Providers

F# Type Providers

lightning talk presented at Milwaukee Functional Programming group in March 2018

2fe1b2866cfd498a513295d60d5cad0f?s=128

Joel Clermont

March 06, 2018
Tweet

Transcript

  1. 2.

    What is a type provider? "An F# type provider is

    a component that provides types, properties, and methods for use in your program. Type providers are a significant part of F# 3.0 support for information-rich programming.” https://docs.microsoft.com/en-us/dotnet/articles/fsharp/tutorials/type-providers/index
  2. 3.

    So . . . code generation? • Real-time • Only

    lives inside compiler (erased types) • Leverages power of F# type system
  3. 4.

    Why use them? • Deal with external data in a

    type-safe way • Very low friction for quickly interacting with data • Not an SDK that has to be versioned, updated, etc
  4. 5.
  5. 6.

    Windows only? • Almost ready for primetime with .NET Core

    2.1 • FSharp.Data ported, many others being updated
  6. 7.

    Next steps • Original paper “Types from data: Making structured

    data first-class citizens in F#”
 http://tomasp.net/academic/papers/fsharp-data/fsharp-data.pdf • Check out some type providers
 https://github.com/fsprojects/awesome-fsharp#type-providers • Build your own type provider
 https://docs.microsoft.com/en-us/dotnet/fsharp/tutorials/type- providers/creating-a-type-provider • Learn F#
 https://www.manning.com/books/get-programming-with-f-sharp