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 7894691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:27:37+00:00 2026-06-03T07:27:37+00:00

I am converting several modules based on OCaml to F# and ran into the

  • 0

I am converting several modules based on OCaml to F# and ran into the OCaml ”Quotation.add” compiler directive for a quotation expander.

A quotation expander is a function written in OCaml. A call to the
Camlp4 library function ”Quotation.add” adds the quotation
expander.

Camlp4 – Tutorial, Ch. 3

After searching for both a quotation expander and the ”Quotation.add” compiler directive in F# books, the F# site, Google and here, the answer I get is no.

Can someone confirm that F# does not support the concept of the OCaml ”Quotation.add” compiler directive or the concept of OCaml quotation expanders.

EDIT

Note: I just learned that Camlp4 is a preprocessor-pretty-printer of OCaml, I thought it was a separate library for OCaml when I asked the question; now it makes sense.

  • 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-06-03T07:27:38+00:00Added an answer on June 3, 2026 at 7:27 am

    You’re correct – the camlp4 library is not available for F#, so I’m afraid you’ll need to use another approach to re-implement the required functionality in F#.

    In general, there are a couple of related technologies that you can use from F# (but it is hard to tell if any of them is useful for you without knowing more about the specific problem):

    • F# Quotations allow you to manipulate F# code, but have limited compilation capabilities (are good i.e. for translating F# to SQL, JavaScript or perhaps GPU)
    • F# CodeDom (from F# PowerPack) allows you to generate code and compile it using F# compiler, but you can either generate code as text or using .NET object-oriented style.
    • T4 Templating is a .NET templating mechanism, though last time I checked, it did not support F# (but I think the Mono version might work)
    • F# Type Providers (thanks to kvb) make it possible to generate types by F# plugin for a compiler. This handles cases where you’re using camplp4 to generate some types to be used later (i.e. from a shorter specification), but they have only limited use if you need to generate some code
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am converting several modules based on OCaml to F# and ran into something
I'm slowly converting my existing code into Delphi 2010 and read several of the
I've got several large MFC applications here, and converting them into any other format
I have been tasked with converting several php classes into java classes, which is
I am in the process of converting several queries which were hard-coded into the
I have evaluated several development tools for converting my informix SQL-based app. They are:
We are upgrading/converting several old Access databases to MS-SQL. Many of these databases have
I have have several lines from a table that I’m converting from Excel to
I've got a medium scale project (a turn-based game) that's currently written in C/C++.
I am converting several VBA projects to Windows form applications. The only problem I

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.