Created
January 23, 2019 20:29
-
-
Save jasondown/7cf41fc07f86e1484e4db6508b69152b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Module = | |
| StartPos | |
| Samples // <------------------- New Union Case | |
| Diagnosis | |
| Molecules | |
| Laboratory | |
static member Create moduleName = | |
match moduleName with | |
| "START_POS" -> Module.StartPos | |
| "SAMPLES" -> Module.Samples // <------------------- New Union Case | |
| "DIAGNOSIS" -> Module.Diagnosis | |
| "MOLECULES" -> Module.Molecules | |
| "LABORATORY" -> Module.Laboratory | |
| name -> failwithf "Unknown module type: %s" name | |
override x.ToString () = | |
match x with | |
| StartPos -> "START_POS" | |
| Samples -> "SAMPLES" // <------------------- New Union Case | |
| Diagnosis -> "DIAGNOSIS" | |
| Molecules -> "MOLECULES" | |
| Laboratory -> "LABORATORY" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment