JSON enums (#175)

This commit is contained in:
Patrick Stevens
2024-06-27 21:23:06 +01:00
committed by GitHub
parent 6a81513a93
commit c590db2a65
9 changed files with 232 additions and 49 deletions

View File

@@ -96,6 +96,11 @@ type internal AdtProduct =
[<RequireQualifiedAccess>]
module internal AstHelper =
let isEnum (SynTypeDefn.SynTypeDefn (_, repr, _, _, _, _)) : bool =
match repr with
| SynTypeDefnRepr.Simple (SynTypeDefnSimpleRepr.Enum _, _) -> true
| _ -> false
let instantiateRecord (fields : (RecordFieldName * SynExpr option) list) : SynExpr =
let fields =
fields