-
Notifications
You must be signed in to change notification settings - Fork 285
Closed
Description
We should update F# core, to get better features, for example, how much class-wrapping is doing the nicePascalName etc in NamingUtils just because it doesn't use Structs.
This would be way more performant code with less memory-consumption:
let private tryAt (s: string) i =
if i >= s.Length then ValueNone else ValueSome s.[i]
let private sat f (c: voption<char>) =
match c with
| ValueSome c when f c -> ValueSome c
| _ -> ValueNone
[<return: Struct>]
let private (|EOF|_|) c =
match c with
| ValueSome _ -> ValueNone
| _ -> ValueSome()
[<return: Struct>]
let private (|LetterDigit|_|) = sat Char.IsLetterOrDigit
[<return: Struct>]
let private (|Upper|_|) = sat (fun c -> Char.IsUpper c || Char.IsDigit c)
[<return: Struct>]
let private (|Lower|_|) = sat (fun c -> Char.IsLower c || Char.IsDigit c)But it doesn't compile, because F# 5. So could it be updated to latest stable 7.0.401? Or even 6.0.x to get the structs.
Even worse, these utils are used as paket file references in other F# libraries, causing them to waste resources too.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels