MyNixOS website logo
Description

Type-safe transformations and purifications of PreCures (Japanese Battle Heroine)

See README.md for details.

TypeSafe PreCure!!

Hackage CircleCI

Type-safe transformations and purifications of PreCures (Japanese Battle Heroine).
Written in Haskell.

Features

  • Collection of Japanese battle heroines "PreCure" and their transformation and purification phrases.
    • Currently, supports from the first season to "Wonderful Pretty Cure!", including Cure Echo, Cure Mofurun, Cure Pekorin, Cure Infini, and Cure Oasis!
  • Monadic actions to play the speech of their transformations and purifications.

Characteristics

Each girl/PreCure/PreCure's variation/special item has her/its own type.
So only correct combinations of girls/PreCures and items can transform and purify.
Compared with other PreCure implementations such as rubicure, clocure, etc., this makes it much harder to use, but it reproduces the settings more correctly.
Correctness is more important for this library.

Installation

# pretty-simple is optional. But recommended if you try it on GHCi.
$ stack install typesafe-precure pretty-simple
## ... OR
$ cabal install typesafe-precure pretty-simple

Example Usage

Note:

Get transformed PreCure, etc.

$ ghci -interactive-print "Text.Pretty.Simple.pPrint"

ghci> :m ACME.PreCure
ghci> transformationSpeech (Mirai, Liko) (Mofurun :+: LinkleStoneDia)
[ "キュアップ・ラパパ! ダイヤ!"
, "ミラクル・マジカル・ジュエリーレ!"
, "ふたりの奇跡!キュアミラクル!"
, "ふたりの魔法!キュアマジカル!"
, "魔法つかいプリキュア!!"
]
ghci> transformedStyle (Mirai, Liko) (Mofurun :+: LinkleStoneRuby)
( CureMiracle_Ruby
, CureMagical_Ruby
)
ghci> purificationSpeech (CureMiracle_Ruby, CureMagical_Ruby) (Mofurun :+: LinkleStoneRuby, LinkleStick :+: LinkleStoneRuby)
[ "リンクルステッキ!"
, "(モッフー!)"
, "ルビー!紅の情熱よ私達の手に!"
, "フルフルリンクル!"
, "プリキュア!ルビー・パッショナーレ!"
]

🆕Get Transformation / Purification Speech Different between Episodes

Since v0.8.0.1

By using the :< operator, you can replace some part of the speech into another episode's version. For example:

ghci> members = (Manatsu, Sango, Minori, Asuka)
ghci> items = (TropicalPact :+: HeartKuruRingCureSummer, TropicalPact :+: HeartKuruRingCureCoral, TropicalPact :+: HeartKuruRingCurePapaya, TropicalPact :+: HeartKuruRingCureFlamingo)
ghci> transformationSpeech (members :< "うわさも吹き飛ぶ!") items
[ "プリキュア!トロピカルチェンジ!"
, "レッツメイク!キャッチ!"
, "チーク!"
, "アイズ!"
, "ヘアー!"
, "リップ!"
, "ドレス!"
, "ときめく常夏!キュアサマー!"
, "きらめく宝石!キュアコーラル!"
, "ひらめく果実(フルーツ)!キュアパパイア!"
, "はためく翼!キュアフラミンゴ!"
, "はーっ!"
, "うわさも吹き飛ぶ!"
, "トロピカル〜ジュ!プリキュア!"
]

Compare with transformationSpeech members items!

In addition to the example above, the following transformations and purifications can be replaced by :<:

From Tropical-Rouge! PreCure:

purificationSpeech  (Laura :< "赤") MermaidAquaPot

members = (Manatsu, Sango, Minori, Asuka, Laura)
items = (TropicalPact :+: HeartKuruRingCureSummer, TropicalPact :+: HeartKuruRingCureCoral, TropicalPact :+: HeartKuruRingCurePapaya, TropicalPact :+: HeartKuruRingCureFlamingo, MermaidAquaPact :+: HeartKuruRingCureLaMer)
transformationSpeech (members :< "子どももなれるよ!") items

From DokiDoki! PreCure:

transformationSpeech (Mana :< "ヤギさん") (LovelyCommuneSharuru :+: CureLoveads)
transformationSpeech ((Mana, Rikka, Alice, Makoto) :< "バラさん") (LovelyCommuneSharuru :+: CureLoveads, LovelyCommuneRaquel :+: CureLoveads, LovelyCommuneLance :+: CureLoveads, LovelyCommuneDavi :+: CureLoveads)
transformationSpeech ((Mana, Rikka, Alice, Makoto, Aguri) :< "タコさん") (LovelyCommuneSharuru :+: CureLoveads, LovelyCommuneRaquel :+: CureLoveads, LovelyCommuneLance :+: CureLoveads, LovelyCommuneDavi :+: CureLoveads, LoveEyesPalette :+: CureLoveads)

PreCure Monad

ghci> :{
ghci> let scene = do
....>       say "この罪を抱いたまま、もう一度、グランプリンセスを目指す!"
....>       scarlet <- transform Towa (PrincessPerfume :+: DressUpKeyScarlet)
....>       scarletModeElegant <- transform scarlet (PrincessPerfume :+: DressUpKeyPhoenix)
....>       purify scarletModeElegant (ScarletViolin :+: DressUpKeyPhoenix)
ghci> :}
ghci> :t scene
scene :: ACME.PreCure.Monad.PreCureMonad ()

Transform and Purify as a Pure Function

ghci> composeEpisode scene
[ "この罪を抱いたまま、もう一度、グランプリンセスを目指す!"
, "プリキュア!プリンセスエンゲージ!"
, "深紅の炎のプリンセス!キュアスカーレット!"
, "冷たい檻に閉ざされた夢、返していただきますわ。"
, "お覚悟を決めなさい!"
, "エクスチェンジ!モードエレガント!"
, "スカーレット・バイオリン!フェニックス!"
, "羽ばたけ炎の翼!"
, "プリキュア! フェニックス・ブレイズ!"
, "ごきげんよう。"
]

Transform and Purify as an IO Action

The phrases are printed by line. Inspired by the similar feature of rubicure.

ghci> printEpisode scene
この罪を抱いたまま、もう一度、グランプリンセスを目指す!
プリキュア!プリンセスエンゲージ!
深紅の炎のプリンセス!キュアスカーレット!
冷たい檻に閉ざされた夢、返していただきますわ。
お覚悟を決めなさい!
エクスチェンジ!モードエレガント!
スカーレット・バイオリン!フェニックス!
羽ばたけ炎の翼!
プリキュア! フェニックス・ブレイズ!
ごきげんよう。
Metadata

Version

0.11.1.1

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows