pawnEnPassantSquares :: Board -> [ (Square, Square, Maybe Square) ]
pawnEnPassantSquares b = case b^.enPassant of
  Just square -> do
    pawn <- toList $ (fromSquare (offset square 1)
                      .|. fromSquare (offset square (-1)))
            .&. largeNeighbourFilesBB (file square)
            .&. myPiecesOf b Pawn
    return (pawn, offset square $ direction (b^.next) 8, Just square)
  Nothing -> []


------------------------------------------------------------------------------
pawnEnPassantSquares :: Board -> [ (Square, Square, Maybe Square) ]
pawnEnPassantSquares b = case b^.enPassant of
  Just square -> do
    pawn <- toList $ (fromSquare (offset square 1)
                      .|. fromSquare (offset square (-1)))
            .&. largeNeighbourFilesBB (file square)
            .&. myPiecesOf b Pawn
    return (pawn, offset square $ direction (b^.next) 8, Just square)
  Nothing -> []


------------------------------------------------------------------------------
pawnEnPassantSquares b = case b^.enPassant of
  Just square -> do
    pawn <- toList $ (fromSquare (offset square 1)
                      .|. fromSquare (offset square (-1)))
            .&. largeNeighbourFilesBB (file square)
            .&. myPiecesOf b Pawn
    return (pawn, offset square $ direction (b^.next) 8, Just square)
  Nothing -> []


------------------------------------------------------------------------------