-- |
-- Module      :  Acme.CuteGirl
-- Copyright   :  (c) Mateusz Kowalczyk 2014
-- License     :  GPL-3
--
-- Maintainer  :  fuuzetsu@fuuzetsu.co.uk
-- Stability   :  stable
--
-- Module that maybe gives you a cute girl.
module Acme.CuteGirl where

import System.Environment (getArgs)

-- | Cute girls capable of doing cute stuff
data CuteGirl = Sayaka | Kyōko | Homura deriving Int -> CuteGirl -> ShowS
[CuteGirl] -> ShowS
CuteGirl -> String
(Int -> CuteGirl -> ShowS)
-> (CuteGirl -> String) -> ([CuteGirl] -> ShowS) -> Show CuteGirl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CuteGirl -> ShowS
showsPrec :: Int -> CuteGirl -> ShowS
$cshow :: CuteGirl -> String
show :: CuteGirl -> String
$cshowList :: [CuteGirl] -> ShowS
showList :: [CuteGirl] -> ShowS
Show

-- | Did you expect a cute girl? Too bad!
cuteGirl :: Maybe CuteGirl
cuteGirl :: Maybe CuteGirl
cuteGirl = CuteGirl -> Maybe CuteGirl
forall a. a -> Maybe a
Just CuteGirl
Sayaka

-- | Prints a descriptive result of 'cuteGirl'.
printCuteGirl :: IO ()
printCuteGirl :: IO ()
printCuteGirl = case Maybe CuteGirl
cuteGirl of
  Just CuteGirl
Sayaka -> String -> IO ()
putStrLn (String -> IO ()) -> String -> IO ()
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat [ String
"You expected some cute girl?\n"
                                   , String
"Too bad!\n"
                                   , String
"It was Sayaka-chan!"
                                   ]
  Maybe CuteGirl
_ -> () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

-- | Native version of 'printCuteGirl'.
jpnPrintCuteGirl :: IO ()
jpnPrintCuteGirl :: IO ()
jpnPrintCuteGirl = case Maybe CuteGirl
cuteGirl of
  Just CuteGirl
Sayaka -> String -> IO ()
putStrLn (String -> IO ()) -> String -> IO ()
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat [ String
"かわいい女の子かと思った?\n"
                                   , String
"残念!\n"
                                   , String
"さやかちゃんでした!"
                                   ]
  Maybe CuteGirl
_ -> () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()