8

Does anyone know what type providers are available on tryfsharp.org?

For example, I know that a CsvFile type provider is available by referencing:

#r "Samples.Csv.dll"

Additionally, there are:

#r "Samples.Hadoop.TypeProviders.dll"
#r "Samples.DataStore.Freebase.dll"

But what others can be used? It would be cool if an XML or JSON type provider were available. I can't seem to find any documentation on what dll's can be referenced in a script on tryfsharp.org.

Anyone have additional information on the matter?

jruizaranguren
  • 12,679
  • 7
  • 55
  • 73
Joshua
  • 4,099
  • 25
  • 37
  • 1
    There's also `"Samples.WorldBank.dll"` and `"Samples.WindowsAzure.Marketplace.dll"`. I think that's it. – kvb Mar 21 '13 at 19:13
  • 1
    Oops, one more: `"Samples.Excel.WorksheetTable.dll"`. – kvb Mar 21 '13 at 19:20

1 Answers1

9

The ones you have noticed are all part of the "learning" section of TryFSharp.org . The best way I've found to discover these is to look through the tutorials.

Hadoop

#r "Samples.Hadoop.TypeProviders.dll"

Freebase

#r "Samples.DataStore.Freebase.dll"

CSV

#r "Samples.Csv.dll"

Azure

#r "System.Data.Services.Client"
#r "Samples.WindowsAzure.Marketplace"

WorldBank

#r "Samples.WorldBank.dll"

Excel.WorksheetTable

#r "Samples.Excel.WorksheetTable.dll"

A couple non-type providers (there might be ones I missed):

MathNet.Numerics

#r "MathNet.Numerics.dll"

MathNet.Numerics.Fsharp

#r "MathNet.Numerics.FSharp.dll"

TryFSharp.org 's browser API

open TryFSharp
Canvas.Show()
Canvas.Clear()

Canvas.SetContent "<h1>Try F# interop</h1>Try F# interop rocks!"

Canvas.RunJavaScript "document.getElementsByTagName('h1')[0].innerHTML = 'New title!'"

let raphaelUndefined = Canvas.RunJavaScript "(typeof dojo === 'undefined')"
if raphaelUndefined :?> bool then
    Canvas.LoadScript "http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"

(for this one please note Canvas.LoadScript which allows you to load javascript)

Not a file that needs to be loaded, but there is also:

Samples.Charting.DojoChart

open Samples.Charting.DojoChart

N_A
  • 19,799
  • 4
  • 52
  • 98
  • 1
    The Excel one is a type provider. – kvb Mar 21 '13 at 19:33
  • @kvb Ah, good call. I fixed it, but feel free to correct anything else I've missed. – N_A Mar 21 '13 at 19:35
  • Although I did know about those and was specifically looking for an answer to a JSON or XML TypeProvider, your answer seems to confirm they do not exist. Thanks and good job on the detailed list. – Joshua Mar 25 '13 at 14:12
  • 1
    Not F#, but since you can load javascript in the tryfsharp editor, you could find a javascript xml or json parser and write an F# wrapper for it. http://stackoverflow.com/questions/7949752/cross-browser-javascript-xml-parsing – N_A Mar 25 '13 at 14:24