Tidy up a bit more (#156)

This commit is contained in:
Patrick Stevens
2024-06-01 15:57:53 +01:00
committed by GitHub
parent 04ecbe6002
commit adf497c5db
20 changed files with 271 additions and 343 deletions

View File

@@ -47,6 +47,10 @@ module internal SynType =
let unit : SynType = named "unit"
let int : SynType = named "int"
/// Given ['a1, 'a2] and 'ret, returns 'a1 -> 'a2 -> 'ret.
let toFun (inputs : SynType list) (ret : SynType) : SynType =
(ret, List.rev inputs) ||> List.fold (fun ty input -> funFromDomain input ty)
[<AutoOpen>]
module internal SynTypePatterns =
let (|OptionType|_|) (fieldType : SynType) =