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