-- |
-- Module      :  Phladiprelio.Ukrainian.SimpleConstraints
-- Copyright   :  (c) Oleksandr Zhabenko 2020-2023
-- License     :  MIT
-- Stability   :  Experimental
-- Maintainer  :  oleksandr.zhabenko@yahoo.com
--
-- Some code shared for different Main modules.

{-# LANGUAGE NoImplicitPrelude #-}

module Phladiprelio.Ukrainian.SimpleConstraints where

import GHC.Base
import Text.Show (show)
import GHC.Num ((-))
import GHC.List (concatMap)

showB :: Int -> Bool -> String
showB :: Int -> Bool -> [Char]
showB Int
n Bool
bool
 | Int
n forall a. Ord a => a -> a -> Bool
>= Int
2 Bool -> Bool -> Bool
&& Bool
bool forall a. Eq a => a -> a -> Bool
== Bool
True = Char
'B'forall a. a -> [a] -> [a]
:forall a. Show a => a -> [Char]
show (Int
n forall a. Num a => a -> a -> a
- Int
1) forall a. Monoid a => a -> a -> a
`mappend` forall a b. (a -> [b]) -> [a] -> [b]
concatMap forall a. Show a => a -> [Char]
show [Int
0..Int
n forall a. Num a => a -> a -> a
- Int
2]
 | Bool
otherwise = [Char]
""