@@ -118,7 +118,7 @@ Erlang modules implementing F# core types:
118118| fable_comparison.erl | Comparison | compare/2 returning -1/0/1 | Done |
119119| fable_char.erl | Char utilities | is_letter/digit/upper/lower/whitespace | Done |
120120| fable_convert.erl | Type conversions | Robust to_float handling edge cases | Done |
121- | fable_reflection.erl | Reflection helpers | Type info as Erlang maps | Done |
121+ | fable_reflection.erl | Reflection | Full FSharpType/FSharpValue support: TypeInfo as maps, record/union/tuple/function type tests, GetRecordFields/MakeRecord, GetUnionFields/MakeUnion, GetTupleFields/MakeTuple, PropertyInfo.GetValue | Done |
122122| fable_result.erl | Result | {ok, V} or {error, E} | Done |
123123| fable_set.erl | FSharpSet | ordsets (sorted lists), fold/map/filter/partition/union_many/intersect_many | Done |
124124| fable_async_builder.erl | AsyncBuilder | CPS builder operations (bind, return, delay, etc.) | Done |
@@ -342,7 +342,7 @@ decision trees, and let/letrec bindings all produce correct Erlang output.
3423422 . Compiles tests to ` .erl ` via Fable (library files auto-copied to ` fable_modules/fable-library-beam/ ` )
3433433 . Compiles library ` .erl ` files in ` fable_modules/fable-library-beam/ ` with ` erlc `
3443444 . Compiles test ` .erl ` files with ` erlc -pa fable_modules/fable-library-beam `
345- 5 . Runs an Erlang test runner (` erl_test_runner.erl ` ) with ` -pa fable_modules/fable-library-beam ` that discovers and executes all ` test_ ` -prefixed functions (2022 Erlang tests pass)
345+ 5 . Runs an Erlang test runner (` erl_test_runner.erl ` ) with ` -pa fable_modules/fable-library-beam ` that discovers and executes all ` test_ ` -prefixed functions (2077 Erlang tests pass)
346346
347347| Test File | Tests | Coverage |
348348| --- | --- | --- |
@@ -375,12 +375,12 @@ decision trees, and let/letrec bindings all produce correct Erlang output.
375375| UnionTypeTests.fs | 18 | Union construction, matching, structural equality, active patterns |
376376| InteropTests.fs | 17 | Erlang interop, emitErl, Import attribute, module calls |
377377| DictionaryTests.fs | 17 | Dictionary creation, Add, Count, indexer get/set, ContainsKey, ContainsValue, Remove, TryGetValue, Clear, dict function, integer keys, duplicate key throws, missing key throws, iteration, creation from existing dict |
378- | AsyncTests.fs | 17 | Async return, let!/do!, return!, try-with, sleep, parallel, ignore, start immediate, cancellation |
378+ | AsyncTests.fs | 31 | Async return, let!/do!, return!, try-with, sleep, parallel, ignore, start immediate, while/for binding, exception handling, nested try/with, StartWithContinuations, Async.Catch, FromContinuations, deep recursion, nested failure propagation, try/finally, Async.Bind propagation, unit argument erasure, cancellation (CTS create/cancel, register, multiple registers, pre-cancelled token, auto-cancel, Dispose, custom exceptions) |
379379| QueueTests.fs | 17 | Queue creation, Enqueue, Dequeue, Peek, TryDequeue, TryPeek, Contains, Clear, ToArray, throws |
380380| TailCallTests.fs | 15 | Tail call optimization, recursive functions, mutual recursion (parseTokens/parseNum) |
381381| TupleTests.fs | 15 | Tuple creation, destructuring, fst/snd, equality, nesting, struct tuples, map, comparison, Item1/Item2 |
382382| LoopTests.fs | 12 | for loops, while loops, nested loops, mutable variables, for-in over list/array |
383- | ReflectionTests.fs | 11 | Type info, FSharpType reflection |
383+ | ReflectionTests.fs | 35 | Type info, typedefof, GetGenericTypeDefinition, Type.Name/FullName/Namespace, FSharpType (IsTuple, IsRecord, IsUnion, IsFunction, GetTupleElements, GetFunctionElements, MakeTupleType, GetRecordFields, GetUnionCases), FSharpValue (GetRecordFields, MakeRecord, GetTupleFields, MakeTuple, GetTupleField, GetUnionFields, MakeUnion), PropertyInfo.GetValue, Result/Choice reflection, units of measure type info |
384384| GuidTests.fs | 10 | Guid.NewGuid, Parse, ToString, Empty, equality, comparison |
385385| ExceptionTests.fs | 10 | Custom exceptions, type discrimination, nested catch, field access, Message property |
386386| StackTests.fs | 9 | Stack creation, Push, Pop, Peek, TryPop, TryPeek, Contains, ToArray, Clear |
@@ -395,7 +395,7 @@ decision trees, and let/letrec bindings all produce correct Erlang output.
395395| MailboxProcessorTests.fs | 3 | MailboxProcessor post, postAndAsyncReply, postAndAsyncReply with falsy values |
396396| SudokuTests.fs | 1 | Integration test: Sudoku solver using Seq, Array, ranges |
397397| ObservableTests.fs | 12 | Observable.subscribe/add/choose/filter/map/merge/pairwise/partition/scan/split, IObservable.Subscribe, Disposing |
398- | ** Total** | ** 2022 ** | |
398+ | ** Total** | ** 2077 ** | |
399399
400400### Phase 3: Discriminated Unions & Records -- COMPLETE
401401
@@ -582,7 +582,7 @@ for mutable state, `fable_async:from_continuations` for the receive/reply coordi
582582### Phase 10: Ecosystem
583583
584584- [ ] Build integration (` rebar3 ` or ` mix ` project generation)
585- - [x] Test suite (` tests/Beam/ ` — 2022 Erlang tests passing, ` ./build.sh test beam ` )
585+ - [x] Test suite (` tests/Beam/ ` — 2077 Erlang tests passing, ` ./build.sh test beam ` )
586586- [x] Erlang test runner (` tests/Beam/erl_test_runner.erl ` — discovers and runs all ` test_ ` -prefixed arity-1 functions)
587587- [x] ` erlc ` compilation step in build pipeline (per-file with graceful failure)
588588- [x] Quicktest setup (` src/quicktest-beam/ ` , ` Fable.Build/Quicktest/Beam.fs ` )
@@ -992,6 +992,21 @@ alone eliminates the single hardest piece of the Fable.Python runtime.
992992- ** Stopwatch** : Runtime ` fable_stopwatch.erl ` using ` erlang:monotonic_time(microsecond) ` .
993993 Supports ` StartNew ` , ` Start ` , ` Stop ` , ` Reset ` , ` Restart ` , ` Elapsed ` , ` ElapsedMilliseconds ` ,
994994 ` IsRunning ` , ` Frequency ` , ` GetTimestamp ` .
995+ - ** FSharp.Reflection** : Full runtime support via ` fable_reflection.erl ` + compile-time type
996+ info generation in ` Fable2Beam.Reflection.fs ` . TypeInfo = Erlang map with ` fullname ` ,
997+ ` generics ` , and optional ` fields ` (records) or ` cases ` (unions). PropertyInfo/CaseInfo are
998+ maps with ` name ` , ` typ ` , ` tag ` , ` fields ` . Reflection functions renamed to avoid Erlang BIF
999+ clashes: ` is_tuple ` → ` is_tuple_type ` , ` is_function ` → ` is_function_type ` . Union tag matching
1000+ uses integer tags (matching Beam's ` {0, Field1, Field2} ` representation). ` MakeRecord ` /
1001+ ` MakeUnion ` handle both plain lists and process-dict ref arrays. ` GetRecordFields ` resolves
1002+ concrete types through ` TypeCast ` wrappers via ` getConcreteType ` helper.
1003+ - ** Async error wrapping** : ` wrap_error/1 ` in ` fable_async.erl ` normalizes raw errors so
1004+ ` .Message ` accessor works: raw binaries (from ` failwith ` ) → ` #{message => Bin} ` , maps
1005+ (from ` raise (exn ...) ` ) pass through, refs pass through, everything else → formatted map.
1006+ Used in ` catch_async ` , ` try_with ` , and ` try_finally ` . ` catch_async ` uses integer tags
1007+ ` {0, V} ` / ` {1, wrap_error(E)} ` matching Beam's Choice union representation.
1008+ - ** OperationCanceledException** : Added to the exception type pattern in Beam Replacements
1009+ alongside ` BuiltinSystemException ` and ` KeyNotFoundException ` .
9951010
9961011## Future Improvements
9971012
0 commit comments