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