From 5f35c7a7cdd4aef9094c2d500b441ee7d5dde562 Mon Sep 17 00:00:00 2001 From: Patrick Stevens <3138005+Smaug123@users.noreply.github.com> Date: Sun, 24 Aug 2025 09:13:06 +0100 Subject: [PATCH] ConcreteChar matcher (#111) --- WoofWare.PawPrint.Domain/TypeConcretisation.fs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/WoofWare.PawPrint.Domain/TypeConcretisation.fs b/WoofWare.PawPrint.Domain/TypeConcretisation.fs index 722a836..eec7525 100644 --- a/WoofWare.PawPrint.Domain/TypeConcretisation.fs +++ b/WoofWare.PawPrint.Domain/TypeConcretisation.fs @@ -138,6 +138,23 @@ module ConcreteActivePatterns = | None -> None | _ -> None + let (|ConcreteChar|_|) (concreteTypes : AllConcreteTypes) (handle : ConcreteTypeHandle) : unit option = + match handle with + | ConcreteTypeHandle.Concrete id -> + match concreteTypes.Mapping |> Map.tryFind id with + | Some ct -> + if + ct.Assembly.Name = "System.Private.CoreLib" + && ct.Namespace = "System" + && ct.Name = "Char" + && ct.Generics.IsEmpty + then + Some () + else + None + | None -> None + | _ -> None + let (|ConcreteRuntimeFieldHandle|_|) (concreteTypes : AllConcreteTypes) (handle : ConcreteTypeHandle) = match handle with | ConcreteTypeHandle.Concrete id ->