Quantcast
Channel: Active questions tagged type-providers - Stack Overflow
Browsing latest articles
Browse All 42 View Live

Using reflection in type providers to mimic RFC FS-1023

As I understand it, only primitive types can be given as parameters to a type provider so you can't do something like TypeProvider<Option<int>> but you can do...

View Article


Image may be NSFW.
Clik here to view.

F#: Providing type annotation for overloaded constructor

I'm getting a FS0041 error for an overloaded constructor, and I can't find my way around it.Here are two screenshot of my attempts:and:How can I execute the desired constructor?

View Article


Is there a way to enumerate JSON properties using F# JsonProvider?

I parse some data in JSON format using F# and JSON Type Provider.example.json:{"contracts": {"11": {"id": 11,"date": "08.01.2021" },"12": {"id": 12,"date": "09.01.2021" },"13": {"id": 13,"date":...

View Article

F# quotation with spliced parameter of any type

I am trying to develop F# type provider.It provides some DTOs (with the structure described in some external document) and a set of methods for processing them. The processing algorithm is based on...

View Article

Not being able to build F# type provider SDK

I have finally come across something that no one else seemed to have come across (at least from what I can tell). I trying to build an F# type provider using TypeProviders.SDK.As soon as I build the...

View Article


Image may be NSFW.
Clik here to view.

Is it possible to use a custom type with the FSharp.Data.CsvProvider when...

I'm working in F# with a CSV that looks like this:When,Where,HowMuch11/24/2019,Germany,100 EUR11/25/2019,France,100 EUR11/26/2019,Switzerland,50 CHF11/27/2019,USA,75 USDI'm using the CSV Type Provider...

View Article

Image may be NSFW.
Clik here to view.

F# Type Provider Set Optional Field With Required Parameter, Getting a...

I'm trying to build a type provider for Bloomberg (they provide schema xml files that describe the types). I'm able to generate types that look like the following class:type Example(x:...

View Article

Error while using type provider 'FSharp.Configuration.ResourceProvider'

I just loaded FSharp.Configuration in paket files and created a type withopen FSharp.Configurationtype ResourceProvider = ResXProvider<file="Resources/Strings.resx">In Strings.resx are resources...

View Article


JSON Type provider with Saturn Framework `Controller.getModel` not working

I've some trouble getting my type to work with Saturn and the JSON type-provider. My type: (generated by the typeprovider)[<CLIMutable>]type FeatureModel = JsonProvider<"../example.json">My...

View Article


JSON TypeProvider and null values in arrays

This codeopen FSharp.Data[<Literal>]let sample = """ { "foo": [ 10, null ] }"""type InputTypes = JsonProvider<sample>InputTypes.Parse(sample).Foo |> DumpResults in Foo being type int[]...

View Article

F# WSDL Type Provider and Confluence

When I use the WSDL Type provider to create a client for Confluence SOAP service then I get all methods with (unit -> unit) signature.#r "System.ServiceModel.dll"#r...

View Article

F# SQL type provider sample: `dotnet build` works, but VS fails

I'm having a hard time understanding why this very basic sample of F# type providers (using the SqlProvider nuget package) builds fine in Windows in the command line but in VS2022 it...

View Article

F# SqlProvider: System.Exception: Error - you cannot update an entity that...

I'm using the SQLProvider type-provider project: https://fsprojects.github.io/SQLProvider/As the documentation states on CRUD usage, I'm trying to update a row like this: let...

View Article


Using JsonProvider from Fsharp.Data for Binance-Request

I'm trying to work with the Binance-Connector for .NET. In the F#-Examples, we have the following:let f = let loggerFactory = LoggerFactory.Create(fun (builder:ILoggingBuilder) ->...

View Article

Could not find file Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream

I'm running an Azure Function locally in Visual Studio but receive the error "Could not find file...

View Article


Using type providers (specifically SwaggerProvider) in a Fable application

I am trying to use SwaggerProvider with Fable (is this even possible?)//.fsproj<Project...

View Article

The type provider 'FSharp.Data.SqlCommandProvider' reported an error:...

I'm trying to create a small F# script that will be using FSharp.Data.SqlClient or other SQL Type Prodiver. I also tried SQLProvider. I always get the following error :The type provider...

View Article


F# Type Provider for postgresql raw queries compatible with .NET6+?

I realize there's similar questions about this on SO however a lot of them are over 5 years old, and the projects they're referring to have since gone stale. For instance this project seems exactly...

View Article

How to translate words from English into Arabic. With this files lib >...

I have the Flutter Android application. I want to translate words into an application, but this method is strange to me. I do not have enough experience in dealing with translation.See photoSee...

View Article

Could not load file or assembly Microsoft.Bcl.AsyncInterfaces

I can not use the SqlType provider due to an issue with Microsoft.Bcl.AsyncInterfaces.I am using a minimal program with .NET 4.7.2 and F# 4.7.0.0.My Nuget packages contain a reference to: package...

View Article

How do I create dynamic type providers based on user input?

I want to allow users to provide complex objects, i.e System.Diagnostics.Process[].I see the documentation of type providers for JSON, CSV, HTML, etc. but I didn't see any type providers for normal...

View Article


Is there a F# type provider for DacPac file

I wonder if there is a F# generative type provider that can be bound to a dacpac file that behave like DbmlFile type provider except for a visual studio database project output.What I am trying to...

View Article


Accessing data from a SqlDataProvider

I'm using the SQlProvider in a project to query a database and perform CRUD operations. I come from C#/Entity-Framework background, so my normal approach would be to use a generic repository. The...

View Article

F# PostgreSQL connection with SQLprovider failing without error in project...

I am connecting to a local PostgreSQL db using SQLprovider in F#. The code works in interactive and intellisense is detecting the tables in the database fine, but the compiled project breaks when it...

View Article

Performance implications of using several F# type providers at once

In my project, I am currently using SqlCommandProvider for the simple SQL cases, and SqlDataConnection with FSharpComposableQuery for the more complex, dynamic SQL queries. Will this result in extra...

View Article


How to get SQLProvider working on mono with Npgsql?

I've created a minimal reproduction here: https://github.com/mushishi78/transaction-minimal-reproductionEssentially I've hit a NotImplementedException given by mono's TransactionInterop that seems to...

View Article

FSharp.Data.Sql.SqlProvider slow at design time

I have already used SqlProvider in the past. This time I am working on a large database and unfortunately it is too slow at design time.open FSharp.Data.Sql[<Literal>]let private connectionString...

View Article

Preserving Field names across the F#/C# boundary

As a learning exercise, I am doing some data analysis on a 5000-line csv file using F# and F#'s type-provider functionality. When I use the type-provider-generated type in f#, naturally the header rows...

View Article

Image may be NSFW.
Clik here to view.

F# FSharp.Data.SqlClient error 0x8007007E

I'm attempting to implement the very first example from here and I'm getting Unable to load DLL 'sni.dll' or one of its dependencies error. I have .NET 8/VS Code. Any thoughts?#r "nuget:...

View Article



Invalid object name 'syscomments' when connecting to SQL database in Azure

I am trying to use the SqlDataConnection type provider to connect to a SQL database on Azure. type dbSchema = SqlDataConnection<"Server=tcp:123456.database.windows.net,1433;Database={database};User...

View Article
Browsing latest articles
Browse All 42 View Live


Latest Images