Documentation for (&&) and (&&) states that they are lazy in their second argument...
[ghc.git] / testsuite / tests / typecheck / should_compile / tc048.hs
1 module ShouldSucceed where
2
3 data OL a = MkOL [a]
4 data FG a b = MkFG (OL (a,b))
5 data AFE n a b = MkAFE (OL (n,(FG a b)))
6
7 --ranOAL :: OL (a,v) -> [a]
8 ranOAL :: OL (a,v) -> [v]
9 ranOAL (MkOL xs) = mAp sNd xs
10
11 mAp f [] = []
12 mAp f (x:xs) = (f x) : mAp f xs
13
14 sNd (f,s) = s
15
16 ranAFE :: AFE n a b -> [FG a b] -- ?
17 ranAFE (MkAFE nfs) = ranOAL nfs
18
19
20
21