$30 off During Our Annual Pro Sale. View Details »

F# Type Providers

F# Type Providers

lightning talk presented at Milwaukee Functional Programming group in March 2018

Joel Clermont

March 06, 2018

More Decks by Joel Clermont

Other Decks in Programming


  1. F# Type Providers

    View Slide

  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.”


    View Slide

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

    • Only lives inside compiler (erased types)

    • Leverages power of F# type system

    View Slide

  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

    View Slide

  5. DEMO

    View Slide

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

    • FSharp.Data ported, many others being updated

    View Slide

  7. Next steps
    • Original paper “Types from data: Making structured data
    first-class citizens in F#”


    • Check out some type providers


    • Build your own type provider


    • Learn F#


    View Slide