Question: HASKELL - Complete the code module Ex05_TypesIntroSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec {- Create the `removeNonUppercase`

HASKELL - Complete the code

module Ex05_TypesIntroSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec {- Create the `removeNonUppercase` function with proper type -} {- Create the addThree function with proper type info -} spec :: Spec spec = do describe "Functions have types" $ do it "can use a function with type" $ do pending -- removeNonUppercase "HelloWORLD" `shouldBe` "HWORLD" -- addThree 1 2 3 `shouldBe` 6 describe "Type classes" $ do it "can order strings" $ do pending "Abrakadabra" == "Zebra" `shouldBe` True -- use the words "Abrakadabra" "Zebra" -- GT `shouldBe` LT -- x >= y `shouldBe` True -- 3 functionName 5 `shouldBe` GT it "can show anything" $ do pending -- 3 `shouldBe` "3" -- True `shouldBe` "True" it "can read strings into values" $ do pending -- "True" || False `shouldBe` True -- "8.2" + 3.8 `shouldBe` 12 -- ("[1,2,3,4]" :: [Int]) `shouldBe` [1,2,3,4] -- ("(3, 'a')" :: (Int, Char)) `shouldBe` (3, 'a') it "can provide ranges, next items for Enum types" $ do pending -- `shouldBe` "abcde" -- `shouldBe` [LT,EQ,GT] -- `shouldBe` [3,4,5] -- succ to get the next -- `shouldBe` 'C' describe "Num is a numeric typeclass" $ do it "can act like numbers" $ do pending -- use the type -- (20 :: ) `shouldBe` 20 describe "fromIntegral is there historical reasons" $ do it "can add Int and Floating point numbers" $ do pending -- from... function -- (length [1,2,3,4]) + 3.2 `shouldBe` 7.2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!