1 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
2 module Lib.Foldable.Test where
6 import Data.Proxy (Proxy(..))
7 import Prelude hiding ((&&), not, (||))
9 import Language.Symantic.Typing
10 import Compiling.Term.Test
21 (==>) = test_compile @Ifaces
24 tests = testGroup "Foldable"
25 [ "[] @Integer" ==> Right (ty @[] :$ ty @Integer, [], "[]")
26 , "[1, 2, 3]" ==> Right (ty @[] :$ ty @Integer, [1, 2, 3], "1 : 2 : 3 : []")
27 , "foldMap (\\(x0:Integer) -> [x0, x0]) [1, 2, 3]" ==> Right
28 ( ty @[] :$ ty @Integer
30 , "foldMap (\\x0 -> x0 : x0 : []) (1 : 2 : 3 : [])" )