From 375f17f95fee93873e2221c0567525fcf51b6288 Mon Sep 17 00:00:00 2001 From: Branden J Brown Date: Sat, 3 Jan 2026 15:57:15 -0500 Subject: [PATCH] initial legacy and race defs --- horse/legacy.kk | 248 ++++++++++++++ horse/race.kk | 861 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1109 insertions(+) create mode 100644 horse/legacy.kk create mode 100644 horse/race.kk diff --git a/horse/legacy.kk b/horse/legacy.kk new file mode 100644 index 0000000..008df15 --- /dev/null +++ b/horse/legacy.kk @@ -0,0 +1,248 @@ +module horse/legacy + +import horse/race +import horse/spark + +pub struct legacy + uma: veteran + parents: (veteran, veteran) + +pub struct veteran + character: character + stat: spark + aptitude: spark + unique: maybe> + races: list> + skills: list> + results: list + +// Character identity. +pub type character + Special-Week + Silence-Suzuka + Tokai-Teio + Maruzensky + Fuji-Kiseki + Oguri-Cap + Gold-Ship + Vodka + Daiwa-Scarlet + Taiki-Shuttle + Grass-Wonder + Hishi-Amazon + Mejiro-McQueen + El-Condor-Pasa + TM-Opera-O + Narita-Brian + Symboli-Rudolf + Air-Groove + Agnes-Digital + Seiun-Sky + Biwa-Hayahide + Mayano-Top-Gun + Manhattan-Cafe + Mihono-Bourbon + Mejiro-Ryan + Hishi-Akebono + Rice-Shower + Agnes-Tachyon + Winning-Ticket + Eishin-Flash + Curren-Chan + Kawakami-Princess + Gold-City + Sakura-Bakushin-O + Super-Creek + Smart-Falcon + Tosen-Jordan + Narita-Taishin + Haru-Urara + Matikanefukukitaru + Meisho-Doto + Mejiro-Dober + Nice-Nature + King-Halo + +// Automatically generated. +// Fip comparison of the `character` type. +pub fun character/order2(this : character, other : character) : order2 + match (this, other) + (Special-Week, Special-Week) -> Eq2(Special-Week) + (Special-Week, other') -> Lt2(Special-Week, other') + (this', Special-Week) -> Gt2(Special-Week, this') + (Silence-Suzuka, Silence-Suzuka) -> Eq2(Silence-Suzuka) + (Silence-Suzuka, other') -> Lt2(Silence-Suzuka, other') + (this', Silence-Suzuka) -> Gt2(Silence-Suzuka, this') + (Tokai-Teio, Tokai-Teio) -> Eq2(Tokai-Teio) + (Tokai-Teio, other') -> Lt2(Tokai-Teio, other') + (this', Tokai-Teio) -> Gt2(Tokai-Teio, this') + (Maruzensky, Maruzensky) -> Eq2(Maruzensky) + (Maruzensky, other') -> Lt2(Maruzensky, other') + (this', Maruzensky) -> Gt2(Maruzensky, this') + (Fuji-Kiseki, Fuji-Kiseki) -> Eq2(Fuji-Kiseki) + (Fuji-Kiseki, other') -> Lt2(Fuji-Kiseki, other') + (this', Fuji-Kiseki) -> Gt2(Fuji-Kiseki, this') + (Oguri-Cap, Oguri-Cap) -> Eq2(Oguri-Cap) + (Oguri-Cap, other') -> Lt2(Oguri-Cap, other') + (this', Oguri-Cap) -> Gt2(Oguri-Cap, this') + (Gold-Ship, Gold-Ship) -> Eq2(Gold-Ship) + (Gold-Ship, other') -> Lt2(Gold-Ship, other') + (this', Gold-Ship) -> Gt2(Gold-Ship, this') + (Vodka, Vodka) -> Eq2(Vodka) + (Vodka, other') -> Lt2(Vodka, other') + (this', Vodka) -> Gt2(Vodka, this') + (Daiwa-Scarlet, Daiwa-Scarlet) -> Eq2(Daiwa-Scarlet) + (Daiwa-Scarlet, other') -> Lt2(Daiwa-Scarlet, other') + (this', Daiwa-Scarlet) -> Gt2(Daiwa-Scarlet, this') + (Taiki-Shuttle, Taiki-Shuttle) -> Eq2(Taiki-Shuttle) + (Taiki-Shuttle, other') -> Lt2(Taiki-Shuttle, other') + (this', Taiki-Shuttle) -> Gt2(Taiki-Shuttle, this') + (Grass-Wonder, Grass-Wonder) -> Eq2(Grass-Wonder) + (Grass-Wonder, other') -> Lt2(Grass-Wonder, other') + (this', Grass-Wonder) -> Gt2(Grass-Wonder, this') + (Hishi-Amazon, Hishi-Amazon) -> Eq2(Hishi-Amazon) + (Hishi-Amazon, other') -> Lt2(Hishi-Amazon, other') + (this', Hishi-Amazon) -> Gt2(Hishi-Amazon, this') + (Mejiro-McQueen, Mejiro-McQueen) -> Eq2(Mejiro-McQueen) + (Mejiro-McQueen, other') -> Lt2(Mejiro-McQueen, other') + (this', Mejiro-McQueen) -> Gt2(Mejiro-McQueen, this') + (El-Condor-Pasa, El-Condor-Pasa) -> Eq2(El-Condor-Pasa) + (El-Condor-Pasa, other') -> Lt2(El-Condor-Pasa, other') + (this', El-Condor-Pasa) -> Gt2(El-Condor-Pasa, this') + (TM-Opera-O, TM-Opera-O) -> Eq2(TM-Opera-O) + (TM-Opera-O, other') -> Lt2(TM-Opera-O, other') + (this', TM-Opera-O) -> Gt2(TM-Opera-O, this') + (Narita-Brian, Narita-Brian) -> Eq2(Narita-Brian) + (Narita-Brian, other') -> Lt2(Narita-Brian, other') + (this', Narita-Brian) -> Gt2(Narita-Brian, this') + (Symboli-Rudolf, Symboli-Rudolf) -> Eq2(Symboli-Rudolf) + (Symboli-Rudolf, other') -> Lt2(Symboli-Rudolf, other') + (this', Symboli-Rudolf) -> Gt2(Symboli-Rudolf, this') + (Air-Groove, Air-Groove) -> Eq2(Air-Groove) + (Air-Groove, other') -> Lt2(Air-Groove, other') + (this', Air-Groove) -> Gt2(Air-Groove, this') + (Agnes-Digital, Agnes-Digital) -> Eq2(Agnes-Digital) + (Agnes-Digital, other') -> Lt2(Agnes-Digital, other') + (this', Agnes-Digital) -> Gt2(Agnes-Digital, this') + (Seiun-Sky, Seiun-Sky) -> Eq2(Seiun-Sky) + (Seiun-Sky, other') -> Lt2(Seiun-Sky, other') + (this', Seiun-Sky) -> Gt2(Seiun-Sky, this') + (Biwa-Hayahide, Biwa-Hayahide) -> Eq2(Biwa-Hayahide) + (Biwa-Hayahide, other') -> Lt2(Biwa-Hayahide, other') + (this', Biwa-Hayahide) -> Gt2(Biwa-Hayahide, this') + (Mayano-Top-Gun, Mayano-Top-Gun) -> Eq2(Mayano-Top-Gun) + (Mayano-Top-Gun, other') -> Lt2(Mayano-Top-Gun, other') + (this', Mayano-Top-Gun) -> Gt2(Mayano-Top-Gun, this') + (Manhattan-Cafe, Manhattan-Cafe) -> Eq2(Manhattan-Cafe) + (Manhattan-Cafe, other') -> Lt2(Manhattan-Cafe, other') + (this', Manhattan-Cafe) -> Gt2(Manhattan-Cafe, this') + (Mihono-Bourbon, Mihono-Bourbon) -> Eq2(Mihono-Bourbon) + (Mihono-Bourbon, other') -> Lt2(Mihono-Bourbon, other') + (this', Mihono-Bourbon) -> Gt2(Mihono-Bourbon, this') + (Mejiro-Ryan, Mejiro-Ryan) -> Eq2(Mejiro-Ryan) + (Mejiro-Ryan, other') -> Lt2(Mejiro-Ryan, other') + (this', Mejiro-Ryan) -> Gt2(Mejiro-Ryan, this') + (Hishi-Akebono, Hishi-Akebono) -> Eq2(Hishi-Akebono) + (Hishi-Akebono, other') -> Lt2(Hishi-Akebono, other') + (this', Hishi-Akebono) -> Gt2(Hishi-Akebono, this') + (Rice-Shower, Rice-Shower) -> Eq2(Rice-Shower) + (Rice-Shower, other') -> Lt2(Rice-Shower, other') + (this', Rice-Shower) -> Gt2(Rice-Shower, this') + (Agnes-Tachyon, Agnes-Tachyon) -> Eq2(Agnes-Tachyon) + (Agnes-Tachyon, other') -> Lt2(Agnes-Tachyon, other') + (this', Agnes-Tachyon) -> Gt2(Agnes-Tachyon, this') + (Winning-Ticket, Winning-Ticket) -> Eq2(Winning-Ticket) + (Winning-Ticket, other') -> Lt2(Winning-Ticket, other') + (this', Winning-Ticket) -> Gt2(Winning-Ticket, this') + (Eishin-Flash, Eishin-Flash) -> Eq2(Eishin-Flash) + (Eishin-Flash, other') -> Lt2(Eishin-Flash, other') + (this', Eishin-Flash) -> Gt2(Eishin-Flash, this') + (Curren-Chan, Curren-Chan) -> Eq2(Curren-Chan) + (Curren-Chan, other') -> Lt2(Curren-Chan, other') + (this', Curren-Chan) -> Gt2(Curren-Chan, this') + (Kawakami-Princess, Kawakami-Princess) -> Eq2(Kawakami-Princess) + (Kawakami-Princess, other') -> Lt2(Kawakami-Princess, other') + (this', Kawakami-Princess) -> Gt2(Kawakami-Princess, this') + (Gold-City, Gold-City) -> Eq2(Gold-City) + (Gold-City, other') -> Lt2(Gold-City, other') + (this', Gold-City) -> Gt2(Gold-City, this') + (Sakura-Bakushin-O, Sakura-Bakushin-O) -> Eq2(Sakura-Bakushin-O) + (Sakura-Bakushin-O, other') -> Lt2(Sakura-Bakushin-O, other') + (this', Sakura-Bakushin-O) -> Gt2(Sakura-Bakushin-O, this') + (Super-Creek, Super-Creek) -> Eq2(Super-Creek) + (Super-Creek, other') -> Lt2(Super-Creek, other') + (this', Super-Creek) -> Gt2(Super-Creek, this') + (Smart-Falcon, Smart-Falcon) -> Eq2(Smart-Falcon) + (Smart-Falcon, other') -> Lt2(Smart-Falcon, other') + (this', Smart-Falcon) -> Gt2(Smart-Falcon, this') + (Tosen-Jordan, Tosen-Jordan) -> Eq2(Tosen-Jordan) + (Tosen-Jordan, other') -> Lt2(Tosen-Jordan, other') + (this', Tosen-Jordan) -> Gt2(Tosen-Jordan, this') + (Narita-Taishin, Narita-Taishin) -> Eq2(Narita-Taishin) + (Narita-Taishin, other') -> Lt2(Narita-Taishin, other') + (this', Narita-Taishin) -> Gt2(Narita-Taishin, this') + (Haru-Urara, Haru-Urara) -> Eq2(Haru-Urara) + (Haru-Urara, other') -> Lt2(Haru-Urara, other') + (this', Haru-Urara) -> Gt2(Haru-Urara, this') + (Matikanefukukitaru, Matikanefukukitaru) -> Eq2(Matikanefukukitaru) + (Matikanefukukitaru, other') -> Lt2(Matikanefukukitaru, other') + (this', Matikanefukukitaru) -> Gt2(Matikanefukukitaru, this') + (Meisho-Doto, Meisho-Doto) -> Eq2(Meisho-Doto) + (Meisho-Doto, other') -> Lt2(Meisho-Doto, other') + (this', Meisho-Doto) -> Gt2(Meisho-Doto, this') + (Mejiro-Dober, Mejiro-Dober) -> Eq2(Mejiro-Dober) + (Mejiro-Dober, other') -> Lt2(Mejiro-Dober, other') + (this', Mejiro-Dober) -> Gt2(Mejiro-Dober, this') + (Nice-Nature, Nice-Nature) -> Eq2(Nice-Nature) + (Nice-Nature, other') -> Lt2(Nice-Nature, other') + (this', Nice-Nature) -> Gt2(Nice-Nature, this') + (King-Halo, King-Halo) -> Eq2(King-Halo) + +// Automatically generated. +// Shows a string representation of the `character` type. +pub fun character/show(this : character) : string + match this + Special-Week -> "Special Week" + Silence-Suzuka -> "Silence Suzuka" + Tokai-Teio -> "Tokai Teio" + Maruzensky -> "Maruzensky" + Fuji-Kiseki -> "Fuji Kiseki" + Oguri-Cap -> "Oguri Cap" + Gold-Ship -> "Gold Ship" + Vodka -> "Vodka" + Daiwa-Scarlet -> "Daiwa Scarlet" + Taiki-Shuttle -> "Taiki Shuttle" + Grass-Wonder -> "Grass Wonder" + Hishi-Amazon -> "Hishi Amazon" + Mejiro-McQueen -> "Mejiro McQueen" + El-Condor-Pasa -> "El Condor Pasa" + TM-Opera-O -> "TM Opera O" + Narita-Brian -> "Narita Brian" + Symboli-Rudolf -> "Symboli Rudolf" + Air-Groove -> "Air Groove" + Agnes-Digital -> "Agnes Digital" + Seiun-Sky -> "Seiun Sky" + Biwa-Hayahide -> "Biwa Hayahide" + Mayano-Top-Gun -> "Mayano Top Gun" + Manhattan-Cafe -> "Manhattan Cafe" + Mihono-Bourbon -> "Mihono Bourbon" + Mejiro-Ryan -> "Mejiro Ryan" + Hishi-Akebono -> "Hishi Akebono" + Rice-Shower -> "Rice Shower" + Agnes-Tachyon -> "Agnes Tachyon" + Winning-Ticket -> "Winning Ticket" + Eishin-Flash -> "Eishin Flash" + Curren-Chan -> "Curren Chan" + Kawakami-Princess -> "Kawakami Princess" + Gold-City -> "Gold City" + Sakura-Bakushin-O -> "Sakura Bakushin O" + Super-Creek -> "Super Creek" + Smart-Falcon -> "Smart Falcon" + Tosen-Jordan -> "Tosen Jordan" + Narita-Taishin -> "Narita Taishin" + Haru-Urara -> "Haru Urara" + Matikanefukukitaru -> "Matikanefukukitaru" + Meisho-Doto -> "Meisho Doto" + Mejiro-Dober -> "Mejiro Dober" + Nice-Nature -> "Nice Nature" + King-Halo -> "King Halo" diff --git a/horse/race.kk b/horse/race.kk new file mode 100644 index 0000000..62f1906 --- /dev/null +++ b/horse/race.kk @@ -0,0 +1,861 @@ +module horse/race + +import std/data/linearset + +// Exhaustive enumeration of graded races that can be run in career. +// Races that can be run in multiple years are listed only once. +pub type career-race + February-Stakes + Takamatsunomiya-Kinen + Osaka-Hai + Oka-Sho + Satsuki-Sho + Tenno-Sho-Spring + NHK-Mile-Cup + Victoria-Mile + Japanese-Oaks + Japanese-Derby + Yasuda-Kinen + Takarazuka-Kinen + Sprinters-Stakes + Shuka-Sho + Kikuka-Sho + Tenno-Sho-Autumn + Queen-Elizabeth-II-Cup + Mile-Championship + Japan-Cup + Champions-Cup + Hanshin-Juvenile-Fillies + Asahi-Hai-Futurity-Stakes + Arima-Kinen + Hopeful-Stakes + Tokyo-Daishoten + JBC-Classic + JBC-Sprint + JBC-Ladies-Classic + Japan-Dirt-Derby + Teio-Sho + Nikkei-Shinshun-Hai + Tokai-Stakes + American-Jockey-Club-Cup + Kyoto-Kinen + Nakayama-Kinen + Tulip-Sho + Yayoi-Sho + Kinko-Sho + Fillies-Revue + Hanshin-Daishoten + Spring-Stakes + Nikkei-Sho + Hanshin-Umamusume-Stakes + New-Zealand-Trophy + Yomiuri-Milers-Cup + Flora-Stakes + Aoba-Sho + Kyoto-Shimbun-Hai + Keio-Hai-Spring-Cup + Meguro-Kinen + Sapporo-Kinen + Centaur-Stakes + Rose-Stakes + St-Lite-Kinen + Kobe-Shimbun-Hai + All-Comers + Mainichi-Okan + Kyoto-Daishoten + Fuchu-Umamusume-Stakes + Fuji-Stakes + Swan-Stakes + Keio-Hai-Junior-Stakes + Copa-Republica-Argentina + Daily-Hai-Junior-Stakes + Stayers-Stakes + Hanshin-Cup + Kyoto-Kimpai + Nakayama-Kimpai + Shinzan-Kinen + Fairy-Stakes + Aichi-Hai + Keisei-Hai + Silk-Road-Stakes + Negishi-Stakes + Kisaragi-Sho + Tokyo-Shimbun-Hai + Queen-Cup + Kyodo-News-Hai + Kyoto-Umamusume-Stakes + Diamond-Stakes + Kokura-Daishoten + Arlington-Cup + Hankyu-Hai + Ocean-Stakes + Nakayama-Umamusume-Stakes + Falcon-Stakes + Flower-Cup + Mainichi-Hai + March-Stakes + Lord-Derby-Challenge-Trophy + Antares-Stakes + Fukushima-Umamusume-Stakes + Niigata-Daishoten + Heian-Stakes + Aoi-Stakes + Naruo-Kinen + Mermaid-Stakes + Epsom-Cup + Unicorn-Stakes + Hakodate-Sprint-Stakes + CBC-Sho + Radio-Nikkei-Sho + Procyon-Stakes + Tanabata-Sho + Hakodate-Kinen + Chukyo-Kinen + Hakodate-Junior-Stakes + Ibis-Summer-Dash + Queen-Stakes + Kokura-Kinen + Leopard-Stakes + Sekiya-Kinen + Elm-Stakes + Kitakyushu-Kinen + Niigata-Junior-Stakes + Keeneland-Cup + Sapporo-Junior-Stakes + Kokura-Junior-Stakes + Niigata-Kinen + Shion-Stakes + Keisei-Hai-Autumn-Handicap + Sirius-Stakes + Saudi-Arabia-Royal-Cup + Artemis-Stakes + Fantasy-Stakes + Miyako-Stakes + Musashino-Stakes + Fukushima-Kinen + Tokyo-Sports-Hai-Junior-Stakes + Kyoto-Junior-Stakes + Keihan-Hai + Challenge-Cup + Chunichi-Shimbun-Hai + Capella-Stakes + Turquoise-Stakes + +// Automatically generated. +// Shows a string representation of the `career-race` type. +pub fun career-race/show(this : career-race) : e string + match this + February-Stakes -> "February Stakes" + Takamatsunomiya-Kinen -> "Takamatsunomiya Kinen" + Osaka-Hai -> "Osaka Hai" + Oka-Sho -> "Oka Sho" + Satsuki-Sho -> "Satsuki Sho" + Tenno-Sho-Spring -> "Tenno Sho Spring" + NHK-Mile-Cup -> "NHK Mile Cup" + Victoria-Mile -> "Victoria Mile" + Japanese-Oaks -> "Japanese Oaks" + Japanese-Derby -> "Japanese Derby" + Yasuda-Kinen -> "Yasuda Kinen" + Takarazuka-Kinen -> "Takarazuka Kinen" + Sprinters-Stakes -> "Sprinters Stakes" + Shuka-Sho -> "Shuka Sho" + Kikuka-Sho -> "Kikuka Sho" + Tenno-Sho-Autumn -> "Tenno Sho Autumn" + Queen-Elizabeth-II-Cup -> "Queen Elizabeth II Cup" + Mile-Championship -> "Mile Championship" + Japan-Cup -> "Japan Cup" + Champions-Cup -> "Champions Cup" + Hanshin-Juvenile-Fillies -> "Hanshin Juvenile Fillies" + Asahi-Hai-Futurity-Stakes -> "Asahi Hai Futurity Stakes" + Arima-Kinen -> "Arima Kinen" + Hopeful-Stakes -> "Hopeful Stakes" + Tokyo-Daishoten -> "Tokyo Daishoten" + JBC-Classic -> "JBC Classic" + JBC-Sprint -> "JBC Sprint" + JBC-Ladies-Classic -> "JBC Ladies Classic" + Japan-Dirt-Derby -> "Japan Dirt Derby" + Teio-Sho -> "Teio Sho" + Nikkei-Shinshun-Hai -> "Nikkei Shinshun Hai" + Tokai-Stakes -> "Tokai Stakes" + American-Jockey-Club-Cup -> "American Jockey Club Cup" + Kyoto-Kinen -> "Kyoto Kinen" + Nakayama-Kinen -> "Nakayama Kinen" + Tulip-Sho -> "Tulip Sho" + Yayoi-Sho -> "Yayoi Sho" + Kinko-Sho -> "Kinko Sho" + Fillies-Revue -> "Fillies Revue" + Hanshin-Daishoten -> "Hanshin Daishoten" + Spring-Stakes -> "Spring Stakes" + Nikkei-Sho -> "Nikkei Sho" + Hanshin-Umamusume-Stakes -> "Hanshin Umamusume Stakes" + New-Zealand-Trophy -> "New Zealand Trophy" + Yomiuri-Milers-Cup -> "Yomiuri Milers Cup" + Flora-Stakes -> "Flora Stakes" + Aoba-Sho -> "Aoba Sho" + Kyoto-Shimbun-Hai -> "Kyoto Shimbun Hai" + Keio-Hai-Spring-Cup -> "Keio Hai Spring Cup" + Meguro-Kinen -> "Meguro Kinen" + Sapporo-Kinen -> "Sapporo Kinen" + Centaur-Stakes -> "Centaur Stakes" + Rose-Stakes -> "Rose Stakes" + St-Lite-Kinen -> "St Lite Kinen" + Kobe-Shimbun-Hai -> "Kobe Shimbun Hai" + All-Comers -> "All Comers" + Mainichi-Okan -> "Mainichi Okan" + Kyoto-Daishoten -> "Kyoto Daishoten" + Fuchu-Umamusume-Stakes -> "Fuchu Umamusume Stakes" + Fuji-Stakes -> "Fuji Stakes" + Swan-Stakes -> "Swan Stakes" + Keio-Hai-Junior-Stakes -> "Keio Hai Junior Stakes" + Copa-Republica-Argentina -> "Copa Republica Argentina" + Daily-Hai-Junior-Stakes -> "Daily Hai Junior Stakes" + Stayers-Stakes -> "Stayers Stakes" + Hanshin-Cup -> "Hanshin Cup" + Kyoto-Kimpai -> "Kyoto Kimpai" + Nakayama-Kimpai -> "Nakayama Kimpai" + Shinzan-Kinen -> "Shinzan Kinen" + Fairy-Stakes -> "Fairy Stakes" + Aichi-Hai -> "Aichi Hai" + Keisei-Hai -> "Keisei Hai" + Silk-Road-Stakes -> "Silk Road Stakes" + Negishi-Stakes -> "Negishi Stakes" + Kisaragi-Sho -> "Kisaragi Sho" + Tokyo-Shimbun-Hai -> "Tokyo Shimbun Hai" + Queen-Cup -> "Queen Cup" + Kyodo-News-Hai -> "Kyodo News Hai" + Kyoto-Umamusume-Stakes -> "Kyoto Umamusume Stakes" + Diamond-Stakes -> "Diamond Stakes" + Kokura-Daishoten -> "Kokura Daishoten" + Arlington-Cup -> "Arlington Cup" + Hankyu-Hai -> "Hankyu Hai" + Ocean-Stakes -> "Ocean Stakes" + Nakayama-Umamusume-Stakes -> "Nakayama Umamusume Stakes" + Falcon-Stakes -> "Falcon Stakes" + Flower-Cup -> "Flower Cup" + Mainichi-Hai -> "Mainichi Hai" + March-Stakes -> "March Stakes" + Lord-Derby-Challenge-Trophy -> "Lord Derby Challenge Trophy" + Antares-Stakes -> "Antares Stakes" + Fukushima-Umamusume-Stakes -> "Fukushima Umamusume Stakes" + Niigata-Daishoten -> "Niigata Daishoten" + Heian-Stakes -> "Heian Stakes" + Aoi-Stakes -> "Aoi Stakes" + Naruo-Kinen -> "Naruo Kinen" + Mermaid-Stakes -> "Mermaid Stakes" + Epsom-Cup -> "Epsom Cup" + Unicorn-Stakes -> "Unicorn Stakes" + Hakodate-Sprint-Stakes -> "Hakodate Sprint Stakes" + CBC-Sho -> "CBC Sho" + Radio-Nikkei-Sho -> "Radio Nikkei Sho" + Procyon-Stakes -> "Procyon Stakes" + Tanabata-Sho -> "Tanabata Sho" + Hakodate-Kinen -> "Hakodate Kinen" + Chukyo-Kinen -> "Chukyo Kinen" + Hakodate-Junior-Stakes -> "Hakodate Junior Stakes" + Ibis-Summer-Dash -> "Ibis Summer Dash" + Queen-Stakes -> "Queen Stakes" + Kokura-Kinen -> "Kokura Kinen" + Leopard-Stakes -> "Leopard Stakes" + Sekiya-Kinen -> "Sekiya Kinen" + Elm-Stakes -> "Elm Stakes" + Kitakyushu-Kinen -> "Kitakyushu Kinen" + Niigata-Junior-Stakes -> "Niigata Junior Stakes" + Keeneland-Cup -> "Keeneland Cup" + Sapporo-Junior-Stakes -> "Sapporo Junior Stakes" + Kokura-Junior-Stakes -> "Kokura Junior Stakes" + Niigata-Kinen -> "Niigata Kinen" + Shion-Stakes -> "Shion Stakes" + Keisei-Hai-Autumn-Handicap -> "Keisei Hai Autumn Handicap" + Sirius-Stakes -> "Sirius Stakes" + Saudi-Arabia-Royal-Cup -> "Saudi Arabia Royal Cup" + Artemis-Stakes -> "Artemis Stakes" + Fantasy-Stakes -> "Fantasy Stakes" + Miyako-Stakes -> "Miyako Stakes" + Musashino-Stakes -> "Musashino Stakes" + Fukushima-Kinen -> "Fukushima Kinen" + Tokyo-Sports-Hai-Junior-Stakes -> "Tokyo Sports Hai Junior Stakes" + Kyoto-Junior-Stakes -> "Kyoto Junior Stakes" + Keihan-Hai -> "Keihan Hai" + Challenge-Cup -> "Challenge Cup" + Chunichi-Shimbun-Hai -> "Chunichi Shimbun Hai" + Capella-Stakes -> "Capella Stakes" + Turquoise-Stakes -> "Turquoise Stakes" + +// Automatically generated. +// Equality comparison of the `career-race` type. +pub fun career-race/(==)(this : career-race, other : career-race) : e bool + match (this, other) + (February-Stakes, February-Stakes) -> True + (Takamatsunomiya-Kinen, Takamatsunomiya-Kinen) -> True + (Osaka-Hai, Osaka-Hai) -> True + (Oka-Sho, Oka-Sho) -> True + (Satsuki-Sho, Satsuki-Sho) -> True + (Tenno-Sho-Spring, Tenno-Sho-Spring) -> True + (NHK-Mile-Cup, NHK-Mile-Cup) -> True + (Victoria-Mile, Victoria-Mile) -> True + (Japanese-Oaks, Japanese-Oaks) -> True + (Japanese-Derby, Japanese-Derby) -> True + (Yasuda-Kinen, Yasuda-Kinen) -> True + (Takarazuka-Kinen, Takarazuka-Kinen) -> True + (Sprinters-Stakes, Sprinters-Stakes) -> True + (Shuka-Sho, Shuka-Sho) -> True + (Kikuka-Sho, Kikuka-Sho) -> True + (Tenno-Sho-Autumn, Tenno-Sho-Autumn) -> True + (Queen-Elizabeth-II-Cup, Queen-Elizabeth-II-Cup) -> True + (Mile-Championship, Mile-Championship) -> True + (Japan-Cup, Japan-Cup) -> True + (Champions-Cup, Champions-Cup) -> True + (Hanshin-Juvenile-Fillies, Hanshin-Juvenile-Fillies) -> True + (Asahi-Hai-Futurity-Stakes, Asahi-Hai-Futurity-Stakes) -> True + (Arima-Kinen, Arima-Kinen) -> True + (Hopeful-Stakes, Hopeful-Stakes) -> True + (Tokyo-Daishoten, Tokyo-Daishoten) -> True + (JBC-Classic, JBC-Classic) -> True + (JBC-Sprint, JBC-Sprint) -> True + (JBC-Ladies-Classic, JBC-Ladies-Classic) -> True + (Japan-Dirt-Derby, Japan-Dirt-Derby) -> True + (Teio-Sho, Teio-Sho) -> True + (Nikkei-Shinshun-Hai, Nikkei-Shinshun-Hai) -> True + (Tokai-Stakes, Tokai-Stakes) -> True + (American-Jockey-Club-Cup, American-Jockey-Club-Cup) -> True + (Kyoto-Kinen, Kyoto-Kinen) -> True + (Nakayama-Kinen, Nakayama-Kinen) -> True + (Tulip-Sho, Tulip-Sho) -> True + (Yayoi-Sho, Yayoi-Sho) -> True + (Kinko-Sho, Kinko-Sho) -> True + (Fillies-Revue, Fillies-Revue) -> True + (Hanshin-Daishoten, Hanshin-Daishoten) -> True + (Spring-Stakes, Spring-Stakes) -> True + (Nikkei-Sho, Nikkei-Sho) -> True + (Hanshin-Umamusume-Stakes, Hanshin-Umamusume-Stakes) -> True + (New-Zealand-Trophy, New-Zealand-Trophy) -> True + (Yomiuri-Milers-Cup, Yomiuri-Milers-Cup) -> True + (Flora-Stakes, Flora-Stakes) -> True + (Aoba-Sho, Aoba-Sho) -> True + (Kyoto-Shimbun-Hai, Kyoto-Shimbun-Hai) -> True + (Keio-Hai-Spring-Cup, Keio-Hai-Spring-Cup) -> True + (Meguro-Kinen, Meguro-Kinen) -> True + (Sapporo-Kinen, Sapporo-Kinen) -> True + (Centaur-Stakes, Centaur-Stakes) -> True + (Rose-Stakes, Rose-Stakes) -> True + (St-Lite-Kinen, St-Lite-Kinen) -> True + (Kobe-Shimbun-Hai, Kobe-Shimbun-Hai) -> True + (All-Comers, All-Comers) -> True + (Mainichi-Okan, Mainichi-Okan) -> True + (Kyoto-Daishoten, Kyoto-Daishoten) -> True + (Fuchu-Umamusume-Stakes, Fuchu-Umamusume-Stakes) -> True + (Fuji-Stakes, Fuji-Stakes) -> True + (Swan-Stakes, Swan-Stakes) -> True + (Keio-Hai-Junior-Stakes, Keio-Hai-Junior-Stakes) -> True + (Copa-Republica-Argentina, Copa-Republica-Argentina) -> True + (Daily-Hai-Junior-Stakes, Daily-Hai-Junior-Stakes) -> True + (Stayers-Stakes, Stayers-Stakes) -> True + (Hanshin-Cup, Hanshin-Cup) -> True + (Kyoto-Kimpai, Kyoto-Kimpai) -> True + (Nakayama-Kimpai, Nakayama-Kimpai) -> True + (Shinzan-Kinen, Shinzan-Kinen) -> True + (Fairy-Stakes, Fairy-Stakes) -> True + (Aichi-Hai, Aichi-Hai) -> True + (Keisei-Hai, Keisei-Hai) -> True + (Silk-Road-Stakes, Silk-Road-Stakes) -> True + (Negishi-Stakes, Negishi-Stakes) -> True + (Kisaragi-Sho, Kisaragi-Sho) -> True + (Tokyo-Shimbun-Hai, Tokyo-Shimbun-Hai) -> True + (Queen-Cup, Queen-Cup) -> True + (Kyodo-News-Hai, Kyodo-News-Hai) -> True + (Kyoto-Umamusume-Stakes, Kyoto-Umamusume-Stakes) -> True + (Diamond-Stakes, Diamond-Stakes) -> True + (Kokura-Daishoten, Kokura-Daishoten) -> True + (Arlington-Cup, Arlington-Cup) -> True + (Hankyu-Hai, Hankyu-Hai) -> True + (Ocean-Stakes, Ocean-Stakes) -> True + (Nakayama-Umamusume-Stakes, Nakayama-Umamusume-Stakes) -> True + (Falcon-Stakes, Falcon-Stakes) -> True + (Flower-Cup, Flower-Cup) -> True + (Mainichi-Hai, Mainichi-Hai) -> True + (March-Stakes, March-Stakes) -> True + (Lord-Derby-Challenge-Trophy, Lord-Derby-Challenge-Trophy) -> True + (Antares-Stakes, Antares-Stakes) -> True + (Fukushima-Umamusume-Stakes, Fukushima-Umamusume-Stakes) -> True + (Niigata-Daishoten, Niigata-Daishoten) -> True + (Heian-Stakes, Heian-Stakes) -> True + (Aoi-Stakes, Aoi-Stakes) -> True + (Naruo-Kinen, Naruo-Kinen) -> True + (Mermaid-Stakes, Mermaid-Stakes) -> True + (Epsom-Cup, Epsom-Cup) -> True + (Unicorn-Stakes, Unicorn-Stakes) -> True + (Hakodate-Sprint-Stakes, Hakodate-Sprint-Stakes) -> True + (CBC-Sho, CBC-Sho) -> True + (Radio-Nikkei-Sho, Radio-Nikkei-Sho) -> True + (Procyon-Stakes, Procyon-Stakes) -> True + (Tanabata-Sho, Tanabata-Sho) -> True + (Hakodate-Kinen, Hakodate-Kinen) -> True + (Chukyo-Kinen, Chukyo-Kinen) -> True + (Hakodate-Junior-Stakes, Hakodate-Junior-Stakes) -> True + (Ibis-Summer-Dash, Ibis-Summer-Dash) -> True + (Queen-Stakes, Queen-Stakes) -> True + (Kokura-Kinen, Kokura-Kinen) -> True + (Leopard-Stakes, Leopard-Stakes) -> True + (Sekiya-Kinen, Sekiya-Kinen) -> True + (Elm-Stakes, Elm-Stakes) -> True + (Kitakyushu-Kinen, Kitakyushu-Kinen) -> True + (Niigata-Junior-Stakes, Niigata-Junior-Stakes) -> True + (Keeneland-Cup, Keeneland-Cup) -> True + (Sapporo-Junior-Stakes, Sapporo-Junior-Stakes) -> True + (Kokura-Junior-Stakes, Kokura-Junior-Stakes) -> True + (Niigata-Kinen, Niigata-Kinen) -> True + (Shion-Stakes, Shion-Stakes) -> True + (Keisei-Hai-Autumn-Handicap, Keisei-Hai-Autumn-Handicap) -> True + (Sirius-Stakes, Sirius-Stakes) -> True + (Saudi-Arabia-Royal-Cup, Saudi-Arabia-Royal-Cup) -> True + (Artemis-Stakes, Artemis-Stakes) -> True + (Fantasy-Stakes, Fantasy-Stakes) -> True + (Miyako-Stakes, Miyako-Stakes) -> True + (Musashino-Stakes, Musashino-Stakes) -> True + (Fukushima-Kinen, Fukushima-Kinen) -> True + (Tokyo-Sports-Hai-Junior-Stakes, Tokyo-Sports-Hai-Junior-Stakes) -> True + (Kyoto-Junior-Stakes, Kyoto-Junior-Stakes) -> True + (Keihan-Hai, Keihan-Hai) -> True + (Challenge-Cup, Challenge-Cup) -> True + (Chunichi-Shimbun-Hai, Chunichi-Shimbun-Hai) -> True + (Capella-Stakes, Capella-Stakes) -> True + (Turquoise-Stakes, Turquoise-Stakes) -> True + (_, _) -> False + +// Race grades. +pub type grade + Pre-OP + OP + G3 + G2 + G1 + EX + +pub fun career-race/grade(r: career-race): grade + match r + February-Stakes -> G1 + Takamatsunomiya-Kinen -> G1 + Osaka-Hai -> G1 + Oka-Sho -> G1 + Satsuki-Sho -> G1 + Tenno-Sho-Spring -> G1 + NHK-Mile-Cup -> G1 + Victoria-Mile -> G1 + Japanese-Oaks -> G1 + Japanese-Derby -> G1 + Yasuda-Kinen -> G1 + Takarazuka-Kinen -> G1 + Sprinters-Stakes -> G1 + Shuka-Sho -> G1 + Kikuka-Sho -> G1 + Tenno-Sho-Autumn -> G1 + Queen-Elizabeth-II-Cup -> G1 + Mile-Championship -> G1 + Japan-Cup -> G1 + Champions-Cup -> G1 + Hanshin-Juvenile-Fillies -> G1 + Asahi-Hai-Futurity-Stakes -> G1 + Arima-Kinen -> G1 + Hopeful-Stakes -> G1 + Tokyo-Daishoten -> G1 + JBC-Classic -> G1 + JBC-Sprint -> G1 + JBC-Ladies-Classic -> G1 + Japan-Dirt-Derby -> G1 + Teio-Sho -> G1 + Nikkei-Shinshun-Hai -> G2 + Tokai-Stakes -> G2 + American-Jockey-Club-Cup -> G2 + Kyoto-Kinen -> G2 + Nakayama-Kinen -> G2 + Tulip-Sho -> G2 + Yayoi-Sho -> G2 + Kinko-Sho -> G2 + Fillies-Revue -> G2 + Hanshin-Daishoten -> G2 + Spring-Stakes -> G2 + Nikkei-Sho -> G2 + Hanshin-Umamusume-Stakes -> G2 + New-Zealand-Trophy -> G2 + Yomiuri-Milers-Cup -> G2 + Flora-Stakes -> G2 + Aoba-Sho -> G2 + Kyoto-Shimbun-Hai -> G2 + Keio-Hai-Spring-Cup -> G2 + Meguro-Kinen -> G2 + Sapporo-Kinen -> G2 + Centaur-Stakes -> G2 + Rose-Stakes -> G2 + St-Lite-Kinen -> G2 + Kobe-Shimbun-Hai -> G2 + All-Comers -> G2 + Mainichi-Okan -> G2 + Kyoto-Daishoten -> G2 + Fuchu-Umamusume-Stakes -> G2 + Fuji-Stakes -> G2 + Swan-Stakes -> G2 + Keio-Hai-Junior-Stakes -> G2 + Copa-Republica-Argentina -> G2 + Daily-Hai-Junior-Stakes -> G2 + Stayers-Stakes -> G2 + Hanshin-Cup -> G2 + Kyoto-Kimpai -> G3 + Nakayama-Kimpai -> G3 + Shinzan-Kinen -> G3 + Fairy-Stakes -> G3 + Aichi-Hai -> G3 + Keisei-Hai -> G3 + Silk-Road-Stakes -> G3 + Negishi-Stakes -> G3 + Kisaragi-Sho -> G3 + Tokyo-Shimbun-Hai -> G3 + Queen-Cup -> G3 + Kyodo-News-Hai -> G3 + Kyoto-Umamusume-Stakes -> G3 + Diamond-Stakes -> G3 + Kokura-Daishoten -> G3 + Arlington-Cup -> G3 + Hankyu-Hai -> G3 + Ocean-Stakes -> G3 + Nakayama-Umamusume-Stakes -> G3 + Falcon-Stakes -> G3 + Flower-Cup -> G3 + Mainichi-Hai -> G3 + March-Stakes -> G3 + Lord-Derby-Challenge-Trophy -> G3 + Antares-Stakes -> G3 + Fukushima-Umamusume-Stakes -> G3 + Niigata-Daishoten -> G3 + Heian-Stakes -> G3 + Aoi-Stakes -> G3 + Naruo-Kinen -> G3 + Mermaid-Stakes -> G3 + Epsom-Cup -> G3 + Unicorn-Stakes -> G3 + Hakodate-Sprint-Stakes -> G3 + CBC-Sho -> G3 + Radio-Nikkei-Sho -> G3 + Procyon-Stakes -> G3 + Tanabata-Sho -> G3 + Hakodate-Kinen -> G3 + Chukyo-Kinen -> G3 + Hakodate-Junior-Stakes -> G3 + Ibis-Summer-Dash -> G3 + Queen-Stakes -> G3 + Kokura-Kinen -> G3 + Leopard-Stakes -> G3 + Sekiya-Kinen -> G3 + Elm-Stakes -> G3 + Kitakyushu-Kinen -> G3 + Niigata-Junior-Stakes -> G3 + Keeneland-Cup -> G3 + Sapporo-Junior-Stakes -> G3 + Kokura-Junior-Stakes -> G3 + Niigata-Kinen -> G3 + Shion-Stakes -> G3 + Keisei-Hai-Autumn-Handicap -> G3 + Sirius-Stakes -> G3 + Saudi-Arabia-Royal-Cup -> G3 + Artemis-Stakes -> G3 + Fantasy-Stakes -> G3 + Miyako-Stakes -> G3 + Musashino-Stakes -> G3 + Fukushima-Kinen -> G3 + Tokyo-Sports-Hai-Junior-Stakes -> G3 + Kyoto-Junior-Stakes -> G3 + Keihan-Hai -> G3 + Challenge-Cup -> G3 + Chunichi-Shimbun-Hai -> G3 + Capella-Stakes -> G3 + Turquoise-Stakes -> G3 + +pub type title + Classic-Triple-Crown + Triple-Tiara + Senior-Spring-Triple-Crown + Senior-Autumn-Triple-Crown + Tenno-Sweep + Dual-Grand-Prix + Dual-Miles + Dual-Sprints + Dual-Dirts + +// Get the titles that a race contributes to. +inline fun career-race/titles(r: career-race): list + match r + Satsuki-Sho -> [Classic-Triple-Crown] + Japanese-Derby -> [Classic-Triple-Crown] + Kikuka-Sho -> [Classic-Triple-Crown] + Oka-Sho -> [Triple-Tiara] + Japanese-Oaks -> [Triple-Tiara] + Shuka-Sho -> [Triple-Tiara] + Osaka-Hai -> [Senior-Spring-Triple-Crown] + Tenno-Sho-Spring -> [Senior-Spring-Triple-Crown, Tenno-Sweep] + Takarazuka-Kinen -> [Senior-Spring-Triple-Crown, Dual-Grand-Prix] + Tenno-Sho-Autumn -> [Senior-Autumn-Triple-Crown, Tenno-Sweep] + Japan-Cup -> [Senior-Autumn-Triple-Crown] + Arima-Kinen -> [Senior-Autumn-Triple-Crown, Dual-Grand-Prix] + Yasuda-Kinen -> [Dual-Miles] + Mile-Championship -> [Dual-Miles] + Takamatsunomiya-Kinen -> [Dual-Sprints] + Sprinters-Stakes -> [Dual-Sprints] + February-Stakes -> [Dual-Dirts] + Champions-Cup -> [Dual-Dirts] + _ -> [] + +// Get the races that a title requires. +inline fun title/races(t: title): list<career-race> + match t + Classic-Triple-Crown -> [Satsuki-Sho, Japanese-Derby, Kikuka-Sho] + Triple-Tiara -> [Oka-Sho, Japanese-Oaks, Shuka-Sho] + Senior-Spring-Triple-Crown -> [Osaka-Hai, Tenno-Sho-Spring, Takarazuka-Kinen] + Senior-Autumn-Triple-Crown -> [Tenno-Sho-Autumn, Japan-Cup, Arima-Kinen] + Tenno-Sweep -> [Tenno-Sho-Spring, Tenno-Sho-Autumn] + Dual-Grand-Prix -> [Takarazuka-Kinen, Arima-Kinen] + Dual-Miles -> [Yasuda-Kinen, Mile-Championship] + Dual-Sprints -> [Takamatsunomiya-Kinen, Sprinters-Stakes] + Dual-Dirts -> [February-Stakes, Champions-Cup] + +// Get all titles earned by an uma. +pub fun career/titles(results: list<race-result>): list<title> + val wins = results.flatmap-maybe() fn(r) (if r.place == 1 then Just(r.race) else Nothing) + val title-wins = wins.filter(_.titles.is-cons).linear-set + val titles = title-wins.list.flatmap(_.titles).linear-set.list + titles.filter(_.races.linear-set.is-subset-of(title-wins)) + +// Automatically generated. +// Equality comparison of the `title` type. +pub fun title/(==)(this : title, other : title) : e bool + match (this, other) + (Classic-Triple-Crown, Classic-Triple-Crown) -> True + (Triple-Tiara, Triple-Tiara) -> True + (Senior-Spring-Triple-Crown, Senior-Spring-Triple-Crown) -> True + (Senior-Autumn-Triple-Crown, Senior-Autumn-Triple-Crown) -> True + (Tenno-Sweep, Tenno-Sweep) -> True + (Dual-Grand-Prix, Dual-Grand-Prix) -> True + (Dual-Miles, Dual-Miles) -> True + (Dual-Sprints, Dual-Sprints) -> True + (Dual-Dirts, Dual-Dirts) -> True + (_, _) -> False + +// Automatically generated. +// Shows a string representation of the `title` type. +pub fun title/show(this : title) : e string + match this + Classic-Triple-Crown -> "Classic Triple Crown" + Triple-Tiara -> "Triple Tiara" + Senior-Spring-Triple-Crown -> "Senior Spring Triple Crown" + Senior-Autumn-Triple-Crown -> "Senior Autumn Triple Crown" + Tenno-Sweep -> "Tenno Sweep" + Dual-Grand-Prix -> "Dual Grand Prix" + Dual-Miles -> "Dual Miles" + Dual-Sprints -> "Dual Sprints" + Dual-Dirts -> "Dual Dirts" + +// Graded race that a veteran ran. +pub struct race-result + race: career-race + place: int + turn: turn + +// Automatically generated. +// Equality comparison of the `race-result` type. +pub fun race-result/(==)(this : race-result, other : race-result) : e bool + match (this, other) + (Race-result(race, place, turn), Race-result(race', place', turn')) -> race == race' && place == place' && turn == turn' + +// Automatically generated. +// Shows a string representation of the `race-result` type. +pub fun race-result/show(this : race-result) : e string + match this + Race-result(race, place, turn) -> turn.show ++ " " ++ race.show ++ ": " ++ place.show + +// Determine whether two race results are for the same race. +// This differs from (==) which also requires the race to be on the same turn. +pub fun race-result/same(a: race-result, b: race-result): bool + a.race == b.race + +// Turn that a race occurred. +pub struct turn + year: turn-year + month: turn-month + half: turn-half + +// Automatically generated. +// Equality comparison of the `turn` type. +pub fun turn/(==)(this : turn, other : turn) : e bool + match (this, other) + (Turn(year, month, half), Turn(year', month', half')) -> year == year' && month == month' && half == half' + +// Automatically generated. +// Fip comparison of the `turn` type. +pub fun turn/order2(this : turn, other : turn) : e order2<turn> + match (this, other) + (Turn(year, month, half), Turn(year', month', half')) -> + match year.order2(year') + Eq2(year_eq) -> + match month.order2(month') + Eq2(month_eq) -> + match half.order2(half') + Eq2(half_eq) -> Eq2(Turn(year_eq, month_eq, half_eq)) + Lt2(half_lt, half_gt) -> Lt2(Turn(year_eq, month_eq, half_lt), Turn(year_eq, month_eq, half_gt)) + Gt2(half_lt, half_gt) -> Gt2(Turn(year_eq, month_eq, half_lt), Turn(year_eq, month_eq, half_gt)) + Lt2(month_lt, month_gt) -> Lt2(Turn(year_eq, month_lt, half), Turn(year_eq, month_gt, half')) + Gt2(month_lt, month_gt) -> Gt2(Turn(year_eq, month_lt, half'), Turn(year_eq, month_gt, half)) + Lt2(year_lt, year_gt) -> Lt2(Turn(year_lt, month, half), Turn(year_gt, month', half')) + Gt2(year_lt, year_gt) -> Gt2(Turn(year_lt, month', half'), Turn(year_gt, month, half)) + +// Automatically generated. +// Shows a string representation of the `turn` type. +pub fun turn/show(this : turn) : e string + this.year.show ++ " " ++ this.half.show ++ " " ++ this.month.show + +pub type turn-year + Junior + Classic + Senior + Finale + +// Automatically generated. +// Equality comparison of the `turn-year` type. +pub fun turn-year/(==)(this : turn-year, other : turn-year) : e bool + match (this, other) + (Junior, Junior) -> True + (Classic, Classic) -> True + (Senior, Senior) -> True + (Finale, Finale) -> True + (_, _) -> False + +// Automatically generated. +// Fip comparison of the `turn-year` type. +pub fun turn-year/order2(this : turn-year, other : turn-year) : e order2<turn-year> + match (this, other) + (Junior, Junior) -> Eq2(Junior) + (Junior, other') -> Lt2(Junior, other') + (this', Junior) -> Gt2(Junior, this') + (Classic, Classic) -> Eq2(Classic) + (Classic, other') -> Lt2(Classic, other') + (this', Classic) -> Gt2(Classic, this') + (Senior, Senior) -> Eq2(Senior) + (Senior, other') -> Lt2(Senior, other') + (this', Senior) -> Gt2(Senior, this') + (Finale, Finale) -> Eq2(Finale) + +// Automatically generated. +// Shows a string representation of the `turn-year` type. +pub fun turn-year/show(this : turn-year) : e string + match this + Junior -> "Junior Year" + Classic -> "Classic Year" + Senior -> "Senior Year" + Finale -> "Finale 1" // the 1 is in the game + +pub type turn-month + January + February + March + April + May + June + July + August + September + November + December + +// Automatically generated. +// Equality comparison of the `turn-month` type. +pub fun turn-month/(==)(this : turn-month, other : turn-month) : e bool + match (this, other) + (January, January) -> True + (February, February) -> True + (March, March) -> True + (April, April) -> True + (May, May) -> True + (June, June) -> True + (July, July) -> True + (August, August) -> True + (September, September) -> True + (November, November) -> True + (December, December) -> True + (_, _) -> False + +// Automatically generated. +// Fip comparison of the `turn-month` type. +pub fun turn-month/order2(this : turn-month, other : turn-month) : e order2<turn-month> + match (this, other) + (January, January) -> Eq2(January) + (January, other') -> Lt2(January, other') + (this', January) -> Gt2(January, this') + (February, February) -> Eq2(February) + (February, other') -> Lt2(February, other') + (this', February) -> Gt2(February, this') + (March, March) -> Eq2(March) + (March, other') -> Lt2(March, other') + (this', March) -> Gt2(March, this') + (April, April) -> Eq2(April) + (April, other') -> Lt2(April, other') + (this', April) -> Gt2(April, this') + (May, May) -> Eq2(May) + (May, other') -> Lt2(May, other') + (this', May) -> Gt2(May, this') + (June, June) -> Eq2(June) + (June, other') -> Lt2(June, other') + (this', June) -> Gt2(June, this') + (July, July) -> Eq2(July) + (July, other') -> Lt2(July, other') + (this', July) -> Gt2(July, this') + (August, August) -> Eq2(August) + (August, other') -> Lt2(August, other') + (this', August) -> Gt2(August, this') + (September, September) -> Eq2(September) + (September, other') -> Lt2(September, other') + (this', September) -> Gt2(September, this') + (November, November) -> Eq2(November) + (November, other') -> Lt2(November, other') + (this', November) -> Gt2(November, this') + (December, December) -> Eq2(December) + +// Automatically generated. +// Shows a string representation of the `turn-month` type. +pub fun turn-month/show(this : turn-month) : e string + match this + January -> "January" + February -> "February" + March -> "March" + April -> "April" + May -> "May" + June -> "June" + July -> "July" + August -> "August" + September -> "September" + November -> "November" + December -> "December" + +pub type turn-half + Early + Late + +// Automatically generated. +// Equality comparison of the `turn-half` type. +pub fun turn-half/(==)(this : turn-half, other : turn-half) : e bool + match (this, other) + (Early, Early) -> True + (Late, Late) -> True + (_, _) -> False + +// Automatically generated. +// Fip comparison of the `turn-half` type. +pub fun turn-half/order2(this : turn-half, other : turn-half) : e order2<turn-half> + match (this, other) + (Early, Early) -> Eq2(Early) + (Early, other') -> Lt2(Early, other') + (this', Early) -> Gt2(Early, this') + (Late, Late) -> Eq2(Late) + +// Automatically generated. +// Shows a string representation of the `turn-half` type. +pub fun turn-half/show(this : turn-half) : e string + match this + Early -> "Early" + Late -> "Late"