@@ -929,11 +929,9 @@ let rec emitClass flags overrideFunc (ctx: Context) (current: StructuredText) (c
929
929
| InheritingType.Other t -> [ t])
930
930
|> List.map ( getKnownTypes innerCtx)
931
931
932
- // We only need the anonymous interfaces that appear in the members
933
932
yield
934
933
c.members
935
934
|> Seq.collect ( snd >> findTypesInClassMember ( knownTypeFinder innerCtx) ())
936
- // |> Seq.filter (function KnownType.AnonymousInterface _ -> true | _ -> false)
937
935
|> Set.ofSeq
938
936
939
937
yield !
@@ -1617,8 +1615,8 @@ module EmitModuleResult =
1617
1615
let empty : EmitModuleResult =
1618
1616
{| imports = []; types = []; impl = []; intf = []; comments = [] |}
1619
1617
1620
- let rec emitModule ( dt : DependencyTrie < string >) flags ctx st =
1621
- let isLinear = DependencyTrie.isLinear dt // compute only once
1618
+ let rec emitModule ( dt : DependencyTrie < string >) flags ( ctx : Context ) st =
1619
+ let isLinear = ctx.options.noTypesModule || DependencyTrie.isLinear dt // compute only once
1622
1620
let rec go ( flags : EmitModuleFlags ) ( ctx : Context ) ( st : StructuredText ) : EmitModuleResult =
1623
1621
let renamer = new OverloadRenamer()
1624
1622
let children =
@@ -1750,6 +1748,20 @@ let rec emitModule (dt: DependencyTrie<string>) flags ctx st =
1750
1748
]
1751
1749
1752
1750
let impl =
1751
+ let fixmeRecursiveModules ( ms : TextModule list ) =
1752
+ match ms with
1753
+ | [] -> []
1754
+ | [ m] -> [ Statement.moduleVal m]
1755
+ | _ when ctx.options.noTypesModule ->
1756
+ [ yield
1757
+ commentStr (
1758
+ sprintf " FIXME: start of recursive definitions (%s )"
1759
+ ( ms |> List.map ( fun m -> m.name) |> String.concat " , " )
1760
+ )
1761
+ yield ! Statement.moduleValMany ms
1762
+ yield commentStr " FIXME: end of recursive definitions" ]
1763
+ | _ -> Statement.moduleValMany ms
1764
+
1753
1765
let children =
1754
1766
children
1755
1767
|> List.filter ( fun ( _ , _ , c ) -> c.impl |> List.isEmpty |> not )
@@ -1760,7 +1772,7 @@ let rec emitModule (dt: DependencyTrie<string>) flags ctx st =
1760
1772
else
1761
1773
c.imports @ c.impl
1762
1774
{| k with content = content; comments = c.comments |})
1763
- |> Statement.moduleSCC dt Statement.moduleValMany Statement.moduleValMany ctx
1775
+ |> Statement.moduleSCC dt fixmeRecursiveModules Statement.moduleValMany ctx
1764
1776
let typeDefs =
1765
1777
items |> List.choose ( function
1766
1778
| TypeAliasText t -> Some t
0 commit comments