Skip to content

Remove Dijkstra Monads for Free from F* 2#4154

Merged
nikswamy merged 4 commits intofstar2from
_fstar2_no_dm4free
Apr 1, 2026
Merged

Remove Dijkstra Monads for Free from F* 2#4154
nikswamy merged 4 commits intofstar2from
_fstar2_no_dm4free

Conversation

@nikswamy
Copy link
Copy Markdown
Collaborator

@nikswamy nikswamy commented Apr 1, 2026

Also remove the deprecated examples/indexed_effects

nikswamy and others added 4 commits March 31, 2026 17:59
Remove the DM4Free feature entirely from the F* compiler:

Compiler changes:
- Delete FStarC.TypeChecker.DMFF module (the core DM4F elaboration)
- Remove DM4F_eff variant from eff_combinators in Syntax.fsti
- Remove CPS cflag from Syntax.fsti and all consumers
- Remove dm4f_bind_range_attr from Parser.Const, Syntax.Util, and
  FStar.Attributes
- Remove cps attribute and M effect from Prims.fst
- Remove is_dm4f, dm4f_lid, dm4f_bind_range_attr from Syntax.Util
- Remove dmff_cps_and_elaborate from TcEffect
- Remove DM4F elaboration path from TypeChecker.Tc
- Remove DMFF-based sub-effect lift code from TcEffect
- Remove dm4f_bind_range checks from Normalize and NBE
- Remove Error_UnexpectedDM4FType error code
- Change desugarer to produce a hard error for DM4F-shaped effects
- Remove is_special_effect_combinator and DM4F projector desugaring
- Update all DM4F_eff case arms in Syntax.Util, VisitM, Resugar,
  Print, Hash, NBETerm

Examples and tests removed:
- examples/dm4free/ (all DM4F effect definitions)
- examples/rel/ (depends entirely on dm4free modules)
- examples/printf/SimplePrintfReify.fst (uses DM4F)
- examples/old/FStar.DM4F.BasicIntST.fst
- tests/micro-benchmarks/Test.ReifyNBE.fst (uses DM4F)
- tests/bug-reports/closed/Bug706.fst (uses DM4F)

Note: examples/layeredeffects/DM4F*.fst are kept — they simulate the
DM4F pattern using layered effects and do not use the removed feature.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The README states these are deprecated in favor of layered effects
(examples/layeredeffects). Remove the directory and its Makefile entry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Delete 15 test files that used the removed Prims.M effect
  (MRefST, UnifyReify, Bug705/707/709/710/711/713,
   Bug1141a/c/d, Bug1187, Bug1536, Bug1621, Bug1841)
- Accept updated expected outputs for Prims.fst line number shifts
  in error-messages, IDE, and Pulse bug-report tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nikswamy nikswamy merged commit 1cb0aca into fstar2 Apr 1, 2026
14 checks passed
@nikswamy nikswamy deleted the _fstar2_no_dm4free branch April 1, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant