Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7538235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:04:21+00:00 2026-05-30T07:04:21+00:00

How do you use a module-level let binding to bind two private values to

  • 0

How do you use a module-level let binding to bind two private values to records in a tuple?

type private T = {F:int}
let private a = {F=1}
let private b, private c = {F=2}, {F=3}

In this example, a works fine, but the bindings for b and c each fail with the error:

error FS0410: The type 'T' is less accessible than the value, member or type 'val patternInput : T * T' it is used in

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:04:22+00:00Added an answer on May 30, 2026 at 7:04 am

    To see why this doesn’t work, decompile it with Reflector. You’re creating a tuple and immediately destructuring it. In debug mode anyway, the intermediate tuple is created as an internal field of the enclosing type (an implementation detail of the pattern match). Of course, that makes it more accessible than T, which is private. I’m curious to know if this is a bug (seems like it).

    EDIT

    It gets weirder…

    The following fails to compile (with syntax error), but compiles fine if the types are public and let, instead of let private, is used.

    type private T = {a:int; b:int}
    let private t = {a=0; b=0}
    let private {a=a; b=b} = t //syntax error
    
    type private U() = class end
    let private ul = [U()]
    let private [u] = ul //syntax error
    

    I think it’s safe to say destructuring in module-level private let bindings has some problems.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to understand js module patterns in use with jQuery. I've edited this
I've seen people use monkey-patching to set options on a module, for example: import
I use Module Autoloader to autoload resources (forms, Doctrine models etc.). I do not
I want to use a module as a singleton referenced in other modules. It
Is there an easy-to-use python module that'd do english or finnish text validation? It'd
I have 2 perl modules every module use the second one i.e Module1.pm use
Situation: In Drupal, when you use Views module, it restricts to display Search Form
I am attempting to use the 'tempfile' module for manipulating and creating text files.
I need to define the constant in the module that use the method from
When building a multi-lingual website (with ASP.NET web forms), I'll use an HTTP module

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.