1 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
2 module HUnit.Foldable where
5 import Control.Applicative (Applicative)
6 import Data.Either (Either(..))
7 import Data.Foldable (Foldable)
9 import Data.Proxy (Proxy(..))
10 import Prelude (Integer)
12 import Language.Symantic.Lib
13 import Testing.Compiling
24 (==>) = readTe @() @SS
27 hunits = testGroup "Foldable"
28 [ {-"[]" ==> Right (tyList (tyVar "a" varZ), [], "[]")
29 ,-} "[1, 2, 3]" ==> Right (tyList tyInteger, [1, 2, 3], "1 : 2 : 3 : []")
30 , "1 : 2 : 3 : []" ==> Right (tyList tyInteger, [1, 2, 3], "1 : 2 : 3 : []")
31 , "foldMap (\\(x0:Integer) -> [x0, x0]) [1, 2, 3]" ==> Right
34 , "foldMap (\\x0 -> x0 : x0 : []) (1 : 2 : 3 : [])" )