The typesafe-precure package

[ Tags: acme, bsd3, library ] [ Propose Tags ]

See README.md for details.


[Skip to Readme]

Properties

Versions 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
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, th-utilities [details]
License BSD3
Copyright 2017 Yuji Yamamoto
Author Yuji Yamamoto
Maintainer whosekiteneverfly@gmail.com
Category ACME
Home page https://github.com/igrep/typesafe-precure#readme
Source repository head: git clone https://github.com/igrep/typesafe-precure
Uploaded Sat Dec 2 09:58:20 UTC 2017 by igrep
Distributions NixOS:0.5.0.1
Downloads 474 total (195 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2017-12-02 [all 3 reports]
Hackage Matrix CI

Modules

  • ACME
    • ACME.PreCure
      • ACME.PreCure.Index
        • ACME.PreCure.Index.Types
      • ACME.PreCure.Monad
      • ACME.PreCure.Textbook
        • ACME.PreCure.Textbook.Dokidoki
          • ACME.PreCure.Textbook.Dokidoki.Types
          • ACME.PreCure.Textbook.Dokidoki.Words
        • ACME.PreCure.Textbook.First
          • ACME.PreCure.Textbook.First.Types
          • ACME.PreCure.Textbook.First.Words
        • ACME.PreCure.Textbook.Fresh
          • ACME.PreCure.Textbook.Fresh.Types
          • ACME.PreCure.Textbook.Fresh.Words
        • ACME.PreCure.Textbook.GoPrincess
          • ACME.PreCure.Textbook.GoPrincess.Types
          • ACME.PreCure.Textbook.GoPrincess.Words
        • ACME.PreCure.Textbook.HappinessCharge
          • ACME.PreCure.Textbook.HappinessCharge.Types
          • ACME.PreCure.Textbook.HappinessCharge.Words
        • ACME.PreCure.Textbook.HeartCatch
          • ACME.PreCure.Textbook.HeartCatch.Types
          • ACME.PreCure.Textbook.HeartCatch.Words
        • ACME.PreCure.Textbook.KirakiraALaMode
        • ACME.PreCure.Textbook.MahoGirls
          • ACME.PreCure.Textbook.MahoGirls.Types
          • ACME.PreCure.Textbook.MahoGirls.Words
        • ACME.PreCure.Textbook.MaxHeart
          • ACME.PreCure.Textbook.MaxHeart.Types
          • ACME.PreCure.Textbook.MaxHeart.Words
        • ACME.PreCure.Textbook.Movie
          • ACME.PreCure.Textbook.Movie.Types
          • ACME.PreCure.Textbook.Movie.Words
        • ACME.PreCure.Textbook.Smile
          • ACME.PreCure.Textbook.Smile.Types
          • ACME.PreCure.Textbook.Smile.Words
        • ACME.PreCure.Textbook.SplashStar
          • ACME.PreCure.Textbook.SplashStar.Types
          • ACME.PreCure.Textbook.SplashStar.Words
        • ACME.PreCure.Textbook.Suite
          • ACME.PreCure.Textbook.Suite.Types
          • ACME.PreCure.Textbook.Suite.Words
        • ACME.PreCure.Textbook.Yes5
          • ACME.PreCure.Textbook.Yes5.Types
          • ACME.PreCure.Textbook.Yes5.Words
        • ACME.PreCure.Textbook.Yes5GoGo
          • ACME.PreCure.Textbook.Yes5GoGo.Types
          • ACME.PreCure.Textbook.Yes5GoGo.Words
      • ACME.PreCure.Types

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for typesafe-precure-0.5.0.1

[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 "Kirakira ☆ A La Mode", including Cure Echo and Cure Mofurun!
  • 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

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

Example Usage

Note:

  • To show Japanese characters in GHCi, use unicode-show
  • Output of GHCi below is prettified by hand.

Get transformed PreCure, etc.

$ ghci -interactive-print=Text.Show.Unicode.uprint

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) (LinkleStick LinkleStoneRuby, Mofurun LinkleStoneRuby)
[ "リンクルステッキ!"
, "(モッフー!)"
, "ルビー!紅の情熱よ私達の手に!"
, "フルフルリンクル!"
, "プリキュア!ルビー・パッショナーレ!"
]

PreCure Monad

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