1 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
2 {-# OPTIONS_GHC -O0 -fmax-simplifier-iterations=0 #-}
3 module Lib.Foldable.Test where
7 import Data.Proxy (Proxy(..))
8 import Prelude hiding ((&&), not, (||))
10 import Language.Symantic.Typing
11 import Compiling.Term.Test
22 (==>) = test_compile @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 : [])" )