2222-42 / studyingSMLSharp

0 stars 0 forks source link

型不一致エラーについて調査 #17

Closed 2222-42 closed 3 years ago

2222-42 commented 3 years ago

why

(type inference 063) operator and operand don't agree

  operator domain: ({CumulativePositiveByPrefecture:
                       {cumulativePositive: real, prefectureName: string},
                     PopulationByPrefecture: {code: string, population: real},
                     PrefecutresList: {code: string, prefectureName: string}}
                      list
                    -> 'IXE#{CumulativePositiveByPrefecture:
                               'IXF#{cumulativePositive: real},
                             PopulationByPrefecture: 'IXG#{population: real},
                             PrefecturesList:
                               'IXH#{prefectureName:
                                       'IXI::{int, intInf, word, char, ...}}}
                         list,
                    $bg)
                     SQL.whr
          operand: ('IZZ#{CumulativePositiveByPrefecture:
                            'JAA#{prefectureName:
                                    'JAB::{int, intInf, word, char, ...}},
                          PopulationByPrefecture:
                            'JAD#{code: 'JAE::{int, intInf, word, char, ...}},
                          PrefecturesList:
                            'JAG#{code: 'JAE::{int, intInf, word, char, ...},
                                  prefectureName:
                                    'JAB::{int, intInf, word, char, ...}}}
                      list
                    -> 'IZZ#{CumulativePositiveByPrefecture:
                               'JAA#{prefectureName:
                                       'JAB::{int, intInf, word, char, ...}},
                             PopulationByPrefecture:
                               'JAD#{code:
                                       'JAE::{int, intInf, word, char, ...}},
                             PrefecturesList:
                               'JAG#{code: 'JAE::{int, intInf, word, char, ...},
                                     prefectureName:
                                       'JAB::{int, intInf, word, char, ...}}}
                         list,
                    'JAH)
                     SQL.whr
2222-42 commented 3 years ago

CumulativePositiveByPrefecture に cumulativePositveがない

2222-42 commented 3 years ago
operator domain: ({CumulativePositiveByPrefecture:
                       {cumulativePositive: real, prefectureName: string},
                     PopulationByPrefecture: {code: string, population: real},
                     PrefecturesListTy: {code: string, prefectureName: string}}
                      list
                    -> 'IXE#{CumulativePositiveByPrefecture:
                               'IXF#{cumulativePositive: real},
                             PopulationByPrefecture: 'IXG#{population: real},
                             PrefecturesList:
                               'IXH#{prefectureName:
                                       'IXI::{int, intInf, word, char, ...}}}
                         list,
                    $bg)
                     SQL.whr
          operand: ('IZZ#{CumulativePositiveByPrefecture:
                            'JAA#{prefectureName:
                                    'JAB::{int, intInf, word, char, ...}},
                          PopulationByPrefecture:
                            'JAD#{code: 'JAE::{int, intInf, word, char, ...}},
                          PrefecturesList:
                            'JAG#{code: 'JAE::{int, intInf, word, char, ...},
                                  prefectureName:
                                    'JAB::{int, intInf, word, char, ...}}}
                      list
                    -> 'IZZ#{CumulativePositiveByPrefecture:
                               'JAA#{prefectureName:
                                       'JAB::{int, intInf, word, char, ...}},
                             PopulationByPrefecture:
                               'JAD#{code:
                                       'JAE::{int, intInf, word, char, ...}},
                             PrefecturesList:
                               'JAG#{code: 'JAE::{int, intInf, word, char, ...},
                                     prefectureName:
                                       'JAB::{int, intInf, word, char, ...}}}
                         list,
                    'JAH)
                     SQL.whr
2222-42 commented 3 years ago
  (type inference 088) type and type annotation don't agree
    inferred type: real
                   -> {CumulativePositiveByPrefecture:
                         {cumulativePositive: real, prefectureName: string}
                           list,
                       DataSource:
                         {PrefectureData: string,
                          PrefectureDataGetAt: string,
                          covid19: string,
                          covid19UpdatedAt: string}
                           list,
                       PopulationByPrefecture:
                         {code: string, population: real} list,
                       PrefecturesList:
                         {code: string, prefectureName: string} list}
                        SQL.conn
                      -> {cumulativePositive: real,
                          "cumulativePositiveRate(per 10k)": real,
                          "population(10k)": real,
                          prefectureName: string}
                           SQL.cursor
  type annotation: real
                   -> {CumulativePositiveByPrefecture:
                         {cumulativePositive: real, prefectureName: string}
                           list,
                       DataSource:
                         {PrefectureData: string,
                          PrefectureDataGetAt: string,
                          covid19: string,
                          covid19UpdatedAt: string}
                           list,
                       PopulationByPrefecture:
                         {code: string, population: real} list,
                       PrefecturesList:
                         {code: string, prefectureName: string} list}
                        SQL.conn
                      -> {code: string, prefectureName: string} SQL.cursor