promote :: Move -> [ Move ]
promote m =
  if fromSquare (m^.to) .&. (rankBB firstRank .|. rankBB eighthRank) /= mempty
  then do
    promo <- [ Queen, Rook, Knight, Bishop ]
    return $ (promotion .~ Just promo) m
  else [ m ]
promote :: Move -> [ Move ]
promote m =
  if fromSquare (m^.to) .&. (rankBB firstRank .|. rankBB eighthRank) /= mempty
  then do
    promo <- [ Queen, Rook, Knight, Bishop ]
    return $ (promotion .~ Just promo) m
  else [ m ]
promote m =
  if fromSquare (m^.to) .&. (rankBB firstRank .|. rankBB eighthRank) /= mempty
  then do
    promo <- [ Queen, Rook, Knight, Bishop ]
    return $ (promotion .~ Just promo) m
  else [ m ]