anchor.diff:      open Generated
       open Generated.Specifications
   
  -    let listMustContainExactlyOne failmessage l =
  +    let private listMustContainExactlyOne failmessage l =
           match List.tryExactlyOne l with
           | Some v -> v
           | _ -> failwith failmessage
   
  -    let listMustContainOneOrMore failmessage (l: 'a list) =
  +    let private listMustContainOneOrMore failmessage (l: 'a list) =
           if l.Length >= 1 then
               l
           else failwith failmessage
  
positive.code:                         token,accession,createSeriesRecord accession lexedSeries
                  loop token []
  
          let private parseSOFTEntities (soft: seq<SOFTToken>) : (Map<string,SeriesRecord>)*(Map<string,SampleRecord>)*(Map<string,PlatformRecord>) =
  
              let en = soft.GetEnumerator()
              let rec loop (token: SOFTToken) (seriesRecords: (string*SeriesRecord) list) (sampleRecords: (string*SampleRecord) list) (platformRecords: (string*PlatformRecord) list) = 
  
negative.code:                 loop en.Current [] [] []
              else failwith "empty input"
  
      [<RequireQualifiedAccess>]
      module Series =
  
          open FSharpAux.IO
  
          type GSE = {
              SeriesMetadata      : SeriesRecord
              SampleMetadata      : Map<string,SampleRecord>
              PlatformMetadata    : Map<string,PlatformRecord>
          }
  
          let private createGSE (seriesRecords: Map<string,SeriesRecord>, sampleRecords: Map<string,SampleRecord>, platformRecords: Map<string,PlatformRecord>) : GSE =
              {
                  SeriesMetadata =
                      seriesRecords
                      |> Map.toList
                      |> List.exactlyOne
                      |> snd
  
                  SampleMetadata      = sampleRecords
                  PlatformMetadata    = platformRecords
              }
  
          ///Read GEO series metadata and associated sample/platform metadata from a SOFT formatted series file (GPLXXXXX_family.soft)
          let fromFile (path:string) =
              Seq.fromFile path
              |> Seq.map Tokenization.tokenizeSOFTLine
              |> Parsing.parseSOFTEntities
              |> createGSE
  
          ///Read GEO series metadata and associated sample/platform metadata from a sequence of strings representing a SOFT formatted series
          let fromFileEnumerator (fileEnumerator:seq<string>) =
              fileEnumerator
              |> Seq.map Tokenization.tokenizeSOFTLine
              |> Parsing.parseSOFTEntities
              |> createGSE
  
          ///returns platform metadata associated with the input series GSE representation
          let getAssociatedPlatforms (gse:GSE) =
              gse.PlatformMetadata
              |> Map.toList
              |> List.map snd
  
          ///returns platform accessions associated with the input series GSE representation
          let getAssociatedPlatformAccessions (gse:GSE) =
              gse.PlatformMetadata
              |> Map.toList
              |> List.map snd
              |> List.map (fun record -> record.Accession)
  
          ///returns sample metadata associated with the input series GSE representation
          let getAssociatedSamples (gse:GSE) =
              gse.SampleMetadata
              |> Map.toList
              |> List.map fst
  
          ///returns sample accessions associated with the input series GSE representation
          let getAssociatedSampleAccessions (gse:GSE) =
              gse.SampleMetadata
              |> Map.toList
              |> List.map fst
  
  
      [<RequireQualifiedAccess>]
      module Platform =
  
          open FSharpAux.IO
  
          type GPL = {
              PlatformMetadata    : PlatformRecord
              SeriesMetadata      : Map<string,SeriesRecord>
              SampleMetadata      : Map<string,SampleRecord>
          }
  
          let private createGPL (seriesRecords: Map<string,SeriesRecord>, sampleRecords: Map<string,SampleRecord>, platformRecords: Map<string,PlatformRecord>) : GPL =
              {
                  PlatformMetadata    = 
                      platformRecords
                      |> Map.toList
                      |> List.exactlyOne
                      |> snd
  
                  SeriesMetadata      = seriesRecords
                  SampleMetadata      = sampleRecords
  
              }
  
          //Readers
  
          ///Read GEO platform metadata and associated sample/series Metadata from a SOFT formatted platform file (GPLXXXXX_family.soft)
          let fromFile (path:string) =
              Seq.fromFile path
              |> Seq.map Tokenization.tokenizeSOFTLine
              |> Parsing.parseSOFTEntities
              |> createGPL
  
          ///Read GEO platform metadata and associated sample/series Metadata from a sequence of strings representing a SOFT formatted platform
          let fromFileEnumerator (fileEnumerator:seq<string>) =
              fileEnumerator
              |> Seq.map Tokenization.tokenizeSOFTLine
              |> Parsing.parseSOFTEntities
              |> createGPL
  
          ///returns series metadata associated with the input platform GPL representation
          let getAssociatedSeries (gpl:GPL) =
              gpl.SeriesMetadata
              |> Map.toList
              |> List.map snd
  
          ///returns series accessions associated with the input platform GPL representation
          let getAssociatedSeriesAccessions (gpl:GPL) =
              gpl.SeriesMetadata
              |> Map.toList
              |> List.map snd
              |> List.map (fun record -> record.Accession)
  
          ///returns sample metadata associated with the input platform GPL representation
          let getAssociatedSamples (gpl:GPL) =
              gpl.SampleMetadata
              |> Map.toList
              |> List.map fst
  
          ///returns sample accessions associated with the input platform GPL representation
          let getAssociatedSampleAccessions (gpl:GPL) =
              gpl.SampleMetadata
              |> Map.toList
              |> List.map fst
  