{- |
Description: Crossword puzzles
Copyright: Copyright (C) 2021 Yoo Chung
License: GPL-3.0-or-later
Maintainer: dev@chungyc.org

Part of Ninety-Nine Haskell "Problems".  Some solutions are in "Solutions.P99".
-}
module Problems.P99 (solveCrossword, Crossword (..), crosswordPuzzle, crosswordPuzzle') where

import           Problems.Crosswords
import qualified Solutions.P99       as Solution

-- $setup
-- >>> import Data.Maybe (fromJust)
-- >>> import Problems.Crosswords

{- |
Given an empty, or almost empty, crossword puzzle grid and a set of words,
the problem is to place the words on the grid.

Words are strings of at least two characters.
A horizontal or vertical sequence of spots in the crossword puzzle grid is called a site.
Our problem is to find a compatible way of placing words onto sites.
Each word should be placed at most once at a site.

Try to solve the \(25 \times 25\) crossword puzzle in 'crosswordPuzzle''.

=== Examples

>>> :{
crosswordPuzzle == Crossword
  { word = ["ALPHA", "ARES", "POPPY"]
  , grid = [ [ Left False, Left False, Left True,  Left False, Left False ]
           , [ Left False, Left False, Left True,  Left False, Left False ]
           , [ Left True,  Left True,  Left True,  Left True,  Left True  ]
           , [ Left False, Left False, Left True,  Left False, Left True  ]
           , [ Left False, Left False, Left True,  Left False, Left True  ]
           , [ Left False, Left False, Left False, Left False, Left True  ]
           ]
  }
:}
True

>>> head $ fromJust $ solveCrossword crosswordPuzzle
[Nothing,Nothing,Just 'P',Nothing,Nothing]

>>> printCrossword $ solveCrossword crosswordPuzzle
■ ■ P ■ ■
■ ■ O ■ ■
A L P H A
■ ■ P ■ R
■ ■ Y ■ E
■ ■ ■ ■ S
-}
solveCrossword :: Crossword -> Maybe [[Maybe Char]]
solveCrossword :: Crossword -> Maybe [[Maybe Char]]
solveCrossword = Crossword -> Maybe [[Maybe Char]]
Solution.solveCrossword

-- | A crossword puzzle of size \(5 \times 6\).
--
-- This is the puzzle used as the example for 'solveCrossword'.
crosswordPuzzle :: Crossword
crosswordPuzzle :: Crossword
crosswordPuzzle = Crossword
  { word :: [String]
word = [String
"ALPHA", String
"ARES", String
"POPPY"]
  , grid :: [[Either Bool Char]]
grid = [ [ Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
True,  Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False ]
           , [ Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
True,  Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False ]
           , [ Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
True,  Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
True,  Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
True,  Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
True,  Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
True  ]
           , [ Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
True,  Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
True  ]
           , [ Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
True,  Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
True  ]
           , [ Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
False, Bool -> Either Bool Char
forall a b. a -> Either a b
Left Bool
True  ]
           ]
 }

-- | A crossword puzzle of size \(25 \times 25\).
--
-- This is the puzzle in file @p99d.dat@ included with problem 99 in the original list of problems.
crosswordPuzzle' :: Crossword
crosswordPuzzle' :: Crossword
crosswordPuzzle' = Crossword
  { word :: [String]
word = [ String
"BANI"
           , String
"HAUS"
           , String
"NETZ"
           , String
"LENA"
           , String
"ANKER"
           , String
"ARIEL"
           , String
"GASSE"
           , String
"INNEN"
           , String
"ORADE"
           , String
"SESAM"
           , String
"SIGEL"
           , String
"ANGOLA"
           , String
"AZETAT"
           , String
"EKARTE"
           , String
"NATTER"
           , String
"NENNER"
           , String
"NESSEL"
           , String
"RITTER"
           , String
"SOMMER"
           , String
"TAUNUS"
           , String
"TRANIG"
           , String
"AGENTUR"
           , String
"ERRATEN"
           , String
"ERREGER"
           , String
"GELEISE"
           , String
"HAENDEL"
           , String
"KAROSSE"
           , String
"MANAGER"
           , String
"OSTEREI"
           , String
"SIDERIT"
           , String
"TERRIER"
           , String
"ANATOMIE"
           , String
"ANPASSEN"
           , String
"BARKASSE"
           , String
"BEDANKEN"
           , String
"DEKADENT"
           , String
"EINLADEN"
           , String
"ERLASSEN"
           , String
"FRAGMENT"
           , String
"GARANTIE"
           , String
"KRAWATTE"
           , String
"MEISTERN"
           , String
"REAKTION"
           , String
"TENTAKEL"
           , String
"TRIANGEL"
           , String
"UEBERALL"
           , String
"VERGEBEN"
           , String
"AFRIKANER"
           , String
"BESTELLEN"
           , String
"BULLAUGEN"
           , String
"SANTANDER"
           , String
"VERBERGEN"
           , String
"ALLENSTEIN"
           , String
"AUSTRALIEN"
           , String
"BETEILIGEN"
           , String
"NATALITAET"
           , String
"OBERHAUSEN"
           , String
"UNTERSTAND"
           , String
"LEUMUND"
           ]
  , grid :: [[Either Bool Char]]
grid = [ [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t]
           , [Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
f,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t,Either Bool Char
forall {b}. Either Bool b
t]
           ]
  }
  where f :: Either Bool b
f = Bool -> Either Bool b
forall a b. a -> Either a b
Left Bool
False
        t :: Either Bool b
t = Bool -> Either Bool b
forall a b. a -> Either a b
Left Bool
True