CS计算机代考程序代写 Haskell — setting the “warn-incomplete-patterns” flag asks GHC to warn you

— setting the “warn-incomplete-patterns” flag asks GHC to warn you
— about possible missing cases in pattern-matching definitions
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}

— see https://wiki.haskell.org/Safe_Haskell
{-# LANGUAGE Safe #-}

module Assessed3 (priceRange , allergyFree ,
isValidSpec , checkSpec ,
parentDir , openSubDir ,
cross , sieveFrom , sequenceFrom)
where

import Types
import Q3Example

———————————————————————————
—————- DO **NOT** MAKE ANY CHANGES ABOVE THIS LINE ——————–
———————————————————————————

{- Exercise 1 -}

priceRange :: Price -> Price -> [Cupcake] -> [Cupcake]
priceRange = undefined

allergyFree :: [Ingredient] -> [Cupcake] -> [Cupcake]
allergyFree = undefined

{- Exercise 2 -}

isValidSpec :: Spec -> Tin -> Bool
isValidSpec = undefined

checkSpec :: Spec -> Tin -> Bool
checkSpec = undefined

{- Exercise 3 -}

parentDir :: Breadcrumb -> Maybe Breadcrumb
parentDir = undefined

openSubDir :: String -> Breadcrumb -> Maybe Breadcrumb
openSubDir = undefined

{- Exercise 4 -}

cross :: Int -> [Bool] -> [Bool]
cross = undefined

sieveFrom :: Int -> [Bool] -> [Bool]
sieveFrom = undefined

sieve :: [Bool]
sieve = sieveFrom 2 (repeat True)

sequenceFrom :: Int -> [Bool] -> [Int]
sequenceFrom = undefined

primes :: [Int]
primes = sequenceFrom 2 sieve