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

[ acme, bsd3, library ] [ Propose Tags ]

See README.md for details.


[Skip to Readme]

Modules

[Last Documentation]

  • ACME
    • ACME.PreCure
      • ACME.PreCure.Monad
      • ACME.PreCure.Textbook
        • ACME.PreCure.Textbook.DokiDoki
        • ACME.PreCure.Textbook.First
        • ACME.PreCure.Textbook.Fresh
        • ACME.PreCure.Textbook.GoPrincess
        • ACME.PreCure.Textbook.HappinessCharge
        • ACME.PreCure.Textbook.HealinGood
        • ACME.PreCure.Textbook.HeartCatch
        • ACME.PreCure.Textbook.Hugtto
        • ACME.PreCure.Textbook.KirakiraALaMode
        • ACME.PreCure.Textbook.MahoGirls
        • ACME.PreCure.Textbook.MaxHeart
        • ACME.PreCure.Textbook.Movie
        • ACME.PreCure.Textbook.Smile
        • ACME.PreCure.Textbook.SplashStar
        • ACME.PreCure.Textbook.StarTwinkle
        • ACME.PreCure.Textbook.Suite
        • ACME.PreCure.Textbook.TropicalRouge
        • ACME.PreCure.Textbook.Yes5
        • ACME.PreCure.Textbook.Yes5GoGo
      • ACME.PreCure.Types

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.3.1.0, 0.3.1.1, 0.4.0.0, 0.5.0.0, 0.5.0.1, 0.5.1.1, 0.6.1.1, 0.6.2.1, 0.6.3.1, 0.7.0.1, 0.7.1.1, 0.7.2.1, 0.7.3.1, 0.7.4.1, 0.7.5.1, 0.7.6.1, 0.7.6.2, 0.7.7.1, 0.7.8.1, 0.7.9.1, 0.7.10.1, 0.7.11.1, 0.8.0.1, 0.8.1.1, 0.8.2.1, 0.8.2.2, 0.9.0.1, 0.9.1.1, 0.10.0.1, 0.10.1.1, 0.10.1.2
Change log CHANGELOG.md
Dependencies aeson, aeson-pretty, autoexporter, base (>=4.7 && <5), bytestring, dlist, monad-skeleton, template-haskell, text, th-data-compat, th-strict-compat [details]
License BSD-3-Clause
Copyright 2021 YAMAMOTO Yuji
Author YAMAMOTO Yuji
Maintainer igrep@n.email.ne.jp
Category ACME
Home page https://github.com/igrep/typesafe-precure#readme
Source repo head: git clone https://github.com/igrep/typesafe-precure
Uploaded by igrep at 2022-01-16T06:55:34Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 12747 total (79 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2022-01-16 [all 1 reports]

Readme for typesafe-precure-0.8.2.2

[back to package description]

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 "Tropical-Rouge! PreCure", 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
  :: Control.Monad.Skeleton.Skeleton
       ACME.PreCure.Monad.PreCureMonadBase ()

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