summaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-05-11 20:57:07 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-05-12 00:50:34 +0200
commite4725c07ee3e7e3fc010df418d16f37c39b0af0f (patch)
treecb10e1d1203eed875955097311ccbe0943564226 /testdata
parent95e006bf5afa8d3473e3fe4401f4c9316186a428 (diff)
mutual function definitions
Diffstat (limited to 'testdata')
-rw-r--r--testdata/Builtins.out351
-rw-r--r--testdata/HyperbolicParaboloic.out11
-rw-r--r--testdata/Hyperboloid.out14
-rw-r--r--testdata/Internals.out161
-rw-r--r--testdata/Prelude.out1012
-rw-r--r--testdata/Spiral.out5
-rw-r--r--testdata/ambig.out29
-rw-r--r--testdata/complex.out248
-rw-r--r--testdata/concatmap01.out2
-rw-r--r--testdata/data.out32
-rw-r--r--testdata/editor-examples/Cube.out11
-rw-r--r--testdata/editor-examples/Heartbeat.out35
-rw-r--r--testdata/editor-examples/LambdaCube2.out11
-rw-r--r--testdata/editor-examples/MagicCube.out11
-rw-r--r--testdata/editor-examples/RecLC.out33
-rw-r--r--testdata/editor-examples/RecursiveTexture.out55
-rw-r--r--testdata/editor-examples/Tetrahedron.out11
-rw-r--r--testdata/editor-examples/Texturing.out11
-rw-r--r--testdata/example08.out48
-rw-r--r--testdata/fetcharrays01.out7
-rw-r--r--testdata/framebuffer02.reject.out5
-rw-r--r--testdata/gfx03.out12
-rw-r--r--testdata/id.out3
-rw-r--r--testdata/instantiate.out3
-rw-r--r--testdata/instantiate2.out7
-rw-r--r--testdata/it.out6
-rw-r--r--testdata/language-features/adt/adt02.out6
-rw-r--r--testdata/language-features/adt/adt05.out6
-rw-r--r--testdata/language-features/as-pattern/as-pattern01.out5
-rw-r--r--testdata/language-features/as-pattern/as-pattern02.out34
-rw-r--r--testdata/language-features/basic-list/dotdot01.out2
-rw-r--r--testdata/language-features/basic-list/listcomp01.out2
-rw-r--r--testdata/language-features/basic-list/listcomp02.out2
-rw-r--r--testdata/language-features/basic-list/listcomp04.out6
-rw-r--r--testdata/language-features/basic-list/listcomp05.out2
-rw-r--r--testdata/language-features/basic-list/listcomp06.out8
-rw-r--r--testdata/language-features/basic-list/listcomp07.out12
-rw-r--r--testdata/language-features/basic-values/def01.out4
-rw-r--r--testdata/language-features/basic-values/def04.out6
-rw-r--r--testdata/language-features/basic-values/deforder03.out2
-rw-r--r--testdata/language-features/basic-values/deforder04.out2
-rw-r--r--testdata/language-features/basic-values/deforder05.out2
-rw-r--r--testdata/language-features/basic-values/deforder06.out2
-rw-r--r--testdata/language-features/basic-values/fixity01.out8
-rw-r--r--testdata/language-features/basic-values/fixity02.out8
-rw-r--r--testdata/language-features/basic-values/infix01.out4
-rw-r--r--testdata/language-features/basic-values/infix02.out4
-rw-r--r--testdata/language-features/basic-values/lambda01.out8
-rw-r--r--testdata/language-features/basic-values/lambda03.out4
-rw-r--r--testdata/language-features/basic-values/let01.out17
-rw-r--r--testdata/language-features/basic-values/let02.out10
-rw-r--r--testdata/language-features/basic-values/operator01.out8
-rw-r--r--testdata/language-features/basic-values/shadowing01.out21
-rw-r--r--testdata/language-features/basic-values/shadowing02.out26
-rw-r--r--testdata/language-features/basic-values/shadowing03.out2
-rw-r--r--testdata/language-features/basic-values/shadowing04.out2
-rw-r--r--testdata/language-features/basic-values/typesig05.out4
-rw-r--r--testdata/language-features/basic-values/typesig06.out4
-rw-r--r--testdata/language-features/basic-values/where01.out18
-rw-r--r--testdata/language-features/basic-values/where04.out9
-rw-r--r--testdata/language-features/basic-values/where05.out24
-rw-r--r--testdata/language-features/basic-values/wildcard01.out2
-rw-r--r--testdata/language-features/pattern/caseWhere.out7
-rw-r--r--testdata/language-features/pattern/unreachable.out2
-rw-r--r--testdata/language-features/pattern/viewPattern.out2
-rw-r--r--testdata/language-features/recursion/mutualConst.lc9
-rw-r--r--testdata/language-features/recursion/mutualConst.out195
-rw-r--r--testdata/language-features/recursion/mutualFunc.lc11
-rw-r--r--testdata/language-features/recursion/mutualFunc.out107
-rw-r--r--testdata/language-features/recursion/mutualRec.lc10
-rw-r--r--testdata/language-features/recursion/mutualRec.out140
-rw-r--r--testdata/language-features/recursion/simplerec01.out17
-rw-r--r--testdata/language-features/section/section01.out6
-rw-r--r--testdata/let.out6
-rw-r--r--testdata/letIndent.out8
-rw-r--r--testdata/line01.out7
-rw-r--r--testdata/listcompr01.out9
-rw-r--r--testdata/listcompr02.out15
-rw-r--r--testdata/listcompr03.out15
-rw-r--r--testdata/listcompr04.out2
-rw-r--r--testdata/listcompr05.out19
-rw-r--r--testdata/localfun.out2
-rw-r--r--testdata/localfun2.out61
-rw-r--r--testdata/loopIssue.out196
-rw-r--r--testdata/primes.out553
-rw-r--r--testdata/record01.reject.out57
-rw-r--r--testdata/record02.out34
-rw-r--r--testdata/reduce06.out2
-rw-r--r--testdata/swizzling.out2
-rw-r--r--testdata/traceTest.out2
-rw-r--r--testdata/typeclass.out23
-rw-r--r--testdata/typesig.reject.out22
-rw-r--r--testdata/where.out8
-rw-r--r--testdata/zip01.out37
94 files changed, 2272 insertions, 1734 deletions
diff --git a/testdata/Builtins.out b/testdata/Builtins.out
index c47b4fd5..8cfc533f 100644
--- a/testdata/Builtins.out
+++ b/testdata/Builtins.out
@@ -805,45 +805,49 @@ head
805 a 805 a
806 806
807(++) 807(++)
808 = _lhs 808 = primFix
809 (++) 809 \(a :: _) -> _lhs
810 \(a :: _) (b :: _) -> case'List 810 (++)
811 (\(_ :: _) -> _) 811 \(b :: _) (c :: _) -> case'List
812 (_rhs b) 812 (\(_ :: _) -> _)
813 (\(c :: _) (d :: _) -> _rhs (c : d ++ b)) 813 (_rhs c)
814 a 814 (\(d :: _) (e :: _) -> _rhs (d : a e c))
815 b
815 816
816foldr 817foldr
817 = _lhs 818 = primFix
818 foldr 819 \(a :: _) -> _lhs
819 \(a :: _) (b :: _) (c :: _) -> case'List 820 foldr
820 (\(_ :: _) -> _) 821 \(b :: _) (c :: _) (d :: _) -> case'List
821 (_rhs b) 822 (\(_ :: _) -> _)
822 (\(d :: _) (e :: _) -> _rhs (a d (foldr a b e))) 823 (_rhs c)
823 c 824 (\(e :: _) (f :: _) -> _rhs (b e (a b c f)))
825 d
824 826
825concat = _lhs concat (_rhs (foldr (++) [])) 827concat = _lhs concat (_rhs (foldr (++) []))
826 828
827map 829map
828 = _lhs 830 = primFix
829 map 831 \(a :: _) -> _lhs
830 \(a :: _) (b :: _) -> case'List 832 map
831 (\(_ :: _) -> _) 833 \(b :: _) (c :: _) -> case'List
832 (_rhs []) 834 (\(_ :: _) -> _)
833 (\(c :: _) (d :: _) -> _rhs (a c : map a d)) 835 (_rhs [])
834 b 836 (\(d :: _) (e :: _) -> _rhs (b d : a b e))
837 c
835 838
836concatMap :: forall (a :: _) (b :: _) . (a -> [b]) -> [a] -> [b] 839concatMap :: forall (a :: _) (b :: _) . (a -> [b]) -> [a] -> [b]
837concatMap = _lhs concatMap \(a :: _) (b :: _) -> _rhs (concat (map a b)) 840concatMap = _lhs concatMap \(a :: _) (b :: _) -> _rhs (concat (map a b))
838 841
839len 842len
840 = _lhs 843 = primFix
841 len 844 \(a :: _) -> _lhs
842 \(a :: _) -> case'List 845 len
843 (\(_ :: _) -> _) 846 \(b :: _) -> case'List
844 (_rhs (fromInt 0)) 847 (\(_ :: _) -> _)
845 (\(_ :: _) (b :: _) -> _rhs (fromInt 1 `primAddInt` len b)) 848 (_rhs (fromInt 0))
846 a 849 (\(_ :: _) (c :: _) -> _rhs (fromInt 1 `primAddInt` a c))
850 b
847 851
848data Maybe (_ :: Type) :: Type where 852data Maybe (_ :: Type) :: Type where
849 Nothing :: forall a . Maybe a 853 Nothing :: forall a . Maybe a
@@ -1191,17 +1195,18 @@ rasterizePrimitives
1191 1195
1192allSame :: forall (a :: _) . [a] -> Constraint 1196allSame :: forall (a :: _) . [a] -> Constraint
1193allSame 1197allSame
1194 = _lhs 1198 = primFix
1195 allSame 1199 \(a :: forall (b :: _) . [b] -> Constraint) -> _lhs
1196 \(a :: _) -> case'List 1200 allSame
1197 (\(_ :: _) -> _) 1201 \(c :: _) -> case'List
1198 (_rhs 'CUnit)
1199 (\(b :: _) (c :: _) -> case'List
1200 (\(_ :: _) -> _) 1202 (\(_ :: _) -> _)
1201 (_rhs 'CUnit) 1203 (_rhs 'CUnit)
1202 (\(d :: _) (e :: _) -> _rhs ('T2 (b `'EqCTt` d) (allSame (d : e)))) 1204 (\(d :: _) (e :: _) -> case'List
1203 c) 1205 (\(_ :: _) -> _)
1204 a 1206 (_rhs 'CUnit)
1207 (\(f :: _) (g :: _) -> _rhs ('T2 (d `'EqCTt` f) (a (f : g))))
1208 e)
1209 c
1205 1210
1206sameLayerCounts 1211sameLayerCounts
1207 = _lhs sameLayerCounts \(a :: _) -> _rhs (allSame (map 'ImageLC a)) 1212 = _lhs sameLayerCounts \(a :: _) -> _rhs (allSame (map 'ImageLC a))
@@ -1583,7 +1588,7 @@ accumulationContext = _lhs accumulationContext \(a :: _) -> _rhs a
1583 (undefined 'ImageKind) 1588 (undefined 'ImageKind)
1584 1589
1585'FragmentStream :: Nat -> Type -> Type 1590'FragmentStream :: Nat -> Type -> Type
1586'FragmentStream = \a b -> _rhs ['Vector a ('Maybe ('SimpleFragment b))] 1591'FragmentStream = \a b -> _rhs ['Fragment a b]
1587 1592
1588'FrameBuffer :: Nat -> [ImageKind] -> Type 1593'FrameBuffer :: Nat -> [ImageKind] -> Type
1589'FrameBuffer = <<type constructor with 0 indices; constructors: >> 1594'FrameBuffer = <<type constructor with 0 indices; constructors: >>
@@ -1746,12 +1751,12 @@ accumulationContext = _lhs accumulationContext \(a :: _) -> _rhs a
1746++ :: forall a . [a] -> [a] -> [a] 1751++ :: forall a . [a] -> [a] -> [a]
1747++ 1752++
1748 = \a -> primFix 1753 = \a -> primFix
1749 ([a] -> [a] -> [a]) 1754 _
1750 \b c d -> case'List (\_ -> [a]) (_rhs d) (\e f -> _rhs (e : b f d)) c 1755 \b c d -> case'List (\_ -> [a]) (_rhs d) (\e f -> _rhs (e : b f d)) c
1751 1756
1752Accumulate 1757Accumulate
1753 :: forall (a :: [ImageKind]) (b :: Nat) (c :: [Type]) 1758 :: forall (a :: [ImageKind]) (b :: Nat) (c :: [Type])
1754 . (a ~ (map Type ImageKind FragmentOperationKind c :: [ImageKind])) 1759 . (a ~ (map FragmentOperationKind c :: [ImageKind]))
1755 => HList c 1760 => HList c
1756 -> FragmentStream b (HList (imageType' a)) -> FrameBuffer b a -> FrameBuffer b a 1761 -> FragmentStream b (HList (imageType' a)) -> FrameBuffer b a -> FrameBuffer b a
1757Accumulate = \a b c d e f g -> <<builtin>> 1762Accumulate = \a b c d e f g -> <<builtin>>
@@ -1851,8 +1856,7 @@ Flat = <<2nd constructor of 'Interpolated>>
1851FrameBuffer 1856FrameBuffer
1852 :: forall (a :: [Type]) 1857 :: forall (a :: [Type])
1853 . sameLayerCounts a 1858 . sameLayerCounts a
1854 => HList a 1859 => HList a -> FrameBuffer (ImageLC (head a)) (map GetImageKind a)
1855 -> FrameBuffer (ImageLC (head Type a)) (map Type ImageKind GetImageKind a)
1856FrameBuffer = \a b c -> <<builtin>> 1860FrameBuffer = \a b c -> <<builtin>>
1857 1861
1858FuncAdd :: BlendEquation 1862FuncAdd :: BlendEquation
@@ -2071,16 +2075,16 @@ PrimAbs :: forall a b (c :: Nat) . (Signed a, b ~ VecScalar c a) => b -> b
2071PrimAbs = \a b c d e f -> <<builtin>> 2075PrimAbs = \a b c d e f -> <<builtin>>
2072 2076
2073PrimAdd :: forall a . Num (MatVecScalarElem a) => a -> a -> a 2077PrimAdd :: forall a . Num (MatVecScalarElem a) => a -> a -> a
2074PrimAdd = \a b c d -> <<builtin>> 2078PrimAdd = \a b c d -> <<delta function with arity 4>>
2075 2079
2076PrimAddS :: forall a b . (a ~ MatVecScalarElem b, Num a) => b -> a -> b 2080PrimAddS :: forall a b . (a ~ MatVecScalarElem b, Num a) => b -> a -> b
2077PrimAddS = \a b c d e f -> <<builtin>> 2081PrimAddS = \a b c d e f -> <<delta function with arity 6>>
2078 2082
2079PrimAll :: forall (a :: Nat) . VecScalar a Bool -> Bool 2083PrimAll :: forall (a :: Nat) . VecScalar a Bool -> Bool
2080PrimAll = \a b -> <<builtin>> 2084PrimAll = \a b -> <<builtin>>
2081 2085
2082PrimAnd :: Bool -> Bool -> Bool 2086PrimAnd :: Bool -> Bool -> Bool
2083PrimAnd = \a b -> <<builtin>> 2087PrimAnd = \a b -> <<delta function with arity 2>>
2084 2088
2085PrimAny :: forall (a :: Nat) . VecScalar a Bool -> Bool 2089PrimAny :: forall (a :: Nat) . VecScalar a Bool -> Bool
2086PrimAny = \a b -> <<builtin>> 2090PrimAny = \a b -> <<builtin>>
@@ -2166,21 +2170,21 @@ PrimDistance :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> a -> Float
2166PrimDistance = \a b c d e -> <<builtin>> 2170PrimDistance = \a b c d e -> <<builtin>>
2167 2171
2168PrimDiv :: forall a b (c :: Nat) . (Num a, b ~ VecScalar c a) => b -> b -> b 2172PrimDiv :: forall a b (c :: Nat) . (Num a, b ~ VecScalar c a) => b -> b -> b
2169PrimDiv = \a b c d e f g -> <<builtin>> 2173PrimDiv = \a b c d e f g -> <<delta function with arity 7>>
2170 2174
2171PrimDivS :: forall a b (c :: Nat) . (Num a, b ~ VecScalar c a) => b -> a -> b 2175PrimDivS :: forall a b (c :: Nat) . (Num a, b ~ VecScalar c a) => b -> a -> b
2172PrimDivS = \a b c d e f g -> <<builtin>> 2176PrimDivS = \a b c d e f g -> <<delta function with arity 7>>
2173 2177
2174PrimDot :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> a -> Float 2178PrimDot :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> a -> Float
2175PrimDot = \a b c d e -> <<builtin>> 2179PrimDot = \a b c d e -> <<builtin>>
2176 2180
2177PrimEqual :: forall a b . (b ~ MatVecScalarElem a) => a -> a -> Bool 2181PrimEqual :: forall a b . (b ~ MatVecScalarElem a) => a -> a -> Bool
2178PrimEqual = \a b c d e -> <<builtin>> 2182PrimEqual = \a b c d e -> <<delta function with arity 5>>
2179 2183
2180PrimEqualV 2184PrimEqualV
2181 :: forall a (b :: Nat) c d 2185 :: forall a (b :: Nat) c d
2182 . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d 2186 . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d
2183PrimEqualV = \a b c d e f g h i -> <<builtin>> 2187PrimEqualV = \a b c d e f g h i -> <<delta function with arity 9>>
2184 2188
2185PrimExp :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> a 2189PrimExp :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> a
2186PrimExp = \a b c d -> <<builtin>> 2190PrimExp = \a b c d -> <<builtin>>
@@ -2210,12 +2214,12 @@ PrimFract = \a b c d -> <<builtin>>
2210PrimGreaterThan 2214PrimGreaterThan
2211 :: forall a (b :: Nat) c d 2215 :: forall a (b :: Nat) c d
2212 . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d 2216 . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d
2213PrimGreaterThan = \a b c d e f g h i -> <<builtin>> 2217PrimGreaterThan = \a b c d e f g h i -> <<delta function with arity 9>>
2214 2218
2215PrimGreaterThanEqual 2219PrimGreaterThanEqual
2216 :: forall a (b :: Nat) c d 2220 :: forall a (b :: Nat) c d
2217 . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d 2221 . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d
2218PrimGreaterThanEqual = \a b c d e f g h i -> <<builtin>> 2222PrimGreaterThanEqual = \a b c d e f g h i -> <<delta function with arity 9>>
2219 2223
2220PrimIntBitsToFloat :: forall (a :: Nat) . VecScalar a Int -> VecScalar a Float 2224PrimIntBitsToFloat :: forall (a :: Nat) . VecScalar a Int -> VecScalar a Float
2221PrimIntBitsToFloat = \a b -> <<builtin>> 2225PrimIntBitsToFloat = \a b -> <<builtin>>
@@ -2242,12 +2246,12 @@ PrimLength = \a b c d -> <<builtin>>
2242PrimLessThan 2246PrimLessThan
2243 :: forall a (b :: Nat) c d 2247 :: forall a (b :: Nat) c d
2244 . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d 2248 . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d
2245PrimLessThan = \a b c d e f g h i -> <<builtin>> 2249PrimLessThan = \a b c d e f g h i -> <<delta function with arity 9>>
2246 2250
2247PrimLessThanEqual 2251PrimLessThanEqual
2248 :: forall a (b :: Nat) c d 2252 :: forall a (b :: Nat) c d
2249 . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d 2253 . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d
2250PrimLessThanEqual = \a b c d e f g h i -> <<builtin>> 2254PrimLessThanEqual = \a b c d e f g h i -> <<delta function with arity 9>>
2251 2255
2252PrimLine :: forall a . a -> a -> Primitive a 'Line 2256PrimLine :: forall a . a -> a -> Primitive a 'Line
2253PrimLine = <<1st constructor of 'Primitive>> 2257PrimLine = <<1st constructor of 'Primitive>>
@@ -2283,16 +2287,16 @@ PrimMixS
2283PrimMixS = \a b c d e f -> <<builtin>> 2287PrimMixS = \a b c d e f -> <<builtin>>
2284 2288
2285PrimMod :: forall a b (c :: Nat) . (Num a, b ~ VecScalar c a) => b -> b -> b 2289PrimMod :: forall a b (c :: Nat) . (Num a, b ~ VecScalar c a) => b -> b -> b
2286PrimMod = \a b c d e f g -> <<builtin>> 2290PrimMod = \a b c d e f g -> <<delta function with arity 7>>
2287 2291
2288PrimModF :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> (a, a) 2292PrimModF :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> (a, a)
2289PrimModF = \a b c d -> <<builtin>> 2293PrimModF = \a b c d -> <<builtin>>
2290 2294
2291PrimModS :: forall a b (c :: Nat) . (Num a, b ~ VecScalar c a) => b -> a -> b 2295PrimModS :: forall a b (c :: Nat) . (Num a, b ~ VecScalar c a) => b -> a -> b
2292PrimModS = \a b c d e f g -> <<builtin>> 2296PrimModS = \a b c d e f g -> <<delta function with arity 7>>
2293 2297
2294PrimMul :: forall a . Num (MatVecScalarElem a) => a -> a -> a 2298PrimMul :: forall a . Num (MatVecScalarElem a) => a -> a -> a
2295PrimMul = \a b c d -> <<builtin>> 2299PrimMul = \a b c d -> <<delta function with arity 4>>
2296 2300
2297PrimMulMatMat 2301PrimMulMatMat
2298 :: forall (a :: Nat) (b :: Nat) c (d :: Nat) 2302 :: forall (a :: Nat) (b :: Nat) c (d :: Nat)
@@ -2304,14 +2308,14 @@ PrimMulMatVec
2304PrimMulMatVec = \a b c d e -> <<builtin>> 2308PrimMulMatVec = \a b c d e -> <<builtin>>
2305 2309
2306PrimMulS :: forall a b . (a ~ MatVecScalarElem b, Num a) => b -> a -> b 2310PrimMulS :: forall a b . (a ~ MatVecScalarElem b, Num a) => b -> a -> b
2307PrimMulS = \a b c d e f -> <<builtin>> 2311PrimMulS = \a b c d e f -> <<delta function with arity 6>>
2308 2312
2309PrimMulVecMat 2313PrimMulVecMat
2310 :: forall (a :: Nat) b (c :: Nat) . Vec a b -> Mat a c b -> Vec c b 2314 :: forall (a :: Nat) b (c :: Nat) . Vec a b -> Mat a c b -> Vec c b
2311PrimMulVecMat = \a b c d e -> <<builtin>> 2315PrimMulVecMat = \a b c d e -> <<builtin>>
2312 2316
2313PrimNeg :: forall a . Signed (MatVecScalarElem a) => a -> a 2317PrimNeg :: forall a . Signed (MatVecScalarElem a) => a -> a
2314PrimNeg = \a b c -> <<builtin>> 2318PrimNeg = \a b c -> <<delta function with arity 3>>
2315 2319
2316PrimNoise1 :: forall (a :: Nat) . VecScalar a Float -> Float 2320PrimNoise1 :: forall (a :: Nat) . VecScalar a Float -> Float
2317PrimNoise1 = \a b -> <<builtin>> 2321PrimNoise1 = \a b -> <<builtin>>
@@ -2329,18 +2333,18 @@ PrimNormalize :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> a
2329PrimNormalize = \a b c d -> <<builtin>> 2333PrimNormalize = \a b c d -> <<builtin>>
2330 2334
2331PrimNot :: forall a (b :: Nat) . (a ~ VecScalar b Bool) => a -> a 2335PrimNot :: forall a (b :: Nat) . (a ~ VecScalar b Bool) => a -> a
2332PrimNot = \a b c d -> <<builtin>> 2336PrimNot = \a b c d -> <<delta function with arity 4>>
2333 2337
2334PrimNotEqual :: forall a b . (b ~ MatVecScalarElem a) => a -> a -> Bool 2338PrimNotEqual :: forall a b . (b ~ MatVecScalarElem a) => a -> a -> Bool
2335PrimNotEqual = \a b c d e -> <<builtin>> 2339PrimNotEqual = \a b c d e -> <<delta function with arity 5>>
2336 2340
2337PrimNotEqualV 2341PrimNotEqualV
2338 :: forall a (b :: Nat) c d 2342 :: forall a (b :: Nat) c d
2339 . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d 2343 . (Num c, a ~ VecScalar b c, d ~ VecScalar b Bool) => a -> a -> d
2340PrimNotEqualV = \a b c d e f g h i -> <<builtin>> 2344PrimNotEqualV = \a b c d e f g h i -> <<delta function with arity 9>>
2341 2345
2342PrimOr :: Bool -> Bool -> Bool 2346PrimOr :: Bool -> Bool -> Bool
2343PrimOr = \a b -> <<builtin>> 2347PrimOr = \a b -> <<delta function with arity 2>>
2344 2348
2345PrimOuterProduct 2349PrimOuterProduct
2346 :: forall (a :: Nat) b (c :: Nat) . Vec a b -> Vec c b -> Mat c a b 2350 :: forall (a :: Nat) b (c :: Nat) . Vec a b -> Vec c b -> Mat c a b
@@ -2393,10 +2397,10 @@ PrimStepS :: forall a (b :: Nat) . (a ~ VecScalar b Float) => Float -> a -> a
2393PrimStepS = \a b c d e -> <<builtin>> 2397PrimStepS = \a b c d e -> <<builtin>>
2394 2398
2395PrimSub :: forall a . Num (MatVecScalarElem a) => a -> a -> a 2399PrimSub :: forall a . Num (MatVecScalarElem a) => a -> a -> a
2396PrimSub = \a b c d -> <<builtin>> 2400PrimSub = \a b c d -> <<delta function with arity 4>>
2397 2401
2398PrimSubS :: forall a b . (a ~ MatVecScalarElem b, Num a) => b -> a -> b 2402PrimSubS :: forall a b . (a ~ MatVecScalarElem b, Num a) => b -> a -> b
2399PrimSubS = \a b c d e f -> <<builtin>> 2403PrimSubS = \a b c d e f -> <<delta function with arity 6>>
2400 2404
2401PrimTan :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> a 2405PrimTan :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> a
2402PrimTan = \a b c d -> <<builtin>> 2406PrimTan = \a b c d -> <<builtin>>
@@ -2417,7 +2421,7 @@ PrimUIntBitsToFloat :: forall (a :: Nat) . VecScalar a Word -> VecScalar a Float
2417PrimUIntBitsToFloat = \a b -> <<builtin>> 2421PrimUIntBitsToFloat = \a b -> <<builtin>>
2418 2422
2419PrimXor :: Bool -> Bool -> Bool 2423PrimXor :: Bool -> Bool -> Bool
2420PrimXor = \a b -> <<builtin>> 2424PrimXor = \a b -> <<delta function with arity 2>>
2421 2425
2422PrjImage :: forall (a :: ImageKind) . FrameBuffer 1 ' [a] -> Image 1 a 2426PrjImage :: forall (a :: ImageKind) . FrameBuffer 1 ' [a] -> Image 1 a
2423PrjImage = \a b -> <<builtin>> 2427PrjImage = \a b -> <<builtin>>
@@ -2522,31 +2526,20 @@ ZeroBF = <<0th constructor of 'BlendingFactor>>
2522accumulate 2526accumulate
2523 :: forall (a :: Nat) (b :: [Type]) c 2527 :: forall (a :: Nat) (b :: [Type]) c
2524 . HList b 2528 . HList b
2525 -> (c -> HList (imageType' (map Type ImageKind FragmentOperationKind b))) 2529 -> (c -> HList (imageType' (map FragmentOperationKind b)))
2526 -> [Vector a (Maybe (SimpleFragment c))] 2530 -> [Vector a (Maybe (SimpleFragment c))]
2527 -> FrameBuffer a (map Type ImageKind FragmentOperationKind b) 2531 -> FrameBuffer a (map FragmentOperationKind b)
2528 -> FrameBuffer a (map Type ImageKind FragmentOperationKind b) 2532 -> FrameBuffer a (map FragmentOperationKind b)
2529accumulate 2533accumulate
2530 = \a b c d e f g -> _rhs 2534 = \a b c d e f g -> _rhs
2531 (Accumulate 2535 (Accumulate
2532 (map Type 'ImageKind 'FragmentOperationKind b) 2536 (map 'FragmentOperationKind b)
2533 a 2537 a
2534 b 2538 b
2535 TT 2539 TT
2536 d 2540 d
2537 (map 2541 (map
2538 ('Vector a ('Maybe ('SimpleFragment c))) 2542 (\h -> mapFragment c ('HList (imageType' (map 'FragmentOperationKind b))) a e h)
2539 ('Vector
2540 a
2541 ('Maybe
2542 ('SimpleFragment
2543 ('HList (imageType' (map Type 'ImageKind 'FragmentOperationKind b))))))
2544 (\h -> mapFragment
2545 c
2546 ('HList (imageType' (map Type 'ImageKind 'FragmentOperationKind b)))
2547 a
2548 e
2549 h)
2550 f) 2543 f)
2551 g) 2544 g)
2552 2545
@@ -2554,21 +2547,21 @@ accumulateWith :: forall a b . a -> b -> (a, b)
2554accumulateWith = \a b c d -> _rhs (c, d) 2547accumulateWith = \a b c d -> _rhs (c, d)
2555 2548
2556accumulationContext :: forall a . a -> a 2549accumulationContext :: forall a . a -> a
2557accumulationContext = \_ a -> _rhs a 2550accumulationContext = \a b -> _rhs b
2558 2551
2559allSame :: forall a . [a] -> Constraint 2552allSame :: forall a . [a] -> Constraint
2560allSame 2553allSame
2561 = primFix 2554 = primFix
2562 (forall a . [a] -> 'Constraint) 2555 _
2563 \b c d -> case'List 2556 \a b c -> case'List
2564 (\_ -> 'Constraint) 2557 (\_ -> 'Constraint)
2565 (_rhs CUnit) 2558 (_rhs CUnit)
2566 (\e f -> case'List 2559 (\d e -> case'List
2567 (\_ -> 'Constraint) 2560 (\_ -> 'Constraint)
2568 (_rhs CUnit) 2561 (_rhs CUnit)
2569 (\g h -> _rhs ('T2 (e ~ (g :: c)) (b c (g : h)))) 2562 (\f g -> _rhs ('T2 (d ~ (f :: b)) (a b (f : g))))
2570 f) 2563 e)
2571 d 2564 c
2572 2565
2573case'BlendEquation 2566case'BlendEquation
2574 :: forall (a :: BlendEquation -> Type) 2567 :: forall (a :: BlendEquation -> Type)
@@ -2863,10 +2856,10 @@ case'Vector
2863case'Vector = \_ _ a b -> <<case function of a type with 2 parameters>> 2856case'Vector = \_ _ a b -> <<case function of a type with 2 parameters>>
2864 2857
2865concat :: forall a . [[a]] -> [a] 2858concat :: forall a . [[a]] -> [a]
2866concat = \a -> _rhs (foldr [a] [a] ((++) a) []) 2859concat = \a -> _rhs (foldr (++) [])
2867 2860
2868concatMap :: forall a b . (a -> [b]) -> [a] -> [b] 2861concatMap :: forall a b . (a -> [b]) -> [a] -> [b]
2869concatMap = \a b c d -> _rhs (foldr [b] [b] ((++) b) [] (map a [b] c d)) 2862concatMap = \a b c d -> _rhs (foldr (++) [] (map c d))
2870 2863
2871customizeDepth 2864customizeDepth
2872 :: forall a (b :: Nat) . (a -> Float) -> Fragment b a -> Fragment b a 2865 :: forall a (b :: Nat) . (a -> Float) -> Fragment b a -> Fragment b a
@@ -2877,12 +2870,7 @@ customizeDepths
2877 . (a -> Float) 2870 . (a -> Float)
2878 -> [Vector b (Maybe (SimpleFragment a))] 2871 -> [Vector b (Maybe (SimpleFragment a))]
2879 -> [Vector b (Maybe (SimpleFragment a))] 2872 -> [Vector b (Maybe (SimpleFragment a))]
2880customizeDepths 2873customizeDepths = \a b c -> _rhs (map \d -> customizeDepth a b c d)
2881 = \a b c -> _rhs
2882 (map
2883 ('Vector b ('Maybe ('SimpleFragment a)))
2884 ('Vector b ('Maybe ('SimpleFragment a)))
2885 \d -> customizeDepth a b c d)
2886 2874
2887definedVec :: forall a (b :: Nat) . Vec b a -> Bool 2875definedVec :: forall a (b :: Nat) . Vec b a -> Bool
2888definedVec 2876definedVec
@@ -2908,15 +2896,14 @@ fetch = \a b c d -> <<builtin>>
2908 2896
2909fetchArrays 2897fetchArrays
2910 :: forall (a :: PrimitiveType) (b :: [Type]) (c :: [Type]) 2898 :: forall (a :: PrimitiveType) (b :: [Type]) (c :: [Type])
2911 . (b ~ (map Type Type ListElem c :: [Type])) 2899 . (b ~ (map ListElem c :: [Type])) => HList c -> PrimitiveStream a (HList b)
2912 => HList c -> PrimitiveStream a (HList b)
2913fetchArrays = \a b c d e -> <<builtin>> 2900fetchArrays = \a b c d e -> <<builtin>>
2914 2901
2915fetchStream 2902fetchStream
2916 :: forall (a :: PrimitiveType) (b :: [Type]) 2903 :: forall (a :: PrimitiveType) (b :: [Type])
2917 . String 2904 . String
2918 -> forall (c :: [String]) 2905 -> forall (c :: [String])
2919 -> (len String c ~ (len Type b :: Int)) => PrimitiveStream a (HList b) 2906 -> (len c ~ (len b :: Int)) => PrimitiveStream a (HList b)
2920fetchStream = \a b c d e -> <<builtin>> 2907fetchStream = \a b c d e -> <<builtin>>
2921 2908
2922filterFragment 2909filterFragment
@@ -2928,30 +2915,24 @@ filterFragments
2928 . (a -> Bool) 2915 . (a -> Bool)
2929 -> [Vector b (Maybe (SimpleFragment a))] 2916 -> [Vector b (Maybe (SimpleFragment a))]
2930 -> [Vector b (Maybe (SimpleFragment a))] 2917 -> [Vector b (Maybe (SimpleFragment a))]
2931filterFragments 2918filterFragments = \a b c -> _rhs (map \d -> filterFragment a b c d)
2932 = \a b c -> _rhs
2933 (map
2934 ('Vector b ('Maybe ('SimpleFragment a)))
2935 ('Vector b ('Maybe ('SimpleFragment a)))
2936 \d -> filterFragment a b c d)
2937 2919
2938foldr :: forall a b . (b -> a -> a) -> a -> [b] -> a 2920foldr :: forall a b . (b -> a -> a) -> a -> [b] -> a
2939foldr 2921foldr
2940 = \a b -> primFix 2922 = \a b -> primFix
2941 ((b -> a -> a) -> a -> [b] -> a) 2923 _
2942 \c d e f -> case'List (\_ -> a) (_rhs e) (\g h -> _rhs (d g (c d e h))) f 2924 \c d e f -> case'List (\_ -> a) (_rhs e) (\g h -> _rhs (d g (c d e h))) f
2943 2925
2944head :: forall a . [a] -> a 2926head :: forall a . [a] -> a
2945head = \a b -> case'List (\_ -> a) (_rhs (undefined a)) (\c _ -> _rhs c) b 2927head = \a b -> case'List (\_ -> a) (_rhs (undefined a)) (\c _ -> _rhs c) b
2946 2928
2947id :: forall a . a -> a 2929id :: forall a . a -> a
2948id = \_ a -> _rhs a 2930id = \a b -> _rhs b
2949 2931
2950imageFrame 2932imageFrame
2951 :: forall (a :: [Type]) 2933 :: forall (a :: [Type])
2952 . sameLayerCounts a 2934 . sameLayerCounts a
2953 => HList a 2935 => HList a -> FrameBuffer (ImageLC (head a)) (map GetImageKind a)
2954 -> FrameBuffer (ImageLC (head Type a)) (map Type ImageKind GetImageKind a)
2955imageFrame = _rhs \a b c -> FrameBuffer a b c 2936imageFrame = _rhs \a b c -> FrameBuffer a b c
2956 2937
2957imageType :: ImageKind -> Type 2938imageType :: ImageKind -> Type
@@ -2962,25 +2943,25 @@ imageType' :: [ImageKind] -> [Type]
2962imageType' 2943imageType'
2963 = \a -> case'List 2944 = \a -> case'List
2964 (\_ -> [Type]) 2945 (\_ -> [Type])
2965 (_rhs (map 'ImageKind Type imageType a)) 2946 (_rhs (map imageType a))
2966 (\b c -> case'ImageKind 2947 (\b c -> case'ImageKind
2967 (\_ -> [Type]) 2948 (\_ -> [Type])
2968 (\_ -> _rhs (map 'ImageKind Type imageType a)) 2949 (\_ -> _rhs (map imageType a))
2969 (_rhs (map 'ImageKind Type imageType c)) 2950 (_rhs (map imageType c))
2970 (_rhs (map 'ImageKind Type imageType a)) 2951 (_rhs (map imageType a))
2971 b) 2952 b)
2972 a 2953 a
2973 2954
2974len :: forall a . [a] -> Int 2955len :: forall a . [a] -> Int
2975len 2956len
2976 = \a -> primFix 2957 = \a -> primFix
2977 ([a] -> 'Int) 2958 _
2978 \b c -> case'List (\_ -> 'Int) (_rhs 0) (\_ d -> _rhs (primAddInt 1 (b d))) c 2959 \b c -> case'List (\_ -> 'Int) (_rhs 0) (\_ d -> _rhs (primAddInt 1 (b d))) c
2979 2960
2980map :: forall a b . (a -> b) -> [a] -> [b] 2961map :: forall a b . (a -> b) -> [a] -> [b]
2981map 2962map
2982 = \a b -> primFix 2963 = \a b -> primFix
2983 ((a -> b) -> [a] -> [b]) 2964 _
2984 \c d e -> case'List (\_ -> [b]) (_rhs []) (\f g -> _rhs (d f : c d g)) e 2965 \c d e -> case'List (\_ -> [b]) (_rhs []) (\f g -> _rhs (d f : c d g)) e
2985 2966
2986mapFragment :: forall a b (c :: Nat) . (a -> b) -> Fragment c a -> Fragment c b 2967mapFragment :: forall a b (c :: Nat) . (a -> b) -> Fragment c a -> Fragment c b
@@ -2991,12 +2972,7 @@ mapFragments
2991 . (a -> b) 2972 . (a -> b)
2992 -> [Vector c (Maybe (SimpleFragment a))] 2973 -> [Vector c (Maybe (SimpleFragment a))]
2993 -> [Vector c (Maybe (SimpleFragment b))] 2974 -> [Vector c (Maybe (SimpleFragment b))]
2994mapFragments 2975mapFragments = \a b c d -> _rhs (map \e -> mapFragment a b c d e)
2995 = \a b c d -> _rhs
2996 (map
2997 ('Vector c ('Maybe ('SimpleFragment a)))
2998 ('Vector c ('Maybe ('SimpleFragment b)))
2999 \e -> mapFragment a b c d e)
3000 2976
3001mapPrimitive 2977mapPrimitive
3002 :: forall a b (c :: PrimitiveType) . (a -> b) -> Primitive a c -> Primitive b c 2978 :: forall a b (c :: PrimitiveType) . (a -> b) -> Primitive a c -> Primitive b c
@@ -3005,9 +2981,7 @@ mapPrimitive = \a b c d e -> <<builtin>>
3005mapPrimitives 2981mapPrimitives
3006 :: forall a b (c :: PrimitiveType) 2982 :: forall a b (c :: PrimitiveType)
3007 . (a -> b) -> [Primitive a c] -> [Primitive b c] 2983 . (a -> b) -> [Primitive a c] -> [Primitive b c]
3008mapPrimitives 2984mapPrimitives = \a b c d -> _rhs (map \e -> mapPrimitive a b c d e)
3009 = \a b c d -> _rhs
3010 (map ('Primitive a c) ('Primitive b c) \e -> mapPrimitive a b c d e)
3011 2985
3012mapVec :: forall a b (c :: Nat) . (a -> b) -> VecS a c -> VecS b c 2986mapVec :: forall a b (c :: Nat) . (a -> b) -> VecS a c -> VecS b c
3013mapVec 2987mapVec
@@ -3238,32 +3212,21 @@ one
3238 3212
3239overlay 3213overlay
3240 :: forall (a :: Nat) (b :: [Type]) 3214 :: forall (a :: Nat) (b :: [Type])
3241 . FrameBuffer a (map Type ImageKind FragmentOperationKind b) 3215 . FrameBuffer a (map FragmentOperationKind b)
3242 -> (HList b 3216 -> (HList b, [Fragment a (HList (imageType' (map FragmentOperationKind b)))])
3243 , [Fragment 3217 -> FrameBuffer a (map FragmentOperationKind b)
3244 a
3245 (HList (imageType' (map Type ImageKind FragmentOperationKind b)))])
3246 -> FrameBuffer a (map Type ImageKind FragmentOperationKind b)
3247overlay 3218overlay
3248 = \a b c d -> hlistConsCase 3219 = \a b c d -> hlistConsCase
3249 ('HList b) 3220 ('HList b)
3250 [['Vector 3221 [['Fragment a ('HList (imageType' (map 'FragmentOperationKind b)))]]
3251 a 3222 ('FrameBuffer a (map 'FragmentOperationKind b))
3252 ('Maybe
3253 ('SimpleFragment
3254 ('HList (imageType' (map Type 'ImageKind 'FragmentOperationKind b)))))]]
3255 ('FrameBuffer a (map Type 'ImageKind 'FragmentOperationKind b))
3256 (\e f -> hlistConsCase 3223 (\e f -> hlistConsCase
3257 ['Vector 3224 ['Fragment a ('HList (imageType' (map 'FragmentOperationKind b)))]
3258 a
3259 ('Maybe
3260 ('SimpleFragment
3261 ('HList (imageType' (map Type 'ImageKind 'FragmentOperationKind b)))))]
3262 [] 3225 []
3263 ('FrameBuffer a (map Type 'ImageKind 'FragmentOperationKind b)) 3226 ('FrameBuffer a (map 'FragmentOperationKind b))
3264 (\g h -> hlistNilCase 3227 (\g h -> hlistNilCase
3265 ('FrameBuffer a (map Type 'ImageKind 'FragmentOperationKind b)) 3228 ('FrameBuffer a (map 'FragmentOperationKind b))
3266 (_rhs (Accumulate (map Type 'ImageKind 'FragmentOperationKind b) a b TT e g c)) 3229 (_rhs (Accumulate (map 'FragmentOperationKind b) a b TT e g c))
3267 h) 3230 h)
3268 f) 3231 f)
3269 d 3232 d
@@ -3273,8 +3236,7 @@ primTexture = \a b -> <<builtin>>
3273 3236
3274rasterizePrimitive 3237rasterizePrimitive
3275 :: forall (a :: [Type]) (b :: [Type]) (c :: [Type]) (d :: PrimitiveType) 3238 :: forall (a :: [Type]) (b :: [Type]) (c :: [Type]) (d :: PrimitiveType)
3276 . (map Type Type Interpolated a ~ (b :: [Type]) 3239 . (map Interpolated a ~ (b :: [Type]), c ~ (Vec 4 Float : a :: [Type]))
3277 , c ~ (Vec 4 Float : a :: [Type]))
3278 => HList b 3240 => HList b
3279 -> RasterContext (HList c) d 3241 -> RasterContext (HList c) d
3280 -> Primitive (HList c) d -> FragmentStream 1 (HList a) 3242 -> Primitive (HList c) d -> FragmentStream 1 (HList a)
@@ -3283,23 +3245,19 @@ rasterizePrimitive = \a b c d e f g h i -> <<builtin>>
3283rasterizePrimitives 3245rasterizePrimitives
3284 :: forall (a :: [Type]) (b :: PrimitiveType) 3246 :: forall (a :: [Type]) (b :: PrimitiveType)
3285 . RasterContext (HList (Vec 4 Float : a)) b 3247 . RasterContext (HList (Vec 4 Float : a)) b
3286 -> HList (map Type Type Interpolated a) 3248 -> HList (map Interpolated a)
3287 -> [Primitive (HList (Vec 4 Float : a)) b] 3249 -> [Primitive (HList (Vec 4 Float : a)) b]
3288 -> [Vector 1 (Maybe (SimpleFragment (HList a)))] 3250 -> [Vector 1 (Maybe (SimpleFragment (HList a)))]
3289rasterizePrimitives 3251rasterizePrimitives
3290 = \a b c d e -> _rhs 3252 = \a b c d e -> _rhs
3291 (foldr 3253 (foldr
3292 ['Vector 1 ('Maybe ('SimpleFragment ('HList a)))] 3254 (++)
3293 ['Vector 1 ('Maybe ('SimpleFragment ('HList a)))]
3294 ((++) ('Vector 1 ('Maybe ('SimpleFragment ('HList a)))))
3295 [] 3255 []
3296 (map 3256 (map
3297 ('Primitive ('HList ('VecS 'Float 4 : a)) b)
3298 ['Vector 1 ('Maybe ('SimpleFragment ('HList a)))]
3299 (\f -> rasterizePrimitive 3257 (\f -> rasterizePrimitive
3300 a 3258 a
3301 (map Type Type 'Interpolated a) 3259 (map 'Interpolated a)
3302 ('VecS 'Float 4 : a) 3260 ('Vec 4 'Float : a)
3303 b 3261 b
3304 TT 3262 TT
3305 TT 3263 TT
@@ -3313,13 +3271,13 @@ renderFrame = _rhs ScreenOut
3313 3271
3314sFragmentCoords :: forall a . SimpleFragment a -> VecS Float 3 3272sFragmentCoords :: forall a . SimpleFragment a -> VecS Float 3
3315sFragmentCoords 3273sFragmentCoords
3316 = \_ a -> case'SimpleFragment (\_ -> 'VecS 'Float 3) (\b _ -> _rhs b) a 3274 = \a b -> case'SimpleFragment (\_ -> 'VecS 'Float 3) (\c _ -> _rhs c) b
3317 3275
3318sFragmentValue :: forall a . SimpleFragment a -> a 3276sFragmentValue :: forall a . SimpleFragment a -> a
3319sFragmentValue = \a b -> case'SimpleFragment (\_ -> a) (\_ c -> _rhs c) b 3277sFragmentValue = \a b -> case'SimpleFragment (\_ -> a) (\_ c -> _rhs c) b
3320 3278
3321sameLayerCounts :: [Type] -> Constraint 3279sameLayerCounts :: [Type] -> Constraint
3322sameLayerCounts = \a -> _rhs (allSame 'Nat (map Type 'Nat 'ImageLC a)) 3280sameLayerCounts = \a -> _rhs (allSame 'Nat (map 'ImageLC a))
3323 3281
3324swizzscalar :: forall a (b :: Nat) . Vec b a -> Swizz -> a 3282swizzscalar :: forall a (b :: Nat) . Vec b a -> Swizz -> a
3325swizzscalar 3283swizzscalar
@@ -6764,8 +6722,7 @@ testdata/Builtins.lc 255:45-255:46
6764 Type 6722 Type
6765testdata/Builtins.lc 260:1-260:12 6723testdata/Builtins.lc 260:1-260:12
6766 forall (a :: PrimitiveType) (b :: [Type]) (c :: [Type]) 6724 forall (a :: PrimitiveType) (b :: [Type]) (c :: [Type])
6767 . (b ~ (map Type Type ListElem c :: [Type])) 6725 . (b ~ (map ListElem c :: [Type])) => HList c -> PrimitiveStream a (HList b)
6768 => HList c -> PrimitiveStream a (HList b)
6769testdata/Builtins.lc 260:32-260:119 6726testdata/Builtins.lc 260:32-260:119
6770 Type | Type | Type 6727 Type | Type | Type
6771testdata/Builtins.lc 260:56-260:57 6728testdata/Builtins.lc 260:56-260:57
@@ -6849,7 +6806,7 @@ testdata/Builtins.lc 266:1-266:12
6849 forall (a :: PrimitiveType) (b :: [Type]) 6806 forall (a :: PrimitiveType) (b :: [Type])
6850 . String 6807 . String
6851 -> forall (c :: [String]) 6808 -> forall (c :: [String])
6852 -> (len String c ~ (len Type b :: Int)) => PrimitiveStream a (HList b) 6809 -> (len c ~ (len b :: Int)) => PrimitiveStream a (HList b)
6853testdata/Builtins.lc 266:31-266:37 6810testdata/Builtins.lc 266:31-266:37
6854 Type 6811 Type
6855testdata/Builtins.lc 266:31-266:123 6812testdata/Builtins.lc 266:31-266:123
@@ -8065,8 +8022,7 @@ testdata/Builtins.lc 478:55-478:56
8065 Type 8022 Type
8066testdata/Builtins.lc 480:1-480:19 8023testdata/Builtins.lc 480:1-480:19
8067 forall (a :: [Type]) (b :: [Type]) (c :: [Type]) (d :: PrimitiveType) 8024 forall (a :: [Type]) (b :: [Type]) (c :: [Type]) (d :: PrimitiveType)
8068 . (map Type Type Interpolated a ~ (b :: [Type]) 8025 . (map Interpolated a ~ (b :: [Type]), c ~ (Vec 4 Float : a :: [Type]))
8069 , c ~ (Vec 4 Float : a :: [Type]))
8070 => HList b 8026 => HList b
8071 -> RasterContext (HList c) d 8027 -> RasterContext (HList c) d
8072 -> Primitive (HList c) d -> FragmentStream 1 (HList a) 8028 -> Primitive (HList c) d -> FragmentStream 1 (HList a)
@@ -8175,7 +8131,7 @@ testdata/Builtins.lc 486:32-486:33
8175testdata/Builtins.lc 488:1-488:20 8131testdata/Builtins.lc 488:1-488:20
8176 forall (a :: [Type]) (b :: PrimitiveType) 8132 forall (a :: [Type]) (b :: PrimitiveType)
8177 . RasterContext (HList (Vec 4 Float : a)) b 8133 . RasterContext (HList (Vec 4 Float : a)) b
8178 -> HList (map Type Type Interpolated a) 8134 -> HList (map Interpolated a)
8179 -> [Primitive (HList (Vec 4 Float : a)) b] 8135 -> [Primitive (HList (Vec 4 Float : a)) b]
8180 -> [Vector 1 (Maybe (SimpleFragment (HList a)))] 8136 -> [Vector 1 (Maybe (SimpleFragment (HList a)))]
8181testdata/Builtins.lc 488:32-488:38 8137testdata/Builtins.lc 488:32-488:38
@@ -8190,8 +8146,7 @@ testdata/Builtins.lc 488:40-488:73
8190 [[Fragment 1 (HList _b)]] 8146 [[Fragment 1 (HList _b)]]
8191testdata/Builtins.lc 488:45-488:63 8147testdata/Builtins.lc 488:45-488:63
8192 forall (a :: [Type]) (b :: [Type]) (c :: [Type]) (d :: PrimitiveType) 8148 forall (a :: [Type]) (b :: [Type]) (c :: [Type]) (d :: PrimitiveType)
8193 . (map Type Type Interpolated a ~ (b :: [Type]) 8149 . (map Interpolated a ~ (b :: [Type]), c ~ (Vec 4 Float : a :: [Type]))
8194 , c ~ (Vec 4 Float : a :: [Type]))
8195 => HList b 8150 => HList b
8196 -> RasterContext (HList c) d 8151 -> RasterContext (HList c) d
8197 -> Primitive (HList c) d -> FragmentStream 1 (HList a) 8152 -> Primitive (HList c) d -> FragmentStream 1 (HList a)
@@ -8216,8 +8171,6 @@ testdata/Builtins.lc 492:12-492:15
8216 Type 8171 Type
8217testdata/Builtins.lc 492:12-492:29 8172testdata/Builtins.lc 492:12-492:29
8218 Type 8173 Type
8219testdata/Builtins.lc 492:12-495:50
8220 forall a . [a] -> Constraint
8221testdata/Builtins.lc 492:13-492:14 8174testdata/Builtins.lc 492:13-492:14
8222 _b 8175 _b
8223testdata/Builtins.lc 492:19-492:29 8176testdata/Builtins.lc 492:19-492:29
@@ -8330,7 +8283,7 @@ testdata/Builtins.lc 515:102-515:103
8330 ImageKind 8283 ImageKind
8331testdata/Builtins.lc 517:1-517:11 8284testdata/Builtins.lc 517:1-517:11
8332 forall (a :: [ImageKind]) (b :: Nat) (c :: [Type]) 8285 forall (a :: [ImageKind]) (b :: Nat) (c :: [Type])
8333 . (a ~ (map Type ImageKind FragmentOperationKind c :: [ImageKind])) 8286 . (a ~ (map FragmentOperationKind c :: [ImageKind]))
8334 => HList c 8287 => HList c
8335 -> FragmentStream b (HList (imageType' a)) -> FrameBuffer b a -> FrameBuffer b a 8288 -> FragmentStream b (HList (imageType' a)) -> FrameBuffer b a -> FrameBuffer b a
8336testdata/Builtins.lc 517:15-517:174 8289testdata/Builtins.lc 517:15-517:174
@@ -8423,32 +8376,25 @@ testdata/Builtins.lc 519:30-519:31
8423 _e | ((_b)) 8376 _e | ((_b))
8424testdata/Builtins.lc 520:1-520:8 8377testdata/Builtins.lc 520:1-520:8
8425 forall (a :: Nat) (b :: [Type]) 8378 forall (a :: Nat) (b :: [Type])
8426 . FrameBuffer a (map Type ImageKind FragmentOperationKind b) 8379 . FrameBuffer a (map FragmentOperationKind b)
8427 -> (HList b 8380 -> (HList b, [Fragment a (HList (imageType' (map FragmentOperationKind b)))])
8428 , [Fragment 8381 -> FrameBuffer a (map FragmentOperationKind b)
8429 a
8430 (HList (imageType' (map Type ImageKind FragmentOperationKind b)))])
8431 -> FrameBuffer a (map Type ImageKind FragmentOperationKind b)
8432testdata/Builtins.lc 520:25-520:35 8382testdata/Builtins.lc 520:25-520:35
8433 forall (a :: [ImageKind]) (b :: Nat) (c :: [Type]) 8383 forall (a :: [ImageKind]) (b :: Nat) (c :: [Type])
8434 . (a ~ (map Type ImageKind FragmentOperationKind c :: [ImageKind])) 8384 . (a ~ (map FragmentOperationKind c :: [ImageKind]))
8435 => HList c 8385 => HList c
8436 -> FragmentStream b (HList (imageType' a)) -> FrameBuffer b a -> FrameBuffer b a 8386 -> FragmentStream b (HList (imageType' a)) -> FrameBuffer b a -> FrameBuffer b a
8437testdata/Builtins.lc 520:25-520:39 8387testdata/Builtins.lc 520:25-520:39
8438 FragmentStream 8388 FragmentStream _b (HList (imageType' (map FragmentOperationKind _a)))
8439 _b 8389 -> FrameBuffer _b (map FragmentOperationKind _a)
8440 (HList (imageType' (map Type ImageKind FragmentOperationKind _a))) 8390 -> FrameBuffer _b (map FragmentOperationKind _a)
8441 -> FrameBuffer _b (map Type ImageKind FragmentOperationKind _a)
8442 -> FrameBuffer _b (map Type ImageKind FragmentOperationKind _a)
8443testdata/Builtins.lc 520:25-520:43 8391testdata/Builtins.lc 520:25-520:43
8444 FrameBuffer _b (map Type ImageKind FragmentOperationKind _a) 8392 FrameBuffer _b (map FragmentOperationKind _a)
8445 -> FrameBuffer _b (map Type ImageKind FragmentOperationKind _a) 8393 -> FrameBuffer _b (map FragmentOperationKind _a)
8446testdata/Builtins.lc 520:25-520:46 8394testdata/Builtins.lc 520:25-520:46
8447 FrameBuffer _b (map Type ImageKind FragmentOperationKind _a) | FrameBuffer 8395 FrameBuffer _b (map FragmentOperationKind _a) | FrameBuffer
8448 _b
8449 (map Type ImageKind FragmentOperationKind _a) | FrameBuffer
8450 _b 8396 _b
8451 (map Type ImageKind FragmentOperationKind _a) 8397 (map FragmentOperationKind _a) | FrameBuffer _b (map FragmentOperationKind _a)
8452testdata/Builtins.lc 520:36-520:39 8398testdata/Builtins.lc 520:36-520:39
8453 _m 8399 _m
8454testdata/Builtins.lc 520:40-520:43 8400testdata/Builtins.lc 520:40-520:43
@@ -8464,8 +8410,7 @@ testdata/Builtins.lc 524:74-524:75
8464testdata/Builtins.lc 530:1-530:12 8410testdata/Builtins.lc 530:1-530:12
8465 forall (a :: [Type]) 8411 forall (a :: [Type])
8466 . sameLayerCounts a 8412 . sameLayerCounts a
8467 => HList a 8413 => HList a -> FrameBuffer (ImageLC (head a)) (map GetImageKind a)
8468 -> FrameBuffer (ImageLC (head Type a)) (map Type ImageKind GetImageKind a)
8469testdata/Builtins.lc 530:30-530:36 8414testdata/Builtins.lc 530:30-530:36
8470 Type 8415 Type
8471testdata/Builtins.lc 530:31-530:35 8416testdata/Builtins.lc 530:31-530:35
@@ -8515,36 +8460,32 @@ testdata/Builtins.lc 530:123-530:124
8515testdata/Builtins.lc 532:1-532:11 8460testdata/Builtins.lc 532:1-532:11
8516 forall (a :: [Type]) 8461 forall (a :: [Type])
8517 . sameLayerCounts a 8462 . sameLayerCounts a
8518 => HList a 8463 => HList a -> FrameBuffer (ImageLC (head a)) (map GetImageKind a)
8519 -> FrameBuffer (ImageLC (head Type a)) (map Type ImageKind GetImageKind a)
8520testdata/Builtins.lc 532:14-532:25 8464testdata/Builtins.lc 532:14-532:25
8521 forall (a :: [Type]) 8465 forall (a :: [Type])
8522 . sameLayerCounts a 8466 . sameLayerCounts a
8523 => HList a 8467 => HList a -> FrameBuffer (ImageLC (head a)) (map GetImageKind a)
8524 -> FrameBuffer (ImageLC (head Type a)) (map Type ImageKind GetImageKind a)
8525testdata/Builtins.lc 534:1-534:11 8468testdata/Builtins.lc 534:1-534:11
8526 forall (a :: Nat) (b :: [Type]) c 8469 forall (a :: Nat) (b :: [Type]) c
8527 . HList b 8470 . HList b
8528 -> (c -> HList (imageType' (map Type ImageKind FragmentOperationKind b))) 8471 -> (c -> HList (imageType' (map FragmentOperationKind b)))
8529 -> [Vector a (Maybe (SimpleFragment c))] 8472 -> [Vector a (Maybe (SimpleFragment c))]
8530 -> FrameBuffer a (map Type ImageKind FragmentOperationKind b) 8473 -> FrameBuffer a (map FragmentOperationKind b)
8531 -> FrameBuffer a (map Type ImageKind FragmentOperationKind b) 8474 -> FrameBuffer a (map FragmentOperationKind b)
8532testdata/Builtins.lc 534:34-534:44 8475testdata/Builtins.lc 534:34-534:44
8533 forall (a :: [ImageKind]) (b :: Nat) (c :: [Type]) 8476 forall (a :: [ImageKind]) (b :: Nat) (c :: [Type])
8534 . (a ~ (map Type ImageKind FragmentOperationKind c :: [ImageKind])) 8477 . (a ~ (map FragmentOperationKind c :: [ImageKind]))
8535 => HList c 8478 => HList c
8536 -> FragmentStream b (HList (imageType' a)) -> FrameBuffer b a -> FrameBuffer b a 8479 -> FragmentStream b (HList (imageType' a)) -> FrameBuffer b a -> FrameBuffer b a
8537testdata/Builtins.lc 534:34-534:48 8480testdata/Builtins.lc 534:34-534:48
8538 FragmentStream 8481 FragmentStream _b (HList (imageType' (map FragmentOperationKind _a)))
8539 _b 8482 -> FrameBuffer _b (map FragmentOperationKind _a)
8540 (HList (imageType' (map Type ImageKind FragmentOperationKind _a))) 8483 -> FrameBuffer _b (map FragmentOperationKind _a)
8541 -> FrameBuffer _b (map Type ImageKind FragmentOperationKind _a)
8542 -> FrameBuffer _b (map Type ImageKind FragmentOperationKind _a)
8543testdata/Builtins.lc 534:34-534:76 8484testdata/Builtins.lc 534:34-534:76
8544 FrameBuffer _c (map Type ImageKind FragmentOperationKind _b) 8485 FrameBuffer _c (map FragmentOperationKind _b)
8545 -> FrameBuffer _c (map Type ImageKind FragmentOperationKind _b) 8486 -> FrameBuffer _c (map FragmentOperationKind _b)
8546testdata/Builtins.lc 534:34-534:79 8487testdata/Builtins.lc 534:34-534:79
8547 FrameBuffer _c (map Type ImageKind FragmentOperationKind _b) 8488 FrameBuffer _c (map FragmentOperationKind _b)
8548testdata/Builtins.lc 534:45-534:48 8489testdata/Builtins.lc 534:45-534:48
8549 _j 8490 _j
8550testdata/Builtins.lc 534:50-534:62 8491testdata/Builtins.lc 534:50-534:62
@@ -8558,9 +8499,7 @@ testdata/Builtins.lc 534:50-534:70
8558testdata/Builtins.lc 534:50-534:75 8499testdata/Builtins.lc 534:50-534:75
8559 [Vector 8500 [Vector
8560 _c 8501 _c
8561 (Maybe 8502 (Maybe (SimpleFragment (HList (imageType' (map FragmentOperationKind _b)))))]
8562 (SimpleFragment
8563 (HList (imageType' (map Type ImageKind FragmentOperationKind _b)))))]
8564testdata/Builtins.lc 534:63-534:70 8503testdata/Builtins.lc 534:63-534:70
8565 _k 8504 _k
8566testdata/Builtins.lc 534:71-534:75 8505testdata/Builtins.lc 534:71-534:75
diff --git a/testdata/HyperbolicParaboloic.out b/testdata/HyperbolicParaboloic.out
index 08a0239b..e8d52faf 100644
--- a/testdata/HyperbolicParaboloic.out
+++ b/testdata/HyperbolicParaboloic.out
@@ -35,15 +35,16 @@ Pipeline
35 vec4 scale(float z0,vec4 z1) { 35 vec4 scale(float z0,vec4 z1) {
36 return (z1) * (vec4 (z0,z0,z0,1.0)); 36 return (z1) * (vec4 (z0,z0,z0,1.0));
37 } 37 }
38 float t; 38 vec4 v3FToV4F(vec3 z0) {
39 return vec4 ((z0).x,(z0).y,(z0).z,1.0);
40 }
39 void main() { 41 void main() {
40 t = (Mouse).y;
41 gl_Position = scale (0.1 42 gl_Position = scale (0.1
42 ,(MVP) * (vec4 ((t) * ((vi1).x) 43 ,(MVP) * (vec4 (((Mouse).y) * ((vi1).x)
43 ,(((0.5) * ((Mouse).x)) * ((vi1).x)) * ((vi1).y) 44 ,(((0.5) * ((Mouse).x)) * ((vi1).x)) * ((vi1).y)
44 ,(t) * ((vi1).y) 45 ,((Mouse).y) * ((vi1).y)
45 ,1.0))); 46 ,1.0)));
46 vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); 47 vo1 = v3FToV4F (vi1);
47 } 48 }
48 """ 49 """
49 , geometryShader = Nothing 50 , geometryShader = Nothing
diff --git a/testdata/Hyperboloid.out b/testdata/Hyperboloid.out
index 0d39c7ed..3bcaff73 100644
--- a/testdata/Hyperboloid.out
+++ b/testdata/Hyperboloid.out
@@ -32,20 +32,20 @@ Pipeline
32 uniform vec2 Mouse; 32 uniform vec2 Mouse;
33 in vec3 vi1; 33 in vec3 vi1;
34 smooth out vec4 vo1; 34 smooth out vec4 vo1;
35 float k;
36 float r;
37 vec4 scale(float z0,vec4 z1) { 35 vec4 scale(float z0,vec4 z1) {
38 return (z1) * (vec4 (z0,z0,z0,1.0)); 36 return (z1) * (vec4 (z0,z0,z0,1.0));
39 } 37 }
38 vec4 v3FToV4F(vec3 z0) {
39 return vec4 ((z0).x,(z0).y,(z0).z,1.0);
40 }
40 void main() { 41 void main() {
41 k = (2.0) * ((Mouse).y);
42 r = (Mouse).x;
43 gl_Position = scale (0.1 42 gl_Position = scale (0.1
44 ,(MVP) * (vec4 ((k) * (sin (((0.7) * ((vi1).x)) + ((r) * ((vi1).y)))) 43 ,(MVP) * (vec4 (((2.0) * ((Mouse).y)) * (sin
44 (((0.7) * ((vi1).x)) + (((Mouse).x) * ((vi1).y))))
45 ,(vi1).y 45 ,(vi1).y
46 ,(k) * (cos (((0.7) * ((vi1).x)) + ((r) * ((vi1).y)))) 46 ,((2.0) * ((Mouse).y)) * (cos (((0.7) * ((vi1).x)) + (((Mouse).x) * ((vi1).y))))
47 ,1.0))); 47 ,1.0)));
48 vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); 48 vo1 = v3FToV4F (vi1);
49 } 49 }
50 """ 50 """
51 , geometryShader = Nothing 51 , geometryShader = Nothing
diff --git a/testdata/Internals.out b/testdata/Internals.out
index a04281f0..f8a38c6f 100644
--- a/testdata/Internals.out
+++ b/testdata/Internals.out
@@ -230,63 +230,64 @@ negate
230 230
231(==) :: forall a . Eq a => a -> a -> Bool 231(==) :: forall a . Eq a => a -> a -> Bool
232(==) 232(==)
233 = _lhs 233 = primFix
234 (==) 234 \(a :: forall b . Eq b => b -> b -> Bool) -> _lhs
235 \ @a @(_ :: _) -> match'String 235 (==)
236 (\(_ :: _) -> _) 236 \ @c @(_ :: _) -> match'String
237 (_rhs
238 let
239 b = _lhs (==) \(c :: _) (d :: _) -> _rhs (isEQ (primCompareString c d))
240 in b)
241 a
242 (match'Char
243 (\(_ :: _) -> _) 237 (\(_ :: _) -> _)
244 (_rhs 238 (_rhs
245 let e = _lhs (==) \(f :: _) (g :: _) -> _rhs (isEQ (primCompareChar f g)) in e) 239 let
246 a 240 d = _lhs (==) \(e :: _) (f :: _) -> _rhs (isEQ (primCompareString e f))
247 (match'Int 241 in d)
242 c
243 (match'Char
248 (\(_ :: _) -> _) 244 (\(_ :: _) -> _)
249 (_rhs 245 (_rhs
250 let h = _lhs (==) \(i :: _) (j :: _) -> _rhs (isEQ (primCompareInt i j)) in h) 246 let g = _lhs (==) \(h :: _) (i :: _) -> _rhs (isEQ (primCompareChar h i)) in g)
251 a 247 c
252 (match'Float 248 (match'Int
253 (\(_ :: _) -> _) 249 (\(_ :: _) -> _)
254 (_rhs 250 (_rhs
255 let k = _lhs (==) \(l :: _) (m :: _) -> _rhs (isEQ (primCompareFloat l m)) in k) 251 let j = _lhs (==) \(k :: _) (l :: _) -> _rhs (isEQ (primCompareInt k l)) in j)
256 a 252 c
257 (match'Bool 253 (match'Float
258 (\(_ :: _) -> _) 254 (\(_ :: _) -> _)
259 (_rhs 255 (_rhs
260 let 256 let m = _lhs (==) \(n :: _) (o :: _) -> _rhs (isEQ (primCompareFloat n o)) in m)
261 n 257 c
262 = _lhs 258 (match'Bool
263 (==)
264 \(o :: _) (p :: _) -> case'Bool
265 (\(_ :: _) -> _)
266 (case'Bool (\(_ :: _) -> _) (_rhs True) (_rhs False) p)
267 (case'Bool (\(_ :: _) -> _) (_rhs False) (_rhs True) p)
268 o
269 in n)
270 a
271 (match'Nat
272 (\(_ :: _) -> _) 259 (\(_ :: _) -> _)
273 (_rhs 260 (_rhs
274 let 261 let
275 q 262 p
276 = _lhs 263 = _lhs
277 (==) 264 (==)
278 \(r :: _) (s :: _) -> case'Nat 265 \(q :: _) (r :: _) -> case'Bool
279 (\(_ :: _) -> _) 266 (\(_ :: _) -> _)
280 (case'Nat (\(_ :: _) -> _) (_rhs True) (\(_ :: _) -> _rhs False) s) 267 (case'Bool (\(_ :: _) -> _) (_rhs True) (_rhs False) r)
281 (\(t :: _) -> case'Nat 268 (case'Bool (\(_ :: _) -> _) (_rhs False) (_rhs True) r)
269 q
270 in p)
271 c
272 (match'Nat
273 (\(_ :: _) -> _)
274 (_rhs
275 let
276 s
277 = _lhs
278 (==)
279 \(t :: _) (u :: _) -> case'Nat
282 (\(_ :: _) -> _) 280 (\(_ :: _) -> _)
283 (_rhs False) 281 (case'Nat (\(_ :: _) -> _) (_rhs True) (\(_ :: _) -> _rhs False) u)
284 (\(u :: _) -> _rhs (t == u)) 282 (\(v :: _) -> case'Nat
285 s) 283 (\(_ :: _) -> _)
286 r 284 (_rhs False)
287 in q) 285 (\(w :: _) -> _rhs (a v w))
288 a 286 u)
289 (_rhs undefined)))))) 287 t
288 in s)
289 c
290 (_rhs undefined))))))
290 291
291infix 4 == 292infix 4 ==
292 293
@@ -310,7 +311,7 @@ hlistConsCase
310'Bool = <<type constructor with 0 indices; constructors: False, True>> 311'Bool = <<type constructor with 0 indices; constructors: False, True>>
311 312
312'CW :: Constraint -> Type 313'CW :: Constraint -> Type
313'CW = \a -> <<builtin>> 314'CW = \a -> <<delta function with arity 1>>
314 315
315'Char :: Type 316'Char :: Type
316'Char = <<type constructor with 0 indices; constructors: >> 317'Char = <<type constructor with 0 indices; constructors: >>
@@ -397,7 +398,7 @@ hlistConsCase
397'String = <<type constructor with 0 indices; constructors: >> 398'String = <<type constructor with 0 indices; constructors: >>
398 399
399'T2 :: Constraint -> Constraint -> Constraint 400'T2 :: Constraint -> Constraint -> Constraint
400'T2 = \a b -> <<builtin>> 401'T2 = \a b -> <<delta function with arity 2>>
401 402
402'Unit :: Type 403'Unit :: Type
403'Unit = <<type constructor with 0 indices; constructors: TT>> 404'Unit = <<type constructor with 0 indices; constructors: TT>>
@@ -411,32 +412,32 @@ hlistConsCase
411== :: forall a . Eq a => a -> a -> Bool 412== :: forall a . Eq a => a -> a -> Bool
412== 413==
413 = primFix 414 = primFix
414 (forall a . 'Eq a => a -> a -> 'Bool) 415 _
415 \b c _ -> match'String 416 \a b _ -> match'String
416 (\d -> d -> d -> 'Bool) 417 (\c -> c -> c -> 'Bool)
417 (_rhs (==)) 418 (_rhs (==))
418 c 419 b
419 (match'Char 420 (match'Char
420 (\e -> e -> e -> 'Bool) 421 (\d -> d -> d -> 'Bool)
421 (_rhs (==)) 422 (_rhs (==))
422 c 423 b
423 (match'Int 424 (match'Int
424 (\f -> f -> f -> 'Bool) 425 (\e -> e -> e -> 'Bool)
425 (_rhs (==)) 426 (_rhs (==))
426 c 427 b
427 (match'Float 428 (match'Float
428 (\g -> g -> g -> 'Bool) 429 (\f -> f -> f -> 'Bool)
429 (_rhs (==)) 430 (_rhs (==))
430 c 431 b
431 (match'Bool 432 (match'Bool
432 (\h -> h -> h -> 'Bool) 433 (\g -> g -> g -> 'Bool)
433 (_rhs (==)) 434 (_rhs (==))
434 c 435 b
435 (match'Nat 436 (match'Nat
436 (\i -> i -> i -> 'Bool) 437 (\h -> h -> h -> 'Bool)
437 (_rhs ((==) b)) 438 (_rhs (==))
438 c 439 b
439 (_rhs (undefined (c -> c -> 'Bool)))))))) 440 (_rhs (undefined (b -> b -> 'Bool))))))))
440 441
441CEmpty :: String -> Constraint 442CEmpty :: String -> Constraint
442CEmpty = <<1st constructor of 'Constraint>> 443CEmpty = <<1st constructor of 'Constraint>>
@@ -578,10 +579,10 @@ fromInt
578hlistConsCase 579hlistConsCase
579 :: forall a (b :: [Type]) 580 :: forall a (b :: [Type])
580 . forall c -> (a -> HList b -> c) -> HList (a : b) -> c 581 . forall c -> (a -> HList b -> c) -> HList (a : b) -> c
581hlistConsCase = \a b c d e -> <<builtin>> 582hlistConsCase = \a b c d e -> <<delta function with arity 5>>
582 583
583hlistNilCase :: forall a -> a -> () -> a 584hlistNilCase :: forall a -> a -> () -> a
584hlistNilCase = \a b c -> <<builtin>> 585hlistNilCase = \a b c -> <<delta function with arity 3>>
585 586
586isEQ :: Ordering -> Bool 587isEQ :: Ordering -> Bool
587isEQ = \a -> case'Ordering (\_ -> 'Bool) (_rhs False) (_rhs True) (_rhs False) a 588isEQ = \a -> case'Ordering (\_ -> 'Bool) (_rhs False) (_rhs True) (_rhs False) a
@@ -656,46 +657,46 @@ negate
656 (_rhs (undefined (a -> a)))))) 657 (_rhs (undefined (a -> a))))))
657 658
658parEval :: forall a -> a -> a -> a 659parEval :: forall a -> a -> a -> a
659parEval = \a b c -> <<builtin>> 660parEval = \a b c -> <<delta function with arity 3>>
660 661
661parens :: forall a . a -> a 662parens :: forall a . a -> a
662parens = \_ a -> _rhs a 663parens = \a b -> _rhs b
663 664
664primAddInt :: Int -> Int -> Int 665primAddInt :: Int -> Int -> Int
665primAddInt = \a b -> <<builtin>> 666primAddInt = \a b -> <<delta function with arity 2>>
666 667
667primCompareChar :: Char -> Char -> Ordering 668primCompareChar :: Char -> Char -> Ordering
668primCompareChar = \a b -> <<builtin>> 669primCompareChar = \a b -> <<delta function with arity 2>>
669 670
670primCompareFloat :: Float -> Float -> Ordering 671primCompareFloat :: Float -> Float -> Ordering
671primCompareFloat = \a b -> <<builtin>> 672primCompareFloat = \a b -> <<delta function with arity 2>>
672 673
673primCompareInt :: Int -> Int -> Ordering 674primCompareInt :: Int -> Int -> Ordering
674primCompareInt = \a b -> <<builtin>> 675primCompareInt = \a b -> <<delta function with arity 2>>
675 676
676primCompareString :: String -> String -> Ordering 677primCompareString :: String -> String -> Ordering
677primCompareString = \a b -> <<builtin>> 678primCompareString = \a b -> <<delta function with arity 2>>
678 679
679primCompareWord :: Word -> Word -> Ordering 680primCompareWord :: Word -> Word -> Ordering
680primCompareWord = \a b -> <<builtin>> 681primCompareWord = \a b -> <<builtin>>
681 682
682primFix :: forall a . (a -> a) -> a 683primFix :: forall a . (a -> a) -> a
683primFix = \a b -> <<builtin>> 684primFix = \a b -> primFix _ b
684 685
685primIfThenElse :: forall a . Bool -> a -> a -> a 686primIfThenElse :: forall a . Bool -> a -> a -> a
686primIfThenElse = \a b c d -> case'Bool (\_ -> a) (_rhs d) (_rhs c) b 687primIfThenElse = \a b c d -> case'Bool (\_ -> a) (_rhs d) (_rhs c) b
687 688
688primIntToFloat :: Int -> Float 689primIntToFloat :: Int -> Float
689primIntToFloat = \a -> <<builtin>> 690primIntToFloat = \a -> <<delta function with arity 1>>
690 691
691primIntToNat :: Int -> Nat 692primIntToNat :: Int -> Nat
692primIntToNat = \a -> <<builtin>> 693primIntToNat = \a -> <<delta function with arity 1>>
693 694
694primIntToWord :: Int -> Word 695primIntToWord :: Int -> Word
695primIntToWord = \a -> <<builtin>> 696primIntToWord = \a -> <<builtin>>
696 697
697primModInt :: Int -> Int -> Int 698primModInt :: Int -> Int -> Int
698primModInt = \a b -> <<builtin>> 699primModInt = \a b -> <<delta function with arity 2>>
699 700
700primNegateFloat :: Float -> Float 701primNegateFloat :: Float -> Float
701primNegateFloat = \a -> <<builtin>> 702primNegateFloat = \a -> <<builtin>>
@@ -707,25 +708,25 @@ primNegateWord :: Word -> Word
707primNegateWord = \a -> <<builtin>> 708primNegateWord = \a -> <<builtin>>
708 709
709primRound :: Float -> Int 710primRound :: Float -> Int
710primRound = \a -> <<builtin>> 711primRound = \a -> <<delta function with arity 1>>
711 712
712primSqrtFloat :: Float -> Float 713primSqrtFloat :: Float -> Float
713primSqrtFloat = \a -> <<builtin>> 714primSqrtFloat = \a -> <<delta function with arity 1>>
714 715
715primSubInt :: Int -> Int -> Int 716primSubInt :: Int -> Int -> Int
716primSubInt = \a b -> <<builtin>> 717primSubInt = \a b -> <<delta function with arity 2>>
717 718
718t2C :: Unit -> Unit -> Unit 719t2C :: Unit -> Unit -> Unit
719t2C = \a b -> <<builtin>> 720t2C = \a b -> <<delta function with arity 2>>
720 721
721typeAnn :: forall a . a -> a 722typeAnn :: forall a . a -> a
722typeAnn = \_ a -> _rhs a 723typeAnn = \a b -> _rhs b
723 724
724undefined :: forall a . a 725undefined :: forall a . a
725undefined = \a -> <<builtin>> 726undefined = \a -> <<builtin>>
726 727
727unsafeCoerce :: forall a b . a -> b 728unsafeCoerce :: forall a b . a -> b
728unsafeCoerce = \a b c -> <<builtin>> 729unsafeCoerce = \a b c -> <<delta function with arity 3>>
729------------ tooltips 730------------ tooltips
730testdata/Internals.lc 6:1-6:8 731testdata/Internals.lc 6:1-6:8
731 forall a . a -> a 732 forall a . a -> a
@@ -1152,8 +1153,6 @@ testdata/Internals.lc 118:7-118:9
1152 Type -> Constraint | Type -> Constraint | Constraint 1153 Type -> Constraint | Type -> Constraint | Constraint
1153testdata/Internals.lc 118:7-119:27 1154testdata/Internals.lc 118:7-119:27
1154 Type 1155 Type
1155testdata/Internals.lc 118:7-134:29
1156 forall a . Eq a => a -> a -> Bool
1157testdata/Internals.lc 119:6-119:8 1156testdata/Internals.lc 119:6-119:8
1158 forall a . Eq a => a -> a -> Bool 1157 forall a . Eq a => a -> a -> Bool
1159testdata/Internals.lc 119:13-119:14 1158testdata/Internals.lc 119:13-119:14
diff --git a/testdata/Prelude.out b/testdata/Prelude.out
index ea497d05..d080c7e4 100644
--- a/testdata/Prelude.out
+++ b/testdata/Prelude.out
@@ -48,74 +48,70 @@ pi = _lhs pi (_rhs 3.141592653589793)
48 48
49zip :: forall (a :: _) (b :: _) . [a] -> [b] -> [(a, b)] 49zip :: forall (a :: _) (b :: _) . [a] -> [b] -> [(a, b)]
50zip 50zip
51 = _lhs 51 = primFix
52 zip 52 \(a :: forall (b :: _) (c :: _) . [b] -> [c] -> [(b, c)]) -> _lhs
53 \(a :: _) (b :: _) -> case'List 53 zip
54 (\(_ :: _) -> _) 54 \(d :: _) (e :: _) -> case'List
55 (_rhs [])
56 (\(c :: _) (d :: _) -> case'List
57 (\(_ :: _) -> _) 55 (\(_ :: _) -> _)
58 (_rhs []) 56 (_rhs [])
59 (\(e :: _) (f :: _) -> _rhs ((c, e) : zip d f)) 57 (\(f :: _) (g :: _) -> case'List
60 b) 58 (\(_ :: _) -> _)
61 a 59 (_rhs [])
60 (\(h :: _) (i :: _) -> _rhs ((f, h) : a g i))
61 e)
62 d
62 63
63unzip :: forall (a :: _) (b :: _) . [(a, b)] -> ([a], [b]) 64unzip :: forall (a :: _) (b :: _) . [(a, b)] -> ([a], [b])
64unzip 65unzip
65 = _lhs 66 = primFix
66 unzip 67 \(a :: forall (b :: _) (c :: _) . [(b, c)] -> ([b], [c])) -> _lhs
67 \(a :: _) -> case'List 68 unzip
68 (\(_ :: _) -> _) 69 \(d :: _) -> case'List
69 (_rhs ([], [])) 70 (\(_ :: _) -> _)
70 (\(b :: _) (c :: _) -> hlistConsCase 71 (_rhs ([], []))
71 _ 72 (\(e :: _) (f :: _) -> hlistConsCase
72 (\(d :: _) (e :: _) -> hlistConsCase
73 _ 73 _
74 (\(f :: _) (g :: _) -> hlistNilCase 74 (\(g :: _) (h :: _) -> hlistConsCase
75 _ 75 _
76 (_rhs 76 (\(i :: _) (j :: _) -> hlistNilCase
77 let 77 _
78 h = _lhs _bs_as (_rhs (unzip c)); 78 (_rhs
79 i 79 let
80 = _lhs 80 k = a f;
81 bs 81 l
82 (_rhs 82 = (\(n :: _) -> hlistConsCase
83 ((\(k :: _) -> hlistConsCase 83 _
84 _ 84 (\(_ :: _) (o :: _) -> hlistConsCase
85 (\(_ :: _) (l :: _) -> hlistConsCase
86 _
87 (\(m :: _) (n :: _) -> hlistNilCase _ m n)
88 l)
89 k)
90 h));
91 j
92 = _lhs
93 as
94 (_rhs
95 ((\(o :: _) -> hlistConsCase
96 _ 85 _
97 (\(p :: _) (q :: _) -> hlistConsCase 86 (\(p :: _) (q :: _) -> hlistNilCase _ p q)
98 _
99 (\(_ :: _) (r :: _) -> hlistNilCase _ p r)
100 q)
101 o) 87 o)
102 h)) 88 n)
103 in (d : j, f : i)) 89 k;
104 g) 90 m
91 = (\(r :: _) -> hlistConsCase
92 _
93 (\(s :: _) (t :: _) -> hlistConsCase
94 _
95 (\(_ :: _) (u :: _) -> hlistNilCase _ s u)
96 t)
97 r)
98 k
99 in (g : m, i : l))
100 j)
101 h)
105 e) 102 e)
106 b) 103 d
107 a
108 104
109filter 105filter
110 = _lhs 106 = primFix
111 filter 107 \(a :: _) -> _lhs
112 \(a :: _) (b :: _) -> case'List 108 filter
113 (\(_ :: _) -> _) 109 \(b :: _) (c :: _) -> case'List
114 (_rhs []) 110 (\(_ :: _) -> _)
115 (\(c :: _) (d :: _) -> _rhs 111 (_rhs [])
116 ((\(e :: _) -> case'Bool (\(_ :: _) -> _) (filter a d) (c : filter a d) e) 112 (\(d :: _) (e :: _) -> _rhs
117 (a c))) 113 ((\(f :: _) -> case'Bool (\(_ :: _) -> _) (a b e) (d : a b e) f) (b d)))
118 b 114 c
119 115
120tail :: forall (a :: _) . [a] -> [a] 116tail :: forall (a :: _) . [a] -> [a]
121tail 117tail
@@ -131,13 +127,14 @@ pairs :: forall (a :: _) . [a] -> [(a, a)]
131pairs = _lhs pairs \(a :: _) -> _rhs (zip a (tail a)) 127pairs = _lhs pairs \(a :: _) -> _rhs (zip a (tail a))
132 128
133foldl' 129foldl'
134 = _lhs 130 = primFix
135 foldl' 131 \(a :: _) -> _lhs
136 \(a :: _) (b :: _) (c :: _) -> case'List 132 foldl'
137 (\(_ :: _) -> _) 133 \(b :: _) (c :: _) (d :: _) -> case'List
138 (_rhs b) 134 (\(_ :: _) -> _)
139 (\(d :: _) (e :: _) -> _rhs (foldl' a (a b d) e)) 135 (_rhs c)
140 c 136 (\(e :: _) (f :: _) -> _rhs (a b (b c e) f))
137 d
141 138
142foldr1 139foldr1
143 = _lhs 140 = _lhs
@@ -149,77 +146,77 @@ foldr1
149 b 146 b
150 147
151split 148split
152 = _lhs 149 = primFix
153 split 150 \(a :: _) -> _lhs
154 \(a :: _) -> case'List 151 split
155 (\(_ :: _) -> _) 152 \(b :: _) -> case'List
156 (_rhs ([], [])) 153 (\(_ :: _) -> _)
157 (\(b :: _) (c :: _) -> _rhs 154 (_rhs ([], []))
158 let 155 (\(c :: _) (d :: _) -> _rhs
159 d = _lhs _bs_as (_rhs (split c)); 156 let
160 e 157 e = a d;
161 = _lhs 158 f
162 bs 159 = (\(h :: _) -> hlistConsCase
163 (_rhs 160 _
164 ((\(g :: _) -> hlistConsCase 161 (\(_ :: _) (i :: _) -> hlistConsCase
165 _ 162 _
166 (\(_ :: _) (h :: _) -> hlistConsCase 163 (\(j :: _) (k :: _) -> hlistNilCase _ j k)
167 _ 164 i)
168 (\(i :: _) (j :: _) -> hlistNilCase _ i j) 165 h)
169 h) 166 e;
170 g) 167 g
171 d)); 168 = (\(l :: _) -> hlistConsCase
172 f 169 _
173 = _lhs 170 (\(m :: _) (n :: _) -> hlistConsCase
174 as
175 (_rhs
176 ((\(k :: _) -> hlistConsCase
177 _ 171 _
178 (\(l :: _) (m :: _) -> hlistConsCase 172 (\(_ :: _) (o :: _) -> hlistNilCase _ m o)
179 _ 173 n)
180 (\(_ :: _) (n :: _) -> hlistNilCase _ l n) 174 l)
181 m) 175 e
182 k) 176 in (c : f, g))
183 d)) 177 b
184 in (b : e, f))
185 a
186 178
187mergeBy 179mergeBy
188 = _lhs 180 = primFix
189 mergeBy 181 \(a :: _) -> _lhs
190 \(a :: _) (b :: _) (c :: _) -> case'List 182 mergeBy
191 (\(_ :: _) -> _) 183 \(b :: _) (c :: _) (d :: _) -> case'List
192 (_rhs c)
193 (\(d :: _) (e :: _) -> case'List
194 (\(_ :: _) -> _) 184 (\(_ :: _) -> _)
195 (_rhs b) 185 (_rhs d)
196 (\(f :: _) (g :: _) -> _rhs 186 (\(e :: _) (f :: _) -> case'List
197 ((\(h :: _) -> case'Ordering 187 (\(_ :: _) -> _)
198 (\(_ :: _) -> _) 188 (_rhs c)
199 (d : mergeBy a e (f : g)) 189 (\(g :: _) (h :: _) -> _rhs
200 (f : mergeBy a (d : e) g) 190 ((\(i :: _) -> case'Ordering
201 (f : mergeBy a (d : e) g) 191 (\(_ :: _) -> _)
202 h) 192 (e : a b f (g : h))
203 (a d f))) 193 (g : a b (e : f) h)
204 c) 194 (g : a b (e : f) h)
205 b 195 i)
196 (b e g)))
197 d)
198 c
206 199
207sortBy 200sortBy
208 = _lhs 201 = primFix
209 sortBy 202 \(a :: _) -> _lhs
210 \(a :: _) (b :: _) -> case'List 203 sortBy
211 (\(_ :: _) -> _) 204 \(b :: _) (c :: _) -> case'List
212 (_rhs [])
213 (\(c :: _) (d :: _) -> case'List
214 (\(_ :: _) -> _) 205 (\(_ :: _) -> _)
215 (_rhs [c]) 206 (_rhs [])
216 (\(_ :: _) (_ :: _) -> _rhs 207 (\(d :: _) (e :: _) -> case'List
217 (uncurry (mergeBy a) ((sortBy a *** sortBy a) (split b)))) 208 (\(_ :: _) -> _)
218 d) 209 (_rhs [d])
219 b 210 (\(_ :: _) (_ :: _) -> _rhs (uncurry (mergeBy b) ((a b *** a b) (split c))))
211 e)
212 c
220 213
221iterate :: forall (a :: _) . (a -> a) -> a -> [a] 214iterate :: forall (a :: _) . (a -> a) -> a -> [a]
222iterate = _lhs iterate \(a :: _) (b :: _) -> _rhs (b : iterate a (a b)) 215iterate
216 = primFix
217 \(a :: forall (b :: _) . (b -> b) -> b -> [b]) -> _lhs
218 iterate
219 \(c :: _) (d :: _) -> _rhs (d : a c (c d))
223 220
224fst 221fst
225 = _lhs 222 = _lhs
@@ -269,17 +266,17 @@ data RecordC (_ :: [RecItem]) :: Type where
269 RecordCons :: forall (a :: [RecItem]) . HList (map recItemType a) -> RecordC a 266 RecordCons :: forall (a :: [RecItem]) . HList (map recItemType a) -> RecordC a
270 267
271isKeyC 268isKeyC
272 = _lhs 269 = primFix
273 isKeyC 270 \(a :: _) -> _lhs
274 \(a :: _) (b :: _) (c :: _) -> case'List 271 isKeyC
275 (\(_ :: _) -> _) 272 \(b :: _) (c :: _) (d :: _) -> case'List
276 (_rhs ('CEmpty ""))
277 (\(d :: _) (e :: _) -> case'RecItem
278 (\(_ :: _) -> _) 273 (\(_ :: _) -> _)
279 (\(f :: _) (g :: _) -> _rhs 274 (_rhs ('CEmpty ""))
280 (primIfThenElse (a == f) (b `'EqCTt` g) (isKeyC a b e))) 275 (\(e :: _) (f :: _) -> case'RecItem
281 d) 276 (\(_ :: _) -> _)
282 c 277 (\(g :: _) (h :: _) -> _rhs (primIfThenElse (b == g) (c `'EqCTt` h) (a b c f)))
278 e)
279 d
283 280
284fstTup = _lhs fstTup (_rhs (hlistConsCase (_ :: _) \(a :: _) (_ :: _) -> a)) 281fstTup = _lhs fstTup (_rhs (hlistConsCase (_ :: _) \(a :: _) (_ :: _) -> a))
285 282
@@ -289,30 +286,34 @@ project
289 :: forall (a :: _) (b :: [RecItem]) 286 :: forall (a :: _) (b :: [RecItem])
290 . forall (c :: String) -> isKeyC c a b => RecordC b -> a 287 . forall (c :: String) -> isKeyC c a b => RecordC b -> a
291project 288project
292 = _lhs 289 = primFix
293 project 290 \(a
294 \ @(a :: _) @(b :: _) (c :: _) @(_ :: _) (d :: _) -> case'List 291 :: forall (b :: _) (c :: [RecItem])
295 (\(_ :: _) -> _) 292 . forall (d :: String) -> isKeyC d b c => RecordC c -> b)
296 (_rhs undefined) 293 -> _lhs
297 (\(e :: _) (f :: _) -> case'RecItem 294 project
295 \ @(e :: _) @(f :: _) (g :: _) @(_ :: _) (h :: _) -> case'List
298 (\(_ :: _) -> _) 296 (\(_ :: _) -> _)
299 (\(g :: _) (_ :: _) -> case'RecordC 297 (_rhs undefined)
298 (\(i :: _) (j :: _) -> case'RecItem
300 (\(_ :: _) -> _) 299 (\(_ :: _) -> _)
301 (\(h :: _) -> case'Bool 300 (\(k :: _) (_ :: _) -> case'RecordC
302 (\(_ :: _) -> _) 301 (\(_ :: _) -> _)
303 (_rhs 302 (\(l :: _) -> case'Bool
304 (project 303 (\(_ :: _) -> _)
305 @a 304 (_rhs
306 @f 305 (a
307 c 306 @e
308 @(undefined @('CW (isKeyC c a f))) 307 @j
309 (RecordCons 308 g
310 (sndTup (unsafeCoerce @(_ :: _) @('HList (a : map recItemType f)) h))))) 309 @(undefined @('CW (isKeyC g e j)))
311 (_rhs (fstTup (unsafeCoerce @(_ :: _) @('HList (a : map recItemType f)) h))) 310 (RecordCons
312 (c == g)) 311 (sndTup (unsafeCoerce @(_ :: _) @('HList (e : map recItemType j)) l)))))
313 d) 312 (_rhs (fstTup (unsafeCoerce @(_ :: _) @('HList (e : map recItemType j)) l)))
314 e) 313 (g == k))
315 b 314 h)
315 i)
316 f
316 317
317rgb = _lhs rgb \(a :: _) (b :: _) (c :: _) -> _rhs (V4 a b c 1.0) 318rgb = _lhs rgb \(a :: _) (b :: _) (c :: _) -> _rhs (V4 a b c 1.0)
318 319
@@ -620,10 +621,7 @@ perspective
620 perspective 621 perspective
621 \(a :: _) (b :: _) (c :: _) (d :: _) -> _rhs 622 \(a :: _) (b :: _) (c :: _) (d :: _) -> _rhs
622 let 623 let
623 e = _lhs t (_rhs (a * tan (c / fromInt 2))); 624 e = a * tan (c / fromInt 2); f = fromInt 0 - e; g = d * e; h = fromInt 0 - g
624 f = _lhs b (_rhs (fromInt 0 - e));
625 g = _lhs r (_rhs (d * e));
626 h = _lhs l (_rhs (fromInt 0 - g))
627 in M44F 625 in M44F
628 (V4 (fromInt 2 * a / (g - h)) (fromInt 0) (fromInt 0) (fromInt 0)) 626 (V4 (fromInt 2 * a / (g - h)) (fromInt 0) (fromInt 0) (fromInt 0))
629 (V4 (fromInt 0) (fromInt 2 * a / (e - f)) (fromInt 0) (fromInt 0)) 627 (V4 (fromInt 0) (fromInt 2 * a / (e - f)) (fromInt 0) (fromInt 0))
@@ -642,7 +640,7 @@ rotMatrixZ
642 = _lhs 640 = _lhs
643 rotMatrixZ 641 rotMatrixZ
644 \(a :: _) -> _rhs 642 \(a :: _) -> _rhs
645 let b = _lhs c (_rhs (cos a)); c = _lhs s (_rhs (sin a)) in M44F 643 let b = cos a; c = sin a in M44F
646 (V4 b c (fromInt 0) (fromInt 0)) 644 (V4 b c (fromInt 0) (fromInt 0))
647 (V4 (fromInt 0 - c) b (fromInt 0) (fromInt 0)) 645 (V4 (fromInt 0 - c) b (fromInt 0) (fromInt 0))
648 (V4 (fromInt 0) (fromInt 0) (fromInt 1) (fromInt 0)) 646 (V4 (fromInt 0) (fromInt 0) (fromInt 1) (fromInt 0))
@@ -652,7 +650,7 @@ rotMatrixY
652 = _lhs 650 = _lhs
653 rotMatrixY 651 rotMatrixY
654 \(a :: _) -> _rhs 652 \(a :: _) -> _rhs
655 let b = _lhs c (_rhs (cos a)); c = _lhs s (_rhs (sin a)) in M44F 653 let b = cos a; c = sin a in M44F
656 (V4 b (fromInt 0) (fromInt 0 - c) (fromInt 0)) 654 (V4 b (fromInt 0) (fromInt 0 - c) (fromInt 0))
657 (V4 (fromInt 0) (fromInt 1) (fromInt 0) (fromInt 0)) 655 (V4 (fromInt 0) (fromInt 1) (fromInt 0) (fromInt 0))
658 (V4 c (fromInt 0) b (fromInt 0)) 656 (V4 c (fromInt 0) b (fromInt 0))
@@ -662,7 +660,7 @@ rotMatrixX
662 = _lhs 660 = _lhs
663 rotMatrixX 661 rotMatrixX
664 \(a :: _) -> _rhs 662 \(a :: _) -> _rhs
665 let b = _lhs c (_rhs (cos a)); c = _lhs s (_rhs (sin a)) in M44F 663 let b = cos a; c = sin a in M44F
666 (V4 (fromInt 1) (fromInt 0) (fromInt 0) (fromInt 0)) 664 (V4 (fromInt 1) (fromInt 0) (fromInt 0) (fromInt 0))
667 (V4 (fromInt 0) b c (fromInt 0)) 665 (V4 (fromInt 0) b c (fromInt 0))
668 (V4 (fromInt 0) (fromInt 0 - c) b (fromInt 0)) 666 (V4 (fromInt 0) (fromInt 0 - c) b (fromInt 0))
@@ -680,13 +678,10 @@ translateBefore4
680 translateBefore4 678 translateBefore4
681 \(a :: _) -> _rhs 679 \(a :: _) -> _rhs
682 let 680 let
683 b = _lhs r1 (_rhs (V4 (fromInt 1) (fromInt 0) (fromInt 0) (fromInt 0))); 681 b = V4 (fromInt 1) (fromInt 0) (fromInt 0) (fromInt 0);
684 c = _lhs r2 (_rhs (V4 (fromInt 0) (fromInt 1) (fromInt 0) (fromInt 0))); 682 c = V4 (fromInt 0) (fromInt 1) (fromInt 0) (fromInt 0);
685 d = _lhs r3 (_rhs (V4 (fromInt 0) (fromInt 0) (fromInt 1) (fromInt 0))); 683 d = V4 (fromInt 0) (fromInt 0) (fromInt 1) (fromInt 0);
686 e 684 e = V4 (swizzscalar a Sx) (swizzscalar a Sy) (swizzscalar a Sz) (fromInt 1)
687 = _lhs
688 r4
689 (_rhs (V4 (swizzscalar a Sx) (swizzscalar a Sy) (swizzscalar a Sz) (fromInt 1)))
690 in M44F b c d e 685 in M44F b c d e
691 686
692lookat 687lookat
@@ -703,59 +698,58 @@ lookat
703 ext0 698 ext0
704 \(i :: _) -> _rhs 699 \(i :: _) -> _rhs
705 (V4 (swizzscalar i Sx) (swizzscalar i Sy) (swizzscalar i Sz) (fromInt 0)); 700 (V4 (swizzscalar i Sx) (swizzscalar i Sy) (swizzscalar i Sz) (fromInt 0));
706 e = _lhs w (_rhs (normalize $ a - b)); 701 e = normalize $ a - b;
707 f = _lhs u (_rhs (normalize $ c `cross` e)); 702 f = normalize $ c `cross` e;
708 g = _lhs v (_rhs (e `cross` f)); 703 g = e `cross` f;
709 h 704 h
710 = _lhs 705 = transpose
711 r 706 $ M44F (d f) (d g) (d e) (V4 (fromInt 0) (fromInt 0) (fromInt 0) (fromInt 1))
712 (_rhs
713 (transpose
714 $ M44F (d f) (d g) (d e) (V4 (fromInt 0) (fromInt 0) (fromInt 0) (fromInt 1))))
715 in h .*. translateBefore4 (neg a) 707 in h .*. translateBefore4 (neg a)
716 708
717scale = _lhs scale \(a :: _) (b :: _) -> _rhs (b * V4 a a a 1.0) 709scale = _lhs scale \(a :: _) (b :: _) -> _rhs (b * V4 a a a 1.0)
718 710
719fromTo :: Float -> Float -> [Float] 711fromTo :: Float -> Float -> [Float]
720fromTo 712fromTo
721 = _lhs 713 = primFix
722 fromTo 714 \(a :: Float -> Float -> [Float]) -> _lhs
723 \(a :: _) (b :: _) -> case'Bool 715 fromTo
724 (\(_ :: _) -> _) 716 \(b :: _) (c :: _) -> case'Bool
725 (_rhs (a : fromTo (a + fromInt 1) b)) 717 (\(_ :: _) -> _)
726 (_rhs []) 718 (_rhs (b : a (b + fromInt 1) c))
727 (a > b) 719 (_rhs [])
720 (b > c)
728 721
729(!!) :: forall (a :: _) . [a] -> Int -> a 722(!!) :: forall (a :: _) . [a] -> Int -> a
730(!!) 723(!!)
731 = _lhs 724 = primFix
732 (!!) 725 \(a :: forall (b :: _) . [b] -> Int -> b) -> _lhs
733 \(a :: _) (b :: _) -> case'List 726 (!!)
734 (\(_ :: _) -> _) 727 \(c :: _) (d :: _) -> case'List
735 (_rhs undefined)
736 (\(c :: _) (d :: _) -> case'Bool
737 (\(_ :: _) -> _) 728 (\(_ :: _) -> _)
738 (_rhs (d !! (b - fromInt 1))) 729 (_rhs undefined)
739 (_rhs c) 730 (\(e :: _) (f :: _) -> case'Bool
740 (fromInt 0 == b)) 731 (\(_ :: _) -> _)
741 a 732 (_rhs (a f (d - fromInt 1)))
733 (_rhs e)
734 (fromInt 0 == d))
735 c
742------------ core code 736------------ core code
743!! :: forall a . [a] -> Int -> a 737!! :: forall a . [a] -> Int -> a
744!! 738!!
745 = primFix 739 = primFix
746 (forall a . [a] -> 'Int -> a) 740 _
747 \b c d e -> case'List 741 \a b c d -> case'List
748 (\_ -> c) 742 (\_ -> b)
749 (_rhs (undefined c)) 743 (_rhs (undefined b))
750 (\f g -> case'Bool 744 (\e f -> case'Bool
751 (\_ -> c) 745 (\_ -> b)
752 (_rhs (b c g (PrimSub 'Int TT e 1))) 746 (_rhs (a b f (d - 1)))
753 (_rhs f) 747 (_rhs e)
754 (isEQ (primCompareInt 0 e))) 748 (isEQ (primCompareInt 0 d)))
755 d 749 c
756 750
757$ :: forall a b . (a -> b) -> a -> b 751$ :: forall a b . (a -> b) -> a -> b
758$ = \_ _ -> _rhs \a b -> a b 752$ = \a b -> _rhs \c d -> c d
759 753
760% 754%
761 :: forall a (b :: Nat) 755 :: forall a (b :: Nat)
@@ -766,7 +760,7 @@ $ = \_ _ -> _rhs \a b -> a b
766%! = \a b c d e -> _rhs (PrimModS a ('VecScalar b a) b c TT d e) 760%! = \a b c d e -> _rhs (PrimModS a ('VecScalar b a) b c TT d e)
767 761
768& :: forall a b . a -> (a -> b) -> b 762& :: forall a b . a -> (a -> b) -> b
769& = \_ _ a b -> _rhs (b a) 763& = \a b c d -> _rhs (d c)
770 764
771&& :: Bool -> Bool -> Bool 765&& :: Bool -> Bool -> Bool
772&& = \a b -> _rhs (PrimAnd a b) 766&& = \a b -> _rhs (PrimAnd a b)
@@ -816,7 +810,7 @@ $ = \_ _ -> _rhs \a b -> a b
816-! = \a b c d -> _rhs (PrimSubS ('MatVecScalarElem a) a TT b c d) 810-! = \a b c d -> _rhs (PrimSubS ('MatVecScalarElem a) a TT b c d)
817 811
818. :: forall a b c . (b -> c) -> (a -> b) -> a -> c 812. :: forall a b c . (b -> c) -> (a -> b) -> a -> c
819. = \_ _ _ -> _rhs \a b c -> a (b c) 813. = \a b c -> _rhs \d e f -> d (e f)
820 814
821.* :: forall (a :: Nat) b (c :: Nat) . VecS b a -> Mat a c b -> Vec c b 815.* :: forall (a :: Nat) b (c :: Nat) . VecS b a -> Mat a c b -> Vec c b
822.* = \a b c d e -> _rhs (PrimMulVecMat a b c d e) 816.* = \a b c d e -> _rhs (PrimMulVecMat a b c d e)
@@ -868,8 +862,7 @@ $ = \_ _ -> _rhs \a b -> a b
868RecItem :: String -> Type -> RecItem 862RecItem :: String -> Type -> RecItem
869RecItem = <<0th constructor of 'RecItem>> 863RecItem = <<0th constructor of 'RecItem>>
870 864
871RecordCons 865RecordCons :: forall (a :: [RecItem]) . HList (map recItemType a) -> RecordC a
872 :: forall (a :: [RecItem]) . HList (map RecItem Type recItemType a) -> RecordC a
873RecordCons = <<0th constructor of 'RecordC>> 866RecordCons = <<0th constructor of 'RecordC>>
874 867
875abs :: forall a b (c :: Nat) . (Signed a, b ~ VecScalar c a) => b -> b 868abs :: forall a b (c :: Nat) . (Signed a, b ~ VecScalar c a) => b -> b
@@ -940,7 +933,7 @@ case'RecItem = \a b c -> <<case function of a type with 0 parameters>>
940case'RecordC 933case'RecordC
941 :: forall (a :: [RecItem]) 934 :: forall (a :: [RecItem])
942 . forall (b :: RecordC a -> Type) 935 . forall (b :: RecordC a -> Type)
943 -> (forall (c :: HList (map RecItem Type recItemType a)) -> b ('RecordCons c)) 936 -> (forall (c :: HList (map recItemType a)) -> b ('RecordCons c))
944 -> forall (d :: RecordC a) -> b d 937 -> forall (d :: RecordC a) -> b d
945case'RecordC = \_ a b c -> <<case function of a type with 1 parameters>> 938case'RecordC = \_ a b c -> <<case function of a type with 1 parameters>>
946 939
@@ -962,7 +955,7 @@ colorImage2
962colorImage2 = _rhs \a b c d e f -> ColorImage 2 a b c d e f 955colorImage2 = _rhs \a b c d e f -> ColorImage 2 a b c d e f
963 956
964const :: forall a b . a -> b -> a 957const :: forall a b . a -> b -> a
965const = \_ _ a _ -> _rhs a 958const = \a b c _ -> _rhs c
966 959
967cos :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> a 960cos :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> a
968cos = _rhs \a b c d -> PrimCos a b c d 961cos = _rhs \a b c d -> PrimCos a b c d
@@ -1009,7 +1002,7 @@ faceforward = _rhs \a b c d e f -> PrimFaceForward a b c d e f
1009filter :: forall a . (a -> Bool) -> [a] -> [a] 1002filter :: forall a . (a -> Bool) -> [a] -> [a]
1010filter 1003filter
1011 = \a -> primFix 1004 = \a -> primFix
1012 ((a -> 'Bool) -> [a] -> [a]) 1005 _
1013 \b c d -> case'List 1006 \b c d -> case'List
1014 (\_ -> [a]) 1007 (\_ -> [a])
1015 (_rhs []) 1008 (_rhs [])
@@ -1028,7 +1021,7 @@ floor = _rhs \a b c d -> PrimFloor a b c d
1028foldl' :: forall a b . (a -> b -> a) -> a -> [b] -> a 1021foldl' :: forall a b . (a -> b -> a) -> a -> [b] -> a
1029foldl' 1022foldl'
1030 = \a b -> primFix 1023 = \a b -> primFix
1031 ((a -> b -> a) -> a -> [b] -> a) 1024 _
1032 \c d e f -> case'List (\_ -> a) (_rhs e) (\g h -> _rhs (c d (d e g) h)) f 1025 \c d e f -> case'List (\_ -> a) (_rhs e) (\g h -> _rhs (c d (d e g) h)) f
1033 1026
1034foldr1 :: forall a . (a -> a -> a) -> [a] -> a 1027foldr1 :: forall a . (a -> a -> a) -> [a] -> a
@@ -1036,7 +1029,7 @@ foldr1
1036 = \a b c -> case'List 1029 = \a b c -> case'List
1037 (\_ -> a) 1030 (\_ -> a)
1038 (_rhs (undefined a)) 1031 (_rhs (undefined a))
1039 (\d e -> _rhs (foldr a a b d e)) 1032 (\d e -> _rhs (foldr b d e))
1040 c 1033 c
1041 1034
1042fract :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> a 1035fract :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> a
@@ -1045,12 +1038,21 @@ fract = _rhs \a b c d -> PrimFract a b c d
1045fromTo :: Float -> Float -> [Float] 1038fromTo :: Float -> Float -> [Float]
1046fromTo 1039fromTo
1047 = primFix 1040 = primFix
1048 ('Float -> 'Float -> ['Float]) 1041 _
1049 \a b c -> case'Bool 1042 \a b c -> case'Bool
1050 (\_ -> ['Float]) 1043 (\_ -> ['Float])
1051 (_rhs (b : a (PrimAdd 'Float TT b 1.0) c)) 1044 (_rhs (b : a (b + 1.0) c))
1052 (_rhs []) 1045 (_rhs [])
1053 (PrimGreaterThan 'Float 1 'Float 'Bool TT TT TT b c) 1046 (PrimGreaterThan
1047 ('VecScalar 1 'Float)
1048 1
1049 'Float
1050 ('VecScalar 1 'Bool)
1051 TT
1052 TT
1053 TT
1054 b
1055 c)
1054 1056
1055fst :: forall a b . (a, b) -> a 1057fst :: forall a b . (a, b) -> a
1056fst 1058fst
@@ -1090,14 +1092,13 @@ isInf = _rhs \a b c d e f -> PrimIsInf a b c d e f
1090isKeyC :: String -> Type -> [RecItem] -> Constraint 1092isKeyC :: String -> Type -> [RecItem] -> Constraint
1091isKeyC 1093isKeyC
1092 = primFix 1094 = primFix
1093 ('String -> Type -> ['RecItem] -> 'Constraint) 1095 _
1094 \a b c d -> case'List 1096 \a b c d -> case'List
1095 (\_ -> 'Constraint) 1097 (\_ -> 'Constraint)
1096 (_rhs (CEmpty "")) 1098 (_rhs (CEmpty ""))
1097 (\e f -> case'RecItem 1099 (\e f -> case'RecItem
1098 (\_ -> 'Constraint) 1100 (\_ -> 'Constraint)
1099 (\g h -> _rhs 1101 (\g h -> _rhs (primIfThenElse 'Constraint (b == g) (c ~ h) (a b c f)))
1100 (primIfThenElse 'Constraint (isEQ (primCompareString b g)) (c ~ h) (a b c f)))
1101 e) 1102 e)
1102 d 1103 d
1103 1104
@@ -1107,8 +1108,7 @@ isNan
1107isNan = _rhs \a b c d e f -> PrimIsNan a b c d e f 1108isNan = _rhs \a b c d e f -> PrimIsNan a b c d e f
1108 1109
1109iterate :: forall a . (a -> a) -> a -> [a] 1110iterate :: forall a . (a -> a) -> a -> [a]
1110iterate 1111iterate = primFix _ \a b c d -> _rhs (d : a b c (c d))
1111 = primFix (forall a . (a -> a) -> a -> [a]) \b c d e -> _rhs (e : b c d (d e))
1112 1112
1113length :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> Float 1113length :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> Float
1114length = _rhs \a b c d -> PrimLength a b c d 1114length = _rhs \a b c d -> PrimLength a b c d
@@ -1135,127 +1135,33 @@ lookat
1135 4 1135 4
1136 'Float 1136 'Float
1137 (M44F 1137 (M44F
1138 (V4 1138 (ext0
1139 (swizzscalar 1139 (PrimNormalize
1140 'Float 1140 ('VecScalar 3 'Float)
1141 3 1141 3
1142 (PrimNormalize 1142 TT
1143 ('VecS 'Float 3) 1143 (PrimCross
1144 3
1145 TT
1146 (PrimCross
1147 ('VecS 'Float 3)
1148 TT
1149 c
1150 (PrimNormalize ('VecS 'Float 3) 3 TT (PrimSub ('VecS 'Float 3) TT a b))))
1151 Sx)
1152 (swizzscalar
1153 'Float
1154 3
1155 (PrimNormalize
1156 ('VecS 'Float 3) 1144 ('VecS 'Float 3)
1157 3
1158 TT 1145 TT
1159 (PrimCross 1146 c
1160 ('VecS 'Float 3) 1147 (PrimNormalize ('VecScalar 3 'Float) 3 TT (a - b)))))
1161 TT 1148 (ext0
1162 c 1149 (PrimCross
1163 (PrimNormalize ('VecS 'Float 3) 3 TT (PrimSub ('VecS 'Float 3) TT a b)))) 1150 ('VecS 'Float 3)
1164 Sy) 1151 TT
1165 (swizzscalar 1152 (PrimNormalize ('VecScalar 3 'Float) 3 TT (a - b))
1166 'Float
1167 3
1168 (PrimNormalize 1153 (PrimNormalize
1169 ('VecS 'Float 3) 1154 ('VecScalar 3 'Float)
1170 3 1155 3
1171 TT 1156 TT
1172 (PrimCross 1157 (PrimCross
1173 ('VecS 'Float 3) 1158 ('VecS 'Float 3)
1174 TT 1159 TT
1175 c 1160 c
1176 (PrimNormalize ('VecS 'Float 3) 3 TT (PrimSub ('VecS 'Float 3) TT a b)))) 1161 (PrimNormalize ('VecScalar 3 'Float) 3 TT (a - b))))))
1177 Sz) 1162 (ext0 (PrimNormalize ('VecScalar 3 'Float) 3 TT (a - b)))
1178 0.0)
1179 (V4
1180 (swizzscalar
1181 'Float
1182 3
1183 (PrimCross
1184 ('VecS 'Float 3)
1185 TT
1186 (PrimNormalize ('VecS 'Float 3) 3 TT (PrimSub ('VecS 'Float 3) TT a b))
1187 (PrimNormalize
1188 ('VecS 'Float 3)
1189 3
1190 TT
1191 (PrimCross
1192 ('VecS 'Float 3)
1193 TT
1194 c
1195 (PrimNormalize ('VecS 'Float 3) 3 TT (PrimSub ('VecS 'Float 3) TT a b)))))
1196 Sx)
1197 (swizzscalar
1198 'Float
1199 3
1200 (PrimCross
1201 ('VecS 'Float 3)
1202 TT
1203 (PrimNormalize ('VecS 'Float 3) 3 TT (PrimSub ('VecS 'Float 3) TT a b))
1204 (PrimNormalize
1205 ('VecS 'Float 3)
1206 3
1207 TT
1208 (PrimCross
1209 ('VecS 'Float 3)
1210 TT
1211 c
1212 (PrimNormalize ('VecS 'Float 3) 3 TT (PrimSub ('VecS 'Float 3) TT a b)))))
1213 Sy)
1214 (swizzscalar
1215 'Float
1216 3
1217 (PrimCross
1218 ('VecS 'Float 3)
1219 TT
1220 (PrimNormalize ('VecS 'Float 3) 3 TT (PrimSub ('VecS 'Float 3) TT a b))
1221 (PrimNormalize
1222 ('VecS 'Float 3)
1223 3
1224 TT
1225 (PrimCross
1226 ('VecS 'Float 3)
1227 TT
1228 c
1229 (PrimNormalize ('VecS 'Float 3) 3 TT (PrimSub ('VecS 'Float 3) TT a b)))))
1230 Sz)
1231 0.0)
1232 (V4
1233 (swizzscalar
1234 'Float
1235 3
1236 (PrimNormalize ('VecS 'Float 3) 3 TT (PrimSub ('VecS 'Float 3) TT a b))
1237 Sx)
1238 (swizzscalar
1239 'Float
1240 3
1241 (PrimNormalize ('VecS 'Float 3) 3 TT (PrimSub ('VecS 'Float 3) TT a b))
1242 Sy)
1243 (swizzscalar
1244 'Float
1245 3
1246 (PrimNormalize ('VecS 'Float 3) 3 TT (PrimSub ('VecS 'Float 3) TT a b))
1247 Sz)
1248 0.0)
1249 (V4 0.0 0.0 0.0 1.0))) 1163 (V4 0.0 0.0 0.0 1.0)))
1250 (M44F 1164 (translateBefore4 (neg a)))
1251 (V4 1.0 0.0 0.0 0.0)
1252 (V4 0.0 1.0 0.0 0.0)
1253 (V4 0.0 0.0 1.0 0.0)
1254 (V4
1255 (swizzscalar 'Float 3 (PrimNeg ('VecS 'Float 3) TT a) Sx)
1256 (swizzscalar 'Float 3 (PrimNeg ('VecS 'Float 3) TT a) Sy)
1257 (swizzscalar 'Float 3 (PrimNeg ('VecS 'Float 3) TT a) Sz)
1258 1.0)))
1259 1165
1260maroon :: VecS Float 4 1166maroon :: VecS Float 4
1261maroon = _rhs (V4 0.5 0.0 0.0 1.0) 1167maroon = _rhs (V4 0.5 0.0 0.0 1.0)
@@ -1275,7 +1181,7 @@ max = _rhs \a b c d e f g -> PrimMax a b c d e f g
1275mergeBy :: forall a . (a -> a -> Ordering) -> [a] -> [a] -> [a] 1181mergeBy :: forall a . (a -> a -> Ordering) -> [a] -> [a] -> [a]
1276mergeBy 1182mergeBy
1277 = \a -> primFix 1183 = \a -> primFix
1278 ((a -> a -> 'Ordering) -> [a] -> [a] -> [a]) 1184 _
1279 \b c d e -> case'List 1185 \b c d e -> case'List
1280 (\_ -> [a]) 1186 (\_ -> [a])
1281 (_rhs e) 1187 (_rhs e)
@@ -1353,188 +1259,31 @@ perspective
1353 = \a b c d -> _rhs 1259 = \a b c d -> _rhs
1354 (M44F 1260 (M44F
1355 (V4 1261 (V4
1356 (PrimDiv 1262 (2.0 * a
1357 'Float 1263 / (d * (a * PrimTan ('VecScalar 1 'Float) 1 TT (c / 2.0))
1358 'Float 1264 - (0.0 - (d * (a * PrimTan ('VecScalar 1 'Float) 1 TT (c / 2.0))))))
1359 1
1360 TT
1361 TT
1362 (PrimMul 'Float TT 2.0 a)
1363 (PrimSub
1364 'Float
1365 TT
1366 (PrimMul
1367 'Float
1368 TT
1369 d
1370 (PrimMul
1371 'Float
1372 TT
1373 a
1374 (PrimTan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c 2.0))))
1375 (PrimSub
1376 'Float
1377 TT
1378 0.0
1379 (PrimMul
1380 'Float
1381 TT
1382 d
1383 (PrimMul
1384 'Float
1385 TT
1386 a
1387 (PrimTan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c 2.0)))))))
1388 0.0 1265 0.0
1389 0.0 1266 0.0
1390 0.0) 1267 0.0)
1391 (V4 1268 (V4
1392 0.0 1269 0.0
1393 (PrimDiv 1270 (2.0 * a
1394 'Float 1271 / (a * PrimTan ('VecScalar 1 'Float) 1 TT (c / 2.0)
1395 'Float 1272 - (0.0 - (a * PrimTan ('VecScalar 1 'Float) 1 TT (c / 2.0)))))
1396 1
1397 TT
1398 TT
1399 (PrimMul 'Float TT 2.0 a)
1400 (PrimSub
1401 'Float
1402 TT
1403 (PrimMul
1404 'Float
1405 TT
1406 a
1407 (PrimTan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c 2.0)))
1408 (PrimSub
1409 'Float
1410 TT
1411 0.0
1412 (PrimMul
1413 'Float
1414 TT
1415 a
1416 (PrimTan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c 2.0))))))
1417 0.0 1273 0.0
1418 0.0) 1274 0.0)
1419 (V4 1275 (V4
1420 (PrimDiv 1276 (d * (a * PrimTan ('VecScalar 1 'Float) 1 TT (c / 2.0))
1421 'Float 1277 + (0.0 - (d * (a * PrimTan ('VecScalar 1 'Float) 1 TT (c / 2.0))))
1422 'Float 1278 / (d * (a * PrimTan ('VecScalar 1 'Float) 1 TT (c / 2.0))
1423 1 1279 - (0.0 - (d * (a * PrimTan ('VecScalar 1 'Float) 1 TT (c / 2.0))))))
1424 TT 1280 (a * PrimTan ('VecScalar 1 'Float) 1 TT (c / 2.0)
1425 TT 1281 + (0.0 - (a * PrimTan ('VecScalar 1 'Float) 1 TT (c / 2.0)))
1426 (PrimAdd 1282 / (a * PrimTan ('VecScalar 1 'Float) 1 TT (c / 2.0)
1427 'Float 1283 - (0.0 - (a * PrimTan ('VecScalar 1 'Float) 1 TT (c / 2.0)))))
1428 TT 1284 (0.0 - (b + a / (b - a)))
1429 (PrimMul 1285 (0.0 - 1.0))
1430 'Float 1286 (V4 0.0 0.0 (0.0 - (2.0 * b * a / (b - a))) 0.0))
1431 TT
1432 d
1433 (PrimMul
1434 'Float
1435 TT
1436 a
1437 (PrimTan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c 2.0))))
1438 (PrimSub
1439 'Float
1440 TT
1441 0.0
1442 (PrimMul
1443 'Float
1444 TT
1445 d
1446 (PrimMul
1447 'Float
1448 TT
1449 a
1450 (PrimTan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c 2.0))))))
1451 (PrimSub
1452 'Float
1453 TT
1454 (PrimMul
1455 'Float
1456 TT
1457 d
1458 (PrimMul
1459 'Float
1460 TT
1461 a
1462 (PrimTan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c 2.0))))
1463 (PrimSub
1464 'Float
1465 TT
1466 0.0
1467 (PrimMul
1468 'Float
1469 TT
1470 d
1471 (PrimMul
1472 'Float
1473 TT
1474 a
1475 (PrimTan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c 2.0)))))))
1476 (PrimDiv
1477 'Float
1478 'Float
1479 1
1480 TT
1481 TT
1482 (PrimAdd
1483 'Float
1484 TT
1485 (PrimMul
1486 'Float
1487 TT
1488 a
1489 (PrimTan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c 2.0)))
1490 (PrimSub
1491 'Float
1492 TT
1493 0.0
1494 (PrimMul
1495 'Float
1496 TT
1497 a
1498 (PrimTan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c 2.0)))))
1499 (PrimSub
1500 'Float
1501 TT
1502 (PrimMul
1503 'Float
1504 TT
1505 a
1506 (PrimTan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c 2.0)))
1507 (PrimSub
1508 'Float
1509 TT
1510 0.0
1511 (PrimMul
1512 'Float
1513 TT
1514 a
1515 (PrimTan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c 2.0))))))
1516 (PrimSub
1517 'Float
1518 TT
1519 0.0
1520 (PrimDiv 'Float 'Float 1 TT TT (PrimAdd 'Float TT b a) (PrimSub 'Float TT b a)))
1521 -1.0)
1522 (V4
1523 0.0
1524 0.0
1525 (PrimSub
1526 'Float
1527 TT
1528 0.0
1529 (PrimDiv
1530 'Float
1531 'Float
1532 1
1533 TT
1534 TT
1535 (PrimMul 'Float TT (PrimMul 'Float TT 2.0 b) a)
1536 (PrimSub 'Float TT b a)))
1537 0.0))
1538 1287
1539pi :: Float 1288pi :: Float
1540pi = _rhs 3.141592653589793 1289pi = _rhs 3.141592653589793
@@ -1547,47 +1296,43 @@ project
1547 . forall (c :: String) -> isKeyC c a b => RecordC b -> a 1296 . forall (c :: String) -> isKeyC c a b => RecordC b -> a
1548project 1297project
1549 = primFix 1298 = primFix
1550 (forall a (b :: [RecItem]) 1299 _
1551 . forall (c :: String) -> isKeyC c a b => 'RecordC b -> a) 1300 \a b c d _ e -> case'List
1552 \d e f g _ h -> case'List 1301 (\_ -> b)
1553 (\_ -> e) 1302 (_rhs (undefined b))
1554 (_rhs (undefined e)) 1303 (\f g -> case'RecItem
1555 (\i j -> case'RecItem 1304 (\_ -> b)
1556 (\_ -> e) 1305 (\h _ -> case'RecordC
1557 (\k _ -> case'RecordC 1306 (\_ -> b)
1558 (\_ -> e) 1307 (\i -> case'Bool
1559 (\l -> case'Bool 1308 (\_ -> b)
1560 (\_ -> e)
1561 (_rhs 1309 (_rhs
1562 (d 1310 (a
1563 e 1311 b
1564 j
1565 g 1312 g
1566 (undefined ('CW (isKeyC g e j))) 1313 d
1314 (undefined ('CW (isKeyC d b g)))
1567 (RecordCons 1315 (RecordCons
1568 (hlistConsCase 1316 (hlistConsCase
1569 e 1317 b
1570 (map 'RecItem Type recItemType j) 1318 (map recItemType g)
1571 ('HList (map 'RecItem Type recItemType j)) 1319 ('HList (map recItemType g))
1572 (\_ m -> m) 1320 (\_ j -> j)
1573 (unsafeCoerce 1321 (unsafeCoerce
1574 ('HList (map 'RecItem Type recItemType f)) 1322 ('HList (map recItemType c))
1575 ('HList (e : map 'RecItem Type recItemType j)) 1323 ('HList (b : map recItemType g))
1576 l))))) 1324 i)))))
1577 (_rhs 1325 (_rhs
1578 (hlistConsCase 1326 (hlistConsCase
1579 e 1327 b
1580 (map 'RecItem Type recItemType j) 1328 (map recItemType g)
1581 e 1329 b
1582 (\n _ -> n) 1330 (\k _ -> k)
1583 (unsafeCoerce 1331 (unsafeCoerce ('HList (map recItemType c)) ('HList (b : map recItemType g)) i)))
1584 ('HList (map 'RecItem Type recItemType f)) 1332 (isEQ (primCompareString d h)))
1585 ('HList (e : map 'RecItem Type recItemType j)) 1333 e)
1586 l))) 1334 f)
1587 (isEQ (primCompareString g k))) 1335 c
1588 h)
1589 i)
1590 f
1591 1336
1592purple :: VecS Float 4 1337purple :: VecS Float 4
1593purple = _rhs (V4 0.5 0.0 0.5 1.0) 1338purple = _rhs (V4 0.5 0.0 0.5 1.0)
@@ -1615,11 +1360,15 @@ rotMatrixX
1615 = \a -> _rhs 1360 = \a -> _rhs
1616 (M44F 1361 (M44F
1617 (V4 1.0 0.0 0.0 0.0) 1362 (V4 1.0 0.0 0.0 0.0)
1618 (V4 0.0 (PrimCos 'Float 1 TT a) (PrimSin 'Float 1 TT a) 0.0)
1619 (V4 1363 (V4
1620 0.0 1364 0.0
1621 (PrimSub 'Float TT 0.0 (PrimSin 'Float 1 TT a)) 1365 (PrimCos ('VecScalar 1 'Float) 1 TT a)
1622 (PrimCos 'Float 1 TT a) 1366 (PrimSin ('VecScalar 1 'Float) 1 TT a)
1367 0.0)
1368 (V4
1369 0.0
1370 (0.0 - PrimSin ('VecScalar 1 'Float) 1 TT a)
1371 (PrimCos ('VecScalar 1 'Float) 1 TT a)
1623 0.0) 1372 0.0)
1624 (V4 0.0 0.0 0.0 1.0)) 1373 (V4 0.0 0.0 0.0 1.0))
1625 1374
@@ -1628,22 +1377,30 @@ rotMatrixY
1628 = \a -> _rhs 1377 = \a -> _rhs
1629 (M44F 1378 (M44F
1630 (V4 1379 (V4
1631 (PrimCos 'Float 1 TT a) 1380 (PrimCos ('VecScalar 1 'Float) 1 TT a)
1632 0.0 1381 0.0
1633 (PrimSub 'Float TT 0.0 (PrimSin 'Float 1 TT a)) 1382 (0.0 - PrimSin ('VecScalar 1 'Float) 1 TT a)
1634 0.0) 1383 0.0)
1635 (V4 0.0 1.0 0.0 0.0) 1384 (V4 0.0 1.0 0.0 0.0)
1636 (V4 (PrimSin 'Float 1 TT a) 0.0 (PrimCos 'Float 1 TT a) 0.0) 1385 (V4
1386 (PrimSin ('VecScalar 1 'Float) 1 TT a)
1387 0.0
1388 (PrimCos ('VecScalar 1 'Float) 1 TT a)
1389 0.0)
1637 (V4 0.0 0.0 0.0 1.0)) 1390 (V4 0.0 0.0 0.0 1.0))
1638 1391
1639rotMatrixZ :: VecScalar 1 Float -> Mat 4 4 Float 1392rotMatrixZ :: VecScalar 1 Float -> Mat 4 4 Float
1640rotMatrixZ 1393rotMatrixZ
1641 = \a -> _rhs 1394 = \a -> _rhs
1642 (M44F 1395 (M44F
1643 (V4 (PrimCos 'Float 1 TT a) (PrimSin 'Float 1 TT a) 0.0 0.0)
1644 (V4 1396 (V4
1645 (PrimSub 'Float TT 0.0 (PrimSin 'Float 1 TT a)) 1397 (PrimCos ('VecScalar 1 'Float) 1 TT a)
1646 (PrimCos 'Float 1 TT a) 1398 (PrimSin ('VecScalar 1 'Float) 1 TT a)
1399 0.0
1400 0.0)
1401 (V4
1402 (0.0 - PrimSin ('VecScalar 1 'Float) 1 TT a)
1403 (PrimCos ('VecScalar 1 'Float) 1 TT a)
1647 0.0 1404 0.0
1648 0.0) 1405 0.0)
1649 (V4 0.0 0.0 1.0 0.0) 1406 (V4 0.0 0.0 1.0 0.0)
@@ -1652,43 +1409,7 @@ rotMatrixZ
1652rotationEuler :: Float -> Float -> Float -> Mat 4 4 Float 1409rotationEuler :: Float -> Float -> Float -> Mat 4 4 Float
1653rotationEuler 1410rotationEuler
1654 = \a b c -> _rhs 1411 = \a b c -> _rhs
1655 (PrimMulMatMat 1412 (PrimMulMatMat 4 4 'Float 4 (rotMatrixY a .*. rotMatrixX b) (rotMatrixZ c))
1656 4
1657 4
1658 'Float
1659 4
1660 (PrimMulMatMat
1661 4
1662 4
1663 'Float
1664 4
1665 (M44F
1666 (V4
1667 (PrimCos 'Float 1 TT a)
1668 0.0
1669 (PrimSub 'Float TT 0.0 (PrimSin 'Float 1 TT a))
1670 0.0)
1671 (V4 0.0 1.0 0.0 0.0)
1672 (V4 (PrimSin 'Float 1 TT a) 0.0 (PrimCos 'Float 1 TT a) 0.0)
1673 (V4 0.0 0.0 0.0 1.0))
1674 (M44F
1675 (V4 1.0 0.0 0.0 0.0)
1676 (V4 0.0 (PrimCos 'Float 1 TT b) (PrimSin 'Float 1 TT b) 0.0)
1677 (V4
1678 0.0
1679 (PrimSub 'Float TT 0.0 (PrimSin 'Float 1 TT b))
1680 (PrimCos 'Float 1 TT b)
1681 0.0)
1682 (V4 0.0 0.0 0.0 1.0)))
1683 (M44F
1684 (V4 (PrimCos 'Float 1 TT c) (PrimSin 'Float 1 TT c) 0.0 0.0)
1685 (V4
1686 (PrimSub 'Float TT 0.0 (PrimSin 'Float 1 TT c))
1687 (PrimCos 'Float 1 TT c)
1688 0.0
1689 0.0)
1690 (V4 0.0 0.0 1.0 0.0)
1691 (V4 0.0 0.0 0.0 1.0)))
1692 1413
1693round :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> a 1414round :: forall a (b :: Nat) . (a ~ VecScalar b Float) => a -> a
1694round = _rhs \a b c d -> PrimRound a b c d 1415round = _rhs \a b c d -> PrimRound a b c d
@@ -1751,27 +1472,21 @@ sndTup = \a b -> _rhs \c -> hlistConsCase a b ('HList b) (\_ d -> d) c
1751sortBy :: forall a . (a -> a -> Ordering) -> [a] -> [a] 1472sortBy :: forall a . (a -> a -> Ordering) -> [a] -> [a]
1752sortBy 1473sortBy
1753 = \a -> primFix 1474 = \a -> primFix
1754 ((a -> a -> 'Ordering) -> [a] -> [a]) 1475 _
1755 \b c d -> case'List 1476 \b c d -> case'List
1756 (\_ -> [a]) 1477 (\_ -> [a])
1757 (_rhs []) 1478 (_rhs [])
1758 (\e f -> case'List 1479 (\e f -> case'List
1759 (\_ -> [a]) 1480 (\_ -> [a])
1760 (_rhs [e]) 1481 (_rhs [e])
1761 (\_ _ -> _rhs 1482 (\_ _ -> _rhs (uncurry (mergeBy c) ((b c *** b c) (split d))))
1762 (uncurry
1763 [a]
1764 [a]
1765 [a]
1766 (mergeBy a c)
1767 (([a] *** [a]) [a] [a] (b c) (b c) (split a d))))
1768 f) 1483 f)
1769 d 1484 d
1770 1485
1771split :: forall a . [a] -> ([a], [a]) 1486split :: forall a . [a] -> ([a], [a])
1772split 1487split
1773 = \a -> primFix 1488 = \a -> primFix
1774 ([a] -> ' ([a], [a])) 1489 _
1775 \b c -> case'List 1490 \b c -> case'List
1776 (\_ -> ' ([a], [a])) 1491 (\_ -> ' ([a], [a]))
1777 (_rhs ([], [])) 1492 (_rhs ([], []))
@@ -1843,39 +1558,39 @@ uncurry
1843unzip :: forall a b . [(a, b)] -> ([a], [b]) 1558unzip :: forall a b . [(a, b)] -> ([a], [b])
1844unzip 1559unzip
1845 = primFix 1560 = primFix
1846 (forall a b . [' (a, b)] -> ' ([a], [b])) 1561 _
1847 \c d e f -> case'List 1562 \a b c d -> case'List
1848 (\_ -> ' ([d], [e])) 1563 (\_ -> ' ([b], [c]))
1849 (_rhs ([], [])) 1564 (_rhs ([], []))
1850 (\g h -> hlistConsCase 1565 (\e f -> hlistConsCase
1851 d 1566 b
1852 [e] 1567 [c]
1853 ' ([d], [e]) 1568 ' ([b], [c])
1854 (\i j -> hlistConsCase 1569 (\g h -> hlistConsCase
1855 e 1570 c
1856 [] 1571 []
1857 ' ([d], [e]) 1572 ' ([b], [c])
1858 (\k l -> hlistNilCase 1573 (\i j -> hlistNilCase
1859 ' ([d], [e]) 1574 ' ([b], [c])
1860 (_rhs 1575 (_rhs
1861 (i 1576 (g
1862 : hlistConsCase 1577 : hlistConsCase
1863 [d] 1578 [b]
1864 [[e]] 1579 [[c]]
1865 [d] 1580 [b]
1866 (\m n -> hlistConsCase [e] [] [d] (\_ o -> hlistNilCase [d] m o) n) 1581 (\k l -> hlistConsCase [c] [] [b] (\_ m -> hlistNilCase [b] k m) l)
1867 (c d e h) 1582 (a b c f)
1868 , k 1583 , i
1869 : hlistConsCase 1584 : hlistConsCase
1870 [d] 1585 [b]
1871 [[e]] 1586 [[c]]
1872 [e] 1587 [c]
1873 (\_ p -> hlistConsCase [e] [] [e] (\q r -> hlistNilCase [e] q r) p) 1588 (\_ n -> hlistConsCase [c] [] [c] (\o p -> hlistNilCase [c] o p) n)
1874 (c d e h))) 1589 (a b c f)))
1875 l) 1590 j)
1876 j) 1591 h)
1877 g) 1592 e)
1878 f 1593 d
1879 1594
1880v3FToV4F :: Vec 3 Float -> VecS Float 4 1595v3FToV4F :: Vec 3 Float -> VecS Float 4
1881v3FToV4F 1596v3FToV4F
@@ -1901,16 +1616,16 @@ yellow = _rhs (V4 1.0 1.0 0.0 1.0)
1901zip :: forall a b . [a] -> [b] -> [(a, b)] 1616zip :: forall a b . [a] -> [b] -> [(a, b)]
1902zip 1617zip
1903 = primFix 1618 = primFix
1904 (forall a b . [a] -> [b] -> [' (a, b)]) 1619 _
1905 \c d e f g -> case'List 1620 \a b c d e -> case'List
1906 (\_ -> [' (d, e)]) 1621 (\_ -> [' (b, c)])
1907 (_rhs []) 1622 (_rhs [])
1908 (\h i -> case'List 1623 (\f g -> case'List
1909 (\_ -> [' (d, e)]) 1624 (\_ -> [' (b, c)])
1910 (_rhs []) 1625 (_rhs [])
1911 (\j k -> _rhs ((h, j) : c d e i k)) 1626 (\h i -> _rhs ((f, h) : a b c g i))
1912 g) 1627 e)
1913 f 1628 d
1914 1629
1915|| :: Bool -> Bool -> Bool 1630|| :: Bool -> Bool -> Bool
1916|| = \a b -> _rhs (PrimOr a b) 1631|| = \a b -> _rhs (PrimOr a b)
@@ -1978,8 +1693,6 @@ testdata/Prelude.lc 31:8-31:11
1978 Type 1693 Type
1979testdata/Prelude.lc 31:8-31:29 1694testdata/Prelude.lc 31:8-31:29
1980 Type | Type 1695 Type | Type
1981testdata/Prelude.lc 31:8-34:39
1982 forall a b . [a] -> [b] -> [(a, b)]
1983testdata/Prelude.lc 31:9-31:10 1696testdata/Prelude.lc 31:9-31:10
1984 _d 1697 _d
1985testdata/Prelude.lc 31:15-31:18 1698testdata/Prelude.lc 31:15-31:18
@@ -2034,8 +1747,6 @@ testdata/Prelude.lc 36:10-36:17
2034 Type 1747 Type
2035testdata/Prelude.lc 36:10-36:30 1748testdata/Prelude.lc 36:10-36:30
2036 Type | Type 1749 Type | Type
2037testdata/Prelude.lc 36:10-39:27
2038 forall a b . [(a, b)] -> ([a], [b])
2039testdata/Prelude.lc 36:11-36:16 1750testdata/Prelude.lc 36:11-36:16
2040 Type 1751 Type
2041testdata/Prelude.lc 36:12-36:13 1752testdata/Prelude.lc 36:12-36:13
@@ -2376,8 +2087,6 @@ testdata/Prelude.lc 71:67-71:69
2376 _k 2087 _k
2377testdata/Prelude.lc 73:12-73:32 2088testdata/Prelude.lc 73:12-73:32
2378 Type 2089 Type
2379testdata/Prelude.lc 73:12-74:35
2380 forall a . (a -> a) -> a -> [a]
2381testdata/Prelude.lc 73:13-73:14 2090testdata/Prelude.lc 73:13-73:14
2382 _b 2091 _b
2383testdata/Prelude.lc 73:18-73:19 2092testdata/Prelude.lc 73:18-73:19
@@ -2470,8 +2179,8 @@ testdata/Prelude.lc 126:21-126:30
2470testdata/Prelude.lc 126:22-126:29 2179testdata/Prelude.lc 126:22-126:29
2471 Type | Type | Type 2180 Type | Type | Type
2472testdata/Prelude.lc 127:7-127:17 2181testdata/Prelude.lc 127:7-127:17
2473 forall (a :: [RecItem]) 2182 forall (a :: [RecItem]) . HList (map recItemType a) -> RecordC a | RecordC
2474 . HList (map RecItem Type recItemType a) -> RecordC a | RecordC _c | Type | Type 2183 _c | Type | Type
2475testdata/Prelude.lc 127:19-127:24 2184testdata/Prelude.lc 127:19-127:24
2476 [Type] -> Type 2185 [Type] -> Type
2477testdata/Prelude.lc 127:19-127:45 2186testdata/Prelude.lc 127:19-127:45
@@ -2548,9 +2257,6 @@ testdata/Prelude.lc 133:10-133:37
2548 HList (_b : _a) -> HList _a 2257 HList (_b : _a) -> HList _a
2549testdata/Prelude.lc 133:35-133:36 2258testdata/Prelude.lc 133:35-133:36
2550 HList _d 2259 HList _d
2551testdata/Prelude.lc 136:12-138:186
2552 forall a (b :: [RecItem])
2553 . forall (c :: String) -> isKeyC c a b => RecordC b -> a
2554testdata/Prelude.lc 136:28-136:37 2260testdata/Prelude.lc 136:28-136:37
2555 Type 2261 Type
2556testdata/Prelude.lc 136:28-136:97 2262testdata/Prelude.lc 136:28-136:97
@@ -2613,9 +2319,9 @@ testdata/Prelude.lc 137:75-137:87
2613testdata/Prelude.lc 137:75-137:90 2319testdata/Prelude.lc 137:75-137:90
2614 forall a . _a -> a 2320 forall a . _a -> a
2615testdata/Prelude.lc 137:75-137:125 2321testdata/Prelude.lc 137:75-137:125
2616 _a -> HList (_q : map RecItem Type recItemType _j) 2322 _a -> HList (_q : map recItemType _j)
2617testdata/Prelude.lc 137:75-137:128 2323testdata/Prelude.lc 137:75-137:128
2618 HList (_n : map RecItem Type recItemType _g) 2324 HList (_n : map recItemType _g)
2619testdata/Prelude.lc 137:93-137:98 2325testdata/Prelude.lc 137:93-137:98
2620 [Type] -> Type 2326 [Type] -> Type
2621testdata/Prelude.lc 137:93-137:124 2327testdata/Prelude.lc 137:93-137:124
@@ -2639,7 +2345,7 @@ testdata/Prelude.lc 137:109-137:120
2639testdata/Prelude.lc 137:121-137:123 2345testdata/Prelude.lc 137:121-137:123
2640 [RecItem] 2346 [RecItem]
2641testdata/Prelude.lc 137:126-137:128 2347testdata/Prelude.lc 137:126-137:128
2642 HList (map RecItem Type recItemType _d) 2348 HList (map recItemType _d)
2643testdata/Prelude.lc 138:57-138:64 2349testdata/Prelude.lc 138:57-138:64
2644 forall a (b :: [RecItem]) 2350 forall a (b :: [RecItem])
2645 . forall (c :: String) -> isKeyC c a b => RecordC b -> a 2351 . forall (c :: String) -> isKeyC c a b => RecordC b -> a
@@ -2683,21 +2389,21 @@ testdata/Prelude.lc 138:101-138:102
2683testdata/Prelude.lc 138:103-138:105 2389testdata/Prelude.lc 138:103-138:105
2684 [RecItem] 2390 [RecItem]
2685testdata/Prelude.lc 138:110-138:120 2391testdata/Prelude.lc 138:110-138:120
2686 forall (a :: [RecItem]) . HList (map RecItem Type recItemType a) -> RecordC a 2392 forall (a :: [RecItem]) . HList (map recItemType a) -> RecordC a
2687testdata/Prelude.lc 138:110-138:185 2393testdata/Prelude.lc 138:110-138:185
2688 RecordC _b 2394 RecordC _b
2689testdata/Prelude.lc 138:122-138:128 2395testdata/Prelude.lc 138:122-138:128
2690 forall a (b :: [Type]) . HList (a : b) -> HList b 2396 forall a (b :: [Type]) . HList (a : b) -> HList b
2691testdata/Prelude.lc 138:122-138:184 2397testdata/Prelude.lc 138:122-138:184
2692 HList (map RecItem Type recItemType _h) 2398 HList (map recItemType _h)
2693testdata/Prelude.lc 138:130-138:142 2399testdata/Prelude.lc 138:130-138:142
2694 forall a b . a -> b 2400 forall a b . a -> b
2695testdata/Prelude.lc 138:130-138:145 2401testdata/Prelude.lc 138:130-138:145
2696 forall a . _a -> a 2402 forall a . _a -> a
2697testdata/Prelude.lc 138:130-138:180 2403testdata/Prelude.lc 138:130-138:180
2698 _a -> HList (_r : map RecItem Type recItemType _k) 2404 _a -> HList (_r : map recItemType _k)
2699testdata/Prelude.lc 138:130-138:183 2405testdata/Prelude.lc 138:130-138:183
2700 HList (_o : map RecItem Type recItemType _h) 2406 HList (_o : map recItemType _h)
2701testdata/Prelude.lc 138:148-138:153 2407testdata/Prelude.lc 138:148-138:153
2702 [Type] -> Type 2408 [Type] -> Type
2703testdata/Prelude.lc 138:148-138:179 2409testdata/Prelude.lc 138:148-138:179
@@ -2721,7 +2427,7 @@ testdata/Prelude.lc 138:164-138:175
2721testdata/Prelude.lc 138:176-138:178 2427testdata/Prelude.lc 138:176-138:178
2722 [RecItem] 2428 [RecItem]
2723testdata/Prelude.lc 138:181-138:183 2429testdata/Prelude.lc 138:181-138:183
2724 HList (map RecItem Type recItemType _e) 2430 HList (map recItemType _e)
2725testdata/Prelude.lc 142:1-142:4 2431testdata/Prelude.lc 142:1-142:4
2726 Float -> Float -> Float -> VecS Float 4 2432 Float -> Float -> Float -> VecS Float 4
2727testdata/Prelude.lc 142:13-142:15 2433testdata/Prelude.lc 142:13-142:15
@@ -4674,8 +4380,6 @@ testdata/Prelude.lc 380:26-380:29
4674 Float 4380 Float
4675testdata/Prelude.lc 382:11-382:16 4381testdata/Prelude.lc 382:11-382:16
4676 Type 4382 Type
4677testdata/Prelude.lc 382:11-385:38
4678 Float -> Float -> [Float]
4679testdata/Prelude.lc 382:20-382:25 4383testdata/Prelude.lc 382:20-382:25
4680 Type 4384 Type
4681testdata/Prelude.lc 382:20-382:36 4385testdata/Prelude.lc 382:20-382:36
@@ -4733,8 +4437,6 @@ testdata/Prelude.lc 387:9-387:12
4733 Type 4437 Type
4734testdata/Prelude.lc 387:9-387:24 4438testdata/Prelude.lc 387:9-387:24
4735 Type 4439 Type
4736testdata/Prelude.lc 387:9-389:30
4737 forall a . [a] -> Int -> a
4738testdata/Prelude.lc 387:10-387:11 4440testdata/Prelude.lc 387:10-387:11
4739 _b 4441 _b
4740testdata/Prelude.lc 387:16-387:19 4442testdata/Prelude.lc 387:16-387:19
diff --git a/testdata/Spiral.out b/testdata/Spiral.out
index 070dbd1c..497bffbd 100644
--- a/testdata/Spiral.out
+++ b/testdata/Spiral.out
@@ -35,6 +35,9 @@ Pipeline
35 vec4 scale(float z0,vec4 z1) { 35 vec4 scale(float z0,vec4 z1) {
36 return (z1) * (vec4 (z0,z0,z0,1.0)); 36 return (z1) * (vec4 (z0,z0,z0,1.0));
37 } 37 }
38 vec4 v3FToV4F(vec3 z0) {
39 return vec4 ((z0).x,(z0).y,(z0).z,1.0);
40 }
38 void main() { 41 void main() {
39 gl_Position = scale (0.5 42 gl_Position = scale (0.5
40 ,(MVP) * (vec4 ((exp ((((Mouse).x) - (0.5)) * ((vi1).x))) * (sin 43 ,(MVP) * (vec4 ((exp ((((Mouse).x) - (0.5)) * ((vi1).x))) * (sin
@@ -42,7 +45,7 @@ Pipeline
42 ,(exp ((((Mouse).x) - (0.5)) * ((vi1).x))) * (cos ((0.9) * ((vi1).x))) 45 ,(exp ((((Mouse).x) - (0.5)) * ((vi1).x))) * (cos ((0.9) * ((vi1).x)))
43 ,((Mouse).y) * ((0.9) * ((vi1).x)) 46 ,((Mouse).y) * ((0.9) * ((vi1).x))
44 ,1.0))); 47 ,1.0)));
45 vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); 48 vo1 = v3FToV4F (vi1);
46 } 49 }
47 """ 50 """
48 , geometryShader = Nothing 51 , geometryShader = Nothing
diff --git a/testdata/ambig.out b/testdata/ambig.out
index c78ba1de..497fbffe 100644
--- a/testdata/ambig.out
+++ b/testdata/ambig.out
@@ -6,28 +6,25 @@ h
6 \(a :: _) (b :: _) (_ :: _) -> _rhs 6 \(a :: _) (b :: _) (_ :: _) -> _rhs
7 let 7 let
8 c 8 c
9 = _lhs 9 = (\(d :: _) -> hlistConsCase
10 x 10 _
11 (_rhs 11 (\(e :: _) (f :: _) -> hlistConsCase
12 ((\(d :: _) -> hlistConsCase 12 _
13 _ 13 (\(g :: _) (h :: _) -> hlistNilCase _ (a e g) h)
14 (\(e :: _) (f :: _) -> hlistConsCase 14 f)
15 _ 15 d)
16 (\(g :: _) (h :: _) -> hlistNilCase _ (a e g) h) 16 b
17 f)
18 d)
19 b))
20 in c 17 in c
21------------ core code 18------------ core code
22h :: forall a b c d . (b -> d -> c) -> (b, d) -> a -> c 19h :: forall a b c d . (b -> d -> c) -> (b, d) -> a -> c
23h 20h
24 = \_ a b c d e _ -> _rhs 21 = \a b c d e f _ -> _rhs
25 (hlistConsCase 22 (hlistConsCase
26 a
27 [c]
28 b 23 b
29 (\f g -> hlistConsCase c [] b (\h i -> hlistNilCase b (d f h) i) g) 24 [d]
30 e) 25 c
26 (\g h -> hlistConsCase d [] c (\i j -> hlistNilCase c (e g i) j) h)
27 f)
31------------ tooltips 28------------ tooltips
32testdata/ambig.lc 4:1-4:2 29testdata/ambig.lc 4:1-4:2
33 forall a b c d . (b -> d -> c) -> (b, d) -> a -> c 30 forall a b c d . (b -> d -> c) -> (b, d) -> a -> c
diff --git a/testdata/complex.out b/testdata/complex.out
index 4bcb401b..f683c450 100644
--- a/testdata/complex.out
+++ b/testdata/complex.out
@@ -36,7 +36,7 @@ toPolar
36 \(a :: _) -> case'Complex 36 \(a :: _) -> case'Complex
37 (\(_ :: _) (_ :: _) -> _) 37 (\(_ :: _) (_ :: _) -> _)
38 (\(b :: _) (c :: _) -> _rhs 38 (\(b :: _) (c :: _) -> _rhs
39 let d = _lhs r (_rhs (sqrt (b * b + c * c))) in primIfThenElse 39 let d = sqrt (b * b + c * c) in primIfThenElse
40 (b > 0.0) 40 (b > 0.0)
41 (polar d (atan (c / b))) 41 (polar d (atan (c / b)))
42 (primIfThenElse 42 (primIfThenElse
@@ -145,7 +145,7 @@ add
145 (\_ _ -> 'Complex a) 145 (\_ _ -> 'Complex a)
146 (\_ e f -> case'Complex 146 (\_ e f -> case'Complex
147 (\_ _ -> 'Complex a) 147 (\_ _ -> 'Complex a)
148 (\_ g h -> _rhs (Complex a (PrimAdd 'Float TT e g) (PrimAdd 'Float TT f h))) 148 (\_ g h -> _rhs (Complex a (e + g) (f + h)))
149 b 149 b
150 d) 150 d)
151 a 151 a
@@ -161,12 +161,7 @@ cabs
161 (\_ -> 'Float) 161 (\_ -> 'Float)
162 (case'Complex 162 (case'Complex
163 (\_ _ -> 'Float) 163 (\_ _ -> 'Float)
164 (\_ c d -> _rhs 164 (\_ c d -> _rhs (PrimSqrt ('VecScalar 1 'Float) 1 TT (c * c + (d * d))))
165 (PrimSqrt
166 'Float
167 1
168 TT
169 (PrimAdd 'Float TT (PrimMul 'Float TT c c) (PrimMul 'Float TT d d))))
170 a 165 a
171 b) 166 b)
172 (case'Complex (\_ _ -> 'Float) (\_ e _ -> _rhs e) a b) 167 (case'Complex (\_ _ -> 'Float) (\_ e _ -> _rhs e) a b)
@@ -188,90 +183,20 @@ it_should_fail :: forall (a :: Repr) . Complex a -> Float
188it_should_fail = \a b -> case'Complex (\_ _ -> 'Float) (\_ c _ -> _rhs c) a b 183it_should_fail = \a b -> case'Complex (\_ _ -> 'Float) (\_ c _ -> _rhs c) a b
189 184
190iter :: forall (a :: Repr) . Complex a -> Complex a 185iter :: forall (a :: Repr) . Complex a -> Complex a
191iter = _rhs s4 186iter = _rhs \a -> s4
192 187
193mandel :: forall (a :: Repr) . Complex a -> VecScalar 1 Bool 188mandel :: forall (a :: Repr) . Complex a -> VecScalar 1 Bool
194mandel 189mandel
195 = \a b -> _rhs 190 = \a b -> _rhs
196 (PrimLessThan 191 (PrimLessThan
197 'Float 192 ('VecScalar 1 'Float)
198 1 193 1
199 'Float 194 'Float
200 'Bool 195 ('VecScalar 1 'Bool)
201 TT 196 TT
202 TT 197 TT
203 TT 198 TT
204 (cabs 199 (cabs a (s4 b))
205 a
206 (add
207 a
208 a
209 (mul
210 a
211 a
212 (add
213 a
214 a
215 (mul
216 a
217 a
218 (add
219 a
220 a
221 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
222 (add a a (mul a a b b) b))
223 (add
224 a
225 a
226 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
227 (add a a (mul a a b b) b)))
228 (add
229 a
230 a
231 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
232 (add a a (mul a a b b) b)))
233 (add
234 a
235 a
236 (mul
237 a
238 a
239 (add
240 a
241 a
242 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
243 (add a a (mul a a b b) b))
244 (add
245 a
246 a
247 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
248 (add a a (mul a a b b) b)))
249 (add
250 a
251 a
252 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
253 (add a a (mul a a b b) b))))
254 (add
255 a
256 a
257 (mul
258 a
259 a
260 (add
261 a
262 a
263 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
264 (add a a (mul a a b b) b))
265 (add
266 a
267 a
268 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
269 (add a a (mul a a b b) b)))
270 (add
271 a
272 a
273 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
274 (add a a (mul a a b b) b)))))
275 2.0) 200 2.0)
276 201
277match'Complex 202match'Complex
@@ -292,11 +217,7 @@ mul
292 (\_ _ -> 'Complex a) 217 (\_ _ -> 'Complex a)
293 (\_ e f -> case'Complex 218 (\_ e f -> case'Complex
294 (\_ _ -> 'Complex a) 219 (\_ _ -> 'Complex a)
295 (\_ g h -> _rhs 220 (\_ g h -> _rhs (Complex a (e * g - (f * h)) (f * g + (e * h))))
296 (Complex
297 a
298 (PrimSub 'Float TT (PrimMul 'Float TT e g) (PrimMul 'Float TT f h))
299 (PrimAdd 'Float TT (PrimMul 'Float TT f g) (PrimMul 'Float TT e h))))
300 b 221 b
301 d) 222 d)
302 a 223 a
@@ -321,75 +242,7 @@ s = \a b -> _rhs (add a a (mul a a b b) b)
321s4 :: forall (a :: Repr) . Complex a -> Complex a 242s4 :: forall (a :: Repr) . Complex a -> Complex a
322s4 243s4
323 = \a b -> _rhs 244 = \a b -> _rhs
324 (add 245 (add a a (mul a a (s a (s a (s a b))) (s a (s a (s a b)))) (s a (s a (s a b))))
325 a
326 a
327 (mul
328 a
329 a
330 (add
331 a
332 a
333 (mul
334 a
335 a
336 (add
337 a
338 a
339 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
340 (add a a (mul a a b b) b))
341 (add
342 a
343 a
344 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
345 (add a a (mul a a b b) b)))
346 (add
347 a
348 a
349 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
350 (add a a (mul a a b b) b)))
351 (add
352 a
353 a
354 (mul
355 a
356 a
357 (add
358 a
359 a
360 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
361 (add a a (mul a a b b) b))
362 (add
363 a
364 a
365 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
366 (add a a (mul a a b b) b)))
367 (add
368 a
369 a
370 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
371 (add a a (mul a a b b) b))))
372 (add
373 a
374 a
375 (mul
376 a
377 a
378 (add
379 a
380 a
381 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
382 (add a a (mul a a b b) b))
383 (add
384 a
385 a
386 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
387 (add a a (mul a a b b) b)))
388 (add
389 a
390 a
391 (mul a a (add a a (mul a a b b) b) (add a a (mul a a b b) b))
392 (add a a (mul a a b b) b))))
393 246
394toNormal :: Complex 'Polar -> Complex 'Normal 247toNormal :: Complex 'Polar -> Complex 'Normal
395toNormal 248toNormal
@@ -398,8 +251,8 @@ toNormal
398 (\_ b c -> _rhs 251 (\_ b c -> _rhs
399 (Complex 252 (Complex
400 Normal 253 Normal
401 (PrimMul 'Float TT b (PrimCos 'Float 1 TT c)) 254 (b * PrimCos ('VecScalar 1 'Float) 1 TT c)
402 (PrimMul 'Float TT b (PrimSin 'Float 1 TT c)))) 255 (b * PrimSin ('VecScalar 1 'Float) 1 TT c)))
403 Polar 256 Polar
404 a 257 a
405 258
@@ -410,75 +263,32 @@ toPolar
410 (\_ b c -> _rhs 263 (\_ b c -> _rhs
411 (primIfThenElse 264 (primIfThenElse
412 ('Complex Polar) 265 ('Complex Polar)
413 (PrimGreaterThan 'Float 1 'Float 'Bool TT TT TT b 0.0) 266 (b > 0.0)
414 (Complex 267 (polar
415 Polar 268 (PrimSqrt ('VecScalar 1 'Float) 1 TT (b * b + (c * c)))
416 (PrimSqrt 269 (PrimATan ('VecScalar 1 'Float) 1 TT (c / b)))
417 'Float
418 1
419 TT
420 (PrimAdd 'Float TT (PrimMul 'Float TT b b) (PrimMul 'Float TT c c)))
421 (PrimATan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c b)))
422 (primIfThenElse 270 (primIfThenElse
423 ('Complex Polar) 271 ('Complex Polar)
424 (PrimAnd 272 (b < 0.0 && (c >= 0.0))
425 (PrimLessThan 'Float 1 'Float 'Bool TT TT TT b 0.0) 273 (polar
426 (PrimGreaterThanEqual 'Float 1 'Float 'Bool TT TT TT c 0.0)) 274 (PrimSqrt ('VecScalar 1 'Float) 1 TT (b * b + (c * c)))
427 (Complex 275 (PrimATan ('VecScalar 1 'Float) 1 TT (c / b) + pi))
428 Polar
429 (PrimSqrt
430 'Float
431 1
432 TT
433 (PrimAdd 'Float TT (PrimMul 'Float TT b b) (PrimMul 'Float TT c c)))
434 (PrimAdd
435 'Float
436 TT
437 (PrimATan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c b))
438 3.141592653589793))
439 (primIfThenElse 276 (primIfThenElse
440 ('Complex Polar) 277 ('Complex Polar)
441 (PrimAnd 278 (b < 0.0 && (c < 0.0))
442 (PrimLessThan 'Float 1 'Float 'Bool TT TT TT b 0.0) 279 (polar
443 (PrimLessThan 'Float 1 'Float 'Bool TT TT TT c 0.0)) 280 (PrimSqrt ('VecScalar 1 'Float) 1 TT (b * b + (c * c)))
444 (Complex 281 (PrimATan ('VecScalar 1 'Float) 1 TT (c / b) - pi))
445 Polar
446 (PrimSqrt
447 'Float
448 1
449 TT
450 (PrimAdd 'Float TT (PrimMul 'Float TT b b) (PrimMul 'Float TT c c)))
451 (PrimSub
452 'Float
453 TT
454 (PrimATan 'Float 1 TT (PrimDiv 'Float 'Float 1 TT TT c b))
455 3.141592653589793))
456 (primIfThenElse 282 (primIfThenElse
457 ('Complex Polar) 283 ('Complex Polar)
458 (PrimAnd 284 (b == 0.0 && (c >= 0.0))
459 (isEQ (primCompareFloat b 0.0)) 285 (polar (PrimSqrt ('VecScalar 1 'Float) 1 TT (b * b + (c * c))) (pi / 2.0))
460 (PrimGreaterThanEqual 'Float 1 'Float 'Bool TT TT TT c 0.0))
461 (Complex
462 Polar
463 (PrimSqrt
464 'Float
465 1
466 TT
467 (PrimAdd 'Float TT (PrimMul 'Float TT b b) (PrimMul 'Float TT c c)))
468 1.5707963267948966)
469 (primIfThenElse 286 (primIfThenElse
470 ('Complex Polar) 287 ('Complex Polar)
471 (PrimAnd 288 (b == 0.0 && (c < 0.0))
472 (isEQ (primCompareFloat b 0.0)) 289 (polar
473 (PrimLessThan 'Float 1 'Float 'Bool TT TT TT c 0.0)) 290 (PrimSqrt ('VecScalar 1 'Float) 1 TT (b * b + (c * c)))
474 (Complex 291 (0.0 - (pi / 2.0)))
475 Polar
476 (PrimSqrt
477 'Float
478 1
479 TT
480 (PrimAdd 'Float TT (PrimMul 'Float TT b b) (PrimMul 'Float TT c c)))
481 -1.5707963267948966)
482 (undefined ('Complex Polar)))))))) 292 (undefined ('Complex Polar))))))))
483 Normal 293 Normal
484 a 294 a
diff --git a/testdata/concatmap01.out b/testdata/concatmap01.out
index 907c0397..32ff3d68 100644
--- a/testdata/concatmap01.out
+++ b/testdata/concatmap01.out
@@ -21,7 +21,7 @@ main
21 a)) 21 a))
22------------ core code 22------------ core code
23a :: [Float] 23a :: [Float]
24a = _rhs [1.0] 24a = _rhs (1.0 : [] ++ foldr (++) [] (map (\a -> [a]) []))
25 25
26main :: Bool 26main :: Bool
27main = _rhs True 27main = _rhs True
diff --git a/testdata/data.out b/testdata/data.out
index d0e3b82f..579344d4 100644
--- a/testdata/data.out
+++ b/testdata/data.out
@@ -112,30 +112,30 @@ Data53 = <<2nd constructor of 'Data5>>
112 112
113a5 :: forall a b c . Data5 a b c -> a 113a5 :: forall a b c . Data5 a b c -> a
114a5 114a5
115 = \a _ _ b -> case'Data5 115 = \a b c d -> case'Data5
116 (\_ -> a) 116 (\_ -> a)
117 (\c -> _rhs c) 117 (\e -> _rhs e)
118 (\d _ _ -> _rhs d) 118 (\f _ _ -> _rhs f)
119 (\_ _ _ _ _ -> _rhs (undefined a)) 119 (\_ _ _ _ _ -> _rhs (undefined a))
120 b 120 d
121 121
122b5 :: forall a b c . Data5 a b c -> b 122b5 :: forall a b c . Data5 a b c -> b
123b5 123b5
124 = \_ a _ b -> case'Data5 124 = \a b c d -> case'Data5
125 (\_ -> a) 125 (\_ -> b)
126 (\_ -> _rhs (undefined a)) 126 (\_ -> _rhs (undefined b))
127 (\_ c _ -> _rhs c) 127 (\_ e _ -> _rhs e)
128 (\_ _ _ _ _ -> _rhs (undefined a)) 128 (\_ _ _ _ _ -> _rhs (undefined b))
129 b 129 d
130 130
131c5 :: forall a b c . Data5 a b c -> c 131c5 :: forall a b c . Data5 a b c -> c
132c5 132c5
133 = \_ _ a b -> case'Data5 133 = \a b c d -> case'Data5
134 (\_ -> a) 134 (\_ -> c)
135 (\_ -> _rhs (undefined a)) 135 (\_ -> _rhs (undefined c))
136 (\_ _ c -> _rhs c) 136 (\_ _ e -> _rhs e)
137 (\_ _ _ _ _ -> _rhs (undefined a)) 137 (\_ _ _ _ _ -> _rhs (undefined c))
138 b 138 d
139 139
140case'Data0 140case'Data0
141 :: forall (a :: Data0 -> Type) -> a 'Data0 -> forall (b :: Data0) -> a b 141 :: forall (a :: Data0 -> Type) -> a 'Data0 -> forall (b :: Data0) -> a b
diff --git a/testdata/editor-examples/Cube.out b/testdata/editor-examples/Cube.out
index b3b01bfd..efc22c57 100644
--- a/testdata/editor-examples/Cube.out
+++ b/testdata/editor-examples/Cube.out
@@ -30,9 +30,6 @@ Pipeline
30 uniform float Time; 30 uniform float Time;
31 in vec4 vi1; 31 in vec4 vi1;
32 smooth out vec4 vo1; 32 smooth out vec4 vo1;
33 vec4 r1_Float;
34 vec4 r2_Float;
35 vec4 r3_Float;
36 vec4 ext0_Float_3(vec3 z0) { 33 vec4 ext0_Float_3(vec3 z0) {
37 return vec4 ((z0).x,(z0).y,(z0).z,0.0); 34 return vec4 ((z0).x,(z0).y,(z0).z,0.0);
38 } 35 }
@@ -40,7 +37,10 @@ Pipeline
40 return - (z0); 37 return - (z0);
41 } 38 }
42 mat4 translateBefore4(vec3 z0) { 39 mat4 translateBefore4(vec3 z0) {
43 return mat4 (r1_Float,r2_Float,r3_Float,vec4 ((z0).x,(z0).y,(z0).z,1.0)); 40 return mat4 (vec4 (1.0,0.0,0.0,0.0)
41 ,vec4 (0.0,1.0,0.0,0.0)
42 ,vec4 (0.0,0.0,1.0,0.0)
43 ,vec4 ((z0).x,(z0).y,(z0).z,1.0));
44 } 44 }
45 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) { 45 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) {
46 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2 46 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2
@@ -81,9 +81,6 @@ Pipeline
81 return (z1) * (vec4 (z0,z0,z0,1.0)); 81 return (z1) * (vec4 (z0,z0,z0,1.0));
82 } 82 }
83 void main() { 83 void main() {
84 r1_Float = vec4 (1.0,0.0,0.0,0.0);
85 r2_Float = vec4 (0.0,1.0,0.0,0.0);
86 r3_Float = vec4 (0.0,0.0,1.0,0.0);
87 gl_Position = scale (0.5 84 gl_Position = scale (0.5
88 ,(((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 (3.0 85 ,(((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 (3.0
89 ,1.3 86 ,1.3
diff --git a/testdata/editor-examples/Heartbeat.out b/testdata/editor-examples/Heartbeat.out
index 56f659dc..d69f80a6 100644
--- a/testdata/editor-examples/Heartbeat.out
+++ b/testdata/editor-examples/Heartbeat.out
@@ -105,23 +105,24 @@ Pipeline
105 out vec4 f0; 105 out vec4 f0;
106 vec4 blue; 106 vec4 blue;
107 vec4 navy; 107 vec4 navy;
108 float ti;
109 vec4 white; 108 vec4 white;
110 vec4 yellow; 109 vec4 yellow;
111 void main() { 110 void main() {
112 blue = vec4 (0.0,0.0,1.0,1.0); 111 blue = vec4 (0.0,0.0,1.0,1.0);
113 navy = vec4 (0.0,0.0,0.5,1.0); 112 navy = vec4 (0.0,0.0,0.5,1.0);
114 ti = abs ((sin ((Time) * (4.0))) - (0.37));
115 white = vec4 (1.0,1.0,1.0,1.0); 113 white = vec4 (1.0,1.0,1.0,1.0);
116 yellow = vec4 (1.0,1.0,0.0,1.0); 114 yellow = vec4 (1.0,1.0,0.0,1.0);
117 f0 = 115 f0 =
118 ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((5.0e-4) * (sin 116 ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((5.0e-4) * (sin
119 (((3.0) * (atan (((vo1).x) - (0.85) 117 (((3.0) * (atan (((vo1).x) - (0.85)
120 ,((vo1).y) - (0.85)))) + ((15.0) * (Time)))))) < ((5.0e-3) * (ti)) ? navy : ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((2.0e-3) * (sin 118 ,((vo1).y) - (0.85)))) + ((15.0) * (Time)))))) < ((5.0e-3) * (abs ((sin
119 ((Time) * (4.0))) - (0.37)))) ? navy : ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((2.0e-3) * (sin
121 (((5.0) * (atan (((vo1).x) - (0.85) 120 (((5.0) * (atan (((vo1).x) - (0.85)
122 ,((vo1).y) - (0.85)))) - ((5.0) * (Time)))))) < ((2.0e-2) * (ti)) ? blue : ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((2.0e-3) * (sin 121 ,((vo1).y) - (0.85)))) - ((5.0) * (Time)))))) < ((2.0e-2) * (abs ((sin
122 ((Time) * (4.0))) - (0.37)))) ? blue : ((((((vo1).x) - (0.85)) * (((vo1).x) - (0.85))) + ((((vo1).y) - (0.85)) * (((vo1).y) - (0.85)))) + ((2.0e-3) * (sin
123 (((7.0) * (atan (((vo1).x) - (0.85) 123 (((7.0) * (atan (((vo1).x) - (0.85)
124 ,((vo1).y) - (0.85)))) + ((3.0) * (Time)))))) < ((5.0e-2) * (ti)) ? white : yellow; 124 ,((vo1).y) - (0.85)))) + ((3.0) * (Time)))))) < ((5.0e-2) * (abs ((sin
125 ((Time) * (4.0))) - (0.37)))) ? white : yellow;
125 } 126 }
126 """ 127 """
127 } 128 }
@@ -144,9 +145,6 @@ Pipeline
144 in vec4 vi1; 145 in vec4 vi1;
145 in vec2 vi2; 146 in vec2 vi2;
146 smooth out vec2 vo1; 147 smooth out vec2 vo1;
147 vec4 r1_Float;
148 vec4 r2_Float;
149 vec4 r3_Float;
150 vec4 ext0_Float_3(vec3 z0) { 148 vec4 ext0_Float_3(vec3 z0) {
151 return vec4 ((z0).x,(z0).y,(z0).z,0.0); 149 return vec4 ((z0).x,(z0).y,(z0).z,0.0);
152 } 150 }
@@ -154,7 +152,10 @@ Pipeline
154 return - (z0); 152 return - (z0);
155 } 153 }
156 mat4 translateBefore4(vec3 z0) { 154 mat4 translateBefore4(vec3 z0) {
157 return mat4 (r1_Float,r2_Float,r3_Float,vec4 ((z0).x,(z0).y,(z0).z,1.0)); 155 return mat4 (vec4 (1.0,0.0,0.0,0.0)
156 ,vec4 (0.0,1.0,0.0,0.0)
157 ,vec4 (0.0,0.0,1.0,0.0)
158 ,vec4 ((z0).x,(z0).y,(z0).z,1.0));
158 } 159 }
159 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) { 160 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) {
160 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2 161 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2
@@ -191,20 +192,16 @@ Pipeline
191 ,vec4 (sin (z0),0.0,cos (z0),0.0) 192 ,vec4 (sin (z0),0.0,cos (z0),0.0)
192 ,vec4 (0.0,0.0,0.0,1.0)); 193 ,vec4 (0.0,0.0,0.0,1.0));
193 } 194 }
194 mat4 projmat;
195 vec4 scale(float z0,vec4 z1) { 195 vec4 scale(float z0,vec4 z1) {
196 return (z1) * (vec4 (z0,z0,z0,1.0)); 196 return (z1) * (vec4 (z0,z0,z0,1.0));
197 } 197 }
198 void main() { 198 void main() {
199 r1_Float = vec4 (1.0,0.0,0.0,0.0); 199 gl_Position = scale (0.5
200 r2_Float = vec4 (0.0,1.0,0.0,0.0); 200 ,(((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 (3.0
201 r3_Float = vec4 (0.0,0.0,1.0,0.0); 201 ,1.3
202 projmat = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 (3.0 202 ,0.3)
203 ,1.3 203 ,vec3 (0.0,0.0,0.0)
204 ,0.3) 204 ,vec3 (0.0,1.0,0.0)))) * (rotMatrixY ((0.1308996938995747) * (Time)))) * (vi1));
205 ,vec3 (0.0,0.0,0.0)
206 ,vec3 (0.0,1.0,0.0)))) * (rotMatrixY ((0.1308996938995747) * (Time)));
207 gl_Position = scale (0.5,(projmat) * (vi1));
208 vo1 = vi2; 205 vo1 = vi2;
209 } 206 }
210 """ 207 """
diff --git a/testdata/editor-examples/LambdaCube2.out b/testdata/editor-examples/LambdaCube2.out
index 3bc6b019..b3062a00 100644
--- a/testdata/editor-examples/LambdaCube2.out
+++ b/testdata/editor-examples/LambdaCube2.out
@@ -30,9 +30,6 @@ Pipeline
30 uniform float Time; 30 uniform float Time;
31 in vec4 vi1; 31 in vec4 vi1;
32 smooth out vec4 vo1; 32 smooth out vec4 vo1;
33 vec4 r1_Float;
34 vec4 r2_Float;
35 vec4 r3_Float;
36 vec4 ext0_Float_3(vec3 z0) { 33 vec4 ext0_Float_3(vec3 z0) {
37 return vec4 ((z0).x,(z0).y,(z0).z,0.0); 34 return vec4 ((z0).x,(z0).y,(z0).z,0.0);
38 } 35 }
@@ -40,7 +37,10 @@ Pipeline
40 return - (z0); 37 return - (z0);
41 } 38 }
42 mat4 translateBefore4(vec3 z0) { 39 mat4 translateBefore4(vec3 z0) {
43 return mat4 (r1_Float,r2_Float,r3_Float,vec4 ((z0).x,(z0).y,(z0).z,1.0)); 40 return mat4 (vec4 (1.0,0.0,0.0,0.0)
41 ,vec4 (0.0,1.0,0.0,0.0)
42 ,vec4 (0.0,0.0,1.0,0.0)
43 ,vec4 ((z0).x,(z0).y,(z0).z,1.0));
44 } 44 }
45 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) { 45 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) {
46 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2 46 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2
@@ -81,9 +81,6 @@ Pipeline
81 return (z1) * (vec4 (z0,z0,z0,1.0)); 81 return (z1) * (vec4 (z0,z0,z0,1.0));
82 } 82 }
83 void main() { 83 void main() {
84 r1_Float = vec4 (1.0,0.0,0.0,0.0);
85 r2_Float = vec4 (0.0,1.0,0.0,0.0);
86 r3_Float = vec4 (0.0,0.0,1.0,0.0);
87 gl_Position = scale (0.5 84 gl_Position = scale (0.5
88 ,(((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 (3.0 85 ,(((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 (3.0
89 ,1.3 86 ,1.3
diff --git a/testdata/editor-examples/MagicCube.out b/testdata/editor-examples/MagicCube.out
index 94e32a84..ca7234f5 100644
--- a/testdata/editor-examples/MagicCube.out
+++ b/testdata/editor-examples/MagicCube.out
@@ -30,9 +30,6 @@ Pipeline
30 uniform float Time; 30 uniform float Time;
31 in vec4 vi1; 31 in vec4 vi1;
32 smooth out vec4 vo1; 32 smooth out vec4 vo1;
33 vec4 r1_Float;
34 vec4 r2_Float;
35 vec4 r3_Float;
36 vec4 ext0_Float_3(vec3 z0) { 33 vec4 ext0_Float_3(vec3 z0) {
37 return vec4 ((z0).x,(z0).y,(z0).z,0.0); 34 return vec4 ((z0).x,(z0).y,(z0).z,0.0);
38 } 35 }
@@ -40,7 +37,10 @@ Pipeline
40 return - (z0); 37 return - (z0);
41 } 38 }
42 mat4 translateBefore4(vec3 z0) { 39 mat4 translateBefore4(vec3 z0) {
43 return mat4 (r1_Float,r2_Float,r3_Float,vec4 ((z0).x,(z0).y,(z0).z,1.0)); 40 return mat4 (vec4 (1.0,0.0,0.0,0.0)
41 ,vec4 (0.0,1.0,0.0,0.0)
42 ,vec4 (0.0,0.0,1.0,0.0)
43 ,vec4 ((z0).x,(z0).y,(z0).z,1.0));
44 } 44 }
45 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) { 45 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) {
46 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2 46 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2
@@ -81,9 +81,6 @@ Pipeline
81 return (z1) * (vec4 (z0,z0,z0,1.0)); 81 return (z1) * (vec4 (z0,z0,z0,1.0));
82 } 82 }
83 void main() { 83 void main() {
84 r1_Float = vec4 (1.0,0.0,0.0,0.0);
85 r2_Float = vec4 (0.0,1.0,0.0,0.0);
86 r3_Float = vec4 (0.0,0.0,1.0,0.0);
87 gl_Position = scale (0.5 84 gl_Position = scale (0.5
88 ,(((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 (3.0 85 ,(((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 (3.0
89 ,1.3 86 ,1.3
diff --git a/testdata/editor-examples/RecLC.out b/testdata/editor-examples/RecLC.out
index 7c4393e1..d348f5de 100644
--- a/testdata/editor-examples/RecLC.out
+++ b/testdata/editor-examples/RecLC.out
@@ -135,9 +135,6 @@ Pipeline
135 uniform float Time; 135 uniform float Time;
136 in vec4 vi1; 136 in vec4 vi1;
137 smooth out vec4 vo1; 137 smooth out vec4 vo1;
138 vec4 r1_Float;
139 vec4 r2_Float;
140 vec4 r3_Float;
141 vec4 ext0_Float_3(vec3 z0) { 138 vec4 ext0_Float_3(vec3 z0) {
142 return vec4 ((z0).x,(z0).y,(z0).z,0.0); 139 return vec4 ((z0).x,(z0).y,(z0).z,0.0);
143 } 140 }
@@ -145,7 +142,10 @@ Pipeline
145 return - (z0); 142 return - (z0);
146 } 143 }
147 mat4 translateBefore4(vec3 z0) { 144 mat4 translateBefore4(vec3 z0) {
148 return mat4 (r1_Float,r2_Float,r3_Float,vec4 ((z0).x,(z0).y,(z0).z,1.0)); 145 return mat4 (vec4 (1.0,0.0,0.0,0.0)
146 ,vec4 (0.0,1.0,0.0,0.0)
147 ,vec4 (0.0,0.0,1.0,0.0)
148 ,vec4 ((z0).x,(z0).y,(z0).z,1.0));
149 } 149 }
150 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) { 150 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) {
151 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2 151 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2
@@ -186,9 +186,6 @@ Pipeline
186 return (z1) * (vec4 (z0,z0,z0,1.0)); 186 return (z1) * (vec4 (z0,z0,z0,1.0));
187 } 187 }
188 void main() { 188 void main() {
189 r1_Float = vec4 (1.0,0.0,0.0,0.0);
190 r2_Float = vec4 (0.0,1.0,0.0,0.0);
191 r3_Float = vec4 (0.0,0.0,1.0,0.0);
192 gl_Position = scale (0.5 189 gl_Position = scale (0.5
193 ,(((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 (3.0 190 ,(((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 (3.0
194 ,1.3 191 ,1.3
@@ -241,9 +238,6 @@ Pipeline
241 in vec4 vi1; 238 in vec4 vi1;
242 in vec2 vi2; 239 in vec2 vi2;
243 smooth out vec2 vo1; 240 smooth out vec2 vo1;
244 vec4 r1_Float;
245 vec4 r2_Float;
246 vec4 r3_Float;
247 vec4 ext0_Float_3(vec3 z0) { 241 vec4 ext0_Float_3(vec3 z0) {
248 return vec4 ((z0).x,(z0).y,(z0).z,0.0); 242 return vec4 ((z0).x,(z0).y,(z0).z,0.0);
249 } 243 }
@@ -251,7 +245,10 @@ Pipeline
251 return - (z0); 245 return - (z0);
252 } 246 }
253 mat4 translateBefore4(vec3 z0) { 247 mat4 translateBefore4(vec3 z0) {
254 return mat4 (r1_Float,r2_Float,r3_Float,vec4 ((z0).x,(z0).y,(z0).z,1.0)); 248 return mat4 (vec4 (1.0,0.0,0.0,0.0)
249 ,vec4 (0.0,1.0,0.0,0.0)
250 ,vec4 (0.0,0.0,1.0,0.0)
251 ,vec4 ((z0).x,(z0).y,(z0).z,1.0));
255 } 252 }
256 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) { 253 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) {
257 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2 254 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2
@@ -299,9 +296,6 @@ Pipeline
299 return (z1) * (vec4 (z0,z0,z0,1.0)); 296 return (z1) * (vec4 (z0,z0,z0,1.0));
300 } 297 }
301 void main() { 298 void main() {
302 r1_Float = vec4 (1.0,0.0,0.0,0.0);
303 r2_Float = vec4 (0.0,1.0,0.0,0.0);
304 r3_Float = vec4 (0.0,0.0,1.0,0.0);
305 rotMatrix = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 299 rotMatrix = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3
306 (3.0,1.3,0.3) 300 (3.0,1.3,0.3)
307 ,vec3 (0.0,0.0,0.0) 301 ,vec3 (0.0,0.0,0.0)
@@ -347,9 +341,6 @@ Pipeline
347 in vec4 vi1; 341 in vec4 vi1;
348 in vec2 vi2; 342 in vec2 vi2;
349 smooth out vec2 vo1; 343 smooth out vec2 vo1;
350 vec4 r1_Float;
351 vec4 r2_Float;
352 vec4 r3_Float;
353 vec4 ext0_Float_3(vec3 z0) { 344 vec4 ext0_Float_3(vec3 z0) {
354 return vec4 ((z0).x,(z0).y,(z0).z,0.0); 345 return vec4 ((z0).x,(z0).y,(z0).z,0.0);
355 } 346 }
@@ -357,7 +348,10 @@ Pipeline
357 return - (z0); 348 return - (z0);
358 } 349 }
359 mat4 translateBefore4(vec3 z0) { 350 mat4 translateBefore4(vec3 z0) {
360 return mat4 (r1_Float,r2_Float,r3_Float,vec4 ((z0).x,(z0).y,(z0).z,1.0)); 351 return mat4 (vec4 (1.0,0.0,0.0,0.0)
352 ,vec4 (0.0,1.0,0.0,0.0)
353 ,vec4 (0.0,0.0,1.0,0.0)
354 ,vec4 ((z0).x,(z0).y,(z0).z,1.0));
361 } 355 }
362 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) { 356 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) {
363 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2 357 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2
@@ -405,9 +399,6 @@ Pipeline
405 return (z1) * (vec4 (z0,z0,z0,1.0)); 399 return (z1) * (vec4 (z0,z0,z0,1.0));
406 } 400 }
407 void main() { 401 void main() {
408 r1_Float = vec4 (1.0,0.0,0.0,0.0);
409 r2_Float = vec4 (0.0,1.0,0.0,0.0);
410 r3_Float = vec4 (0.0,0.0,1.0,0.0);
411 rotMatrix = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 402 rotMatrix = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3
412 (3.0,1.3,0.3) 403 (3.0,1.3,0.3)
413 ,vec3 (0.0,0.0,0.0) 404 ,vec3 (0.0,0.0,0.0)
diff --git a/testdata/editor-examples/RecursiveTexture.out b/testdata/editor-examples/RecursiveTexture.out
index d008848d..3e497a3a 100644
--- a/testdata/editor-examples/RecursiveTexture.out
+++ b/testdata/editor-examples/RecursiveTexture.out
@@ -294,9 +294,6 @@ Pipeline
294 in vec4 vi1; 294 in vec4 vi1;
295 in vec2 vi2; 295 in vec2 vi2;
296 smooth out vec2 vo1; 296 smooth out vec2 vo1;
297 vec4 r1_Float;
298 vec4 r2_Float;
299 vec4 r3_Float;
300 vec4 ext0_Float_3(vec3 z0) { 297 vec4 ext0_Float_3(vec3 z0) {
301 return vec4 ((z0).x,(z0).y,(z0).z,0.0); 298 return vec4 ((z0).x,(z0).y,(z0).z,0.0);
302 } 299 }
@@ -304,7 +301,10 @@ Pipeline
304 return - (z0); 301 return - (z0);
305 } 302 }
306 mat4 translateBefore4(vec3 z0) { 303 mat4 translateBefore4(vec3 z0) {
307 return mat4 (r1_Float,r2_Float,r3_Float,vec4 ((z0).x,(z0).y,(z0).z,1.0)); 304 return mat4 (vec4 (1.0,0.0,0.0,0.0)
305 ,vec4 (0.0,1.0,0.0,0.0)
306 ,vec4 (0.0,0.0,1.0,0.0)
307 ,vec4 ((z0).x,(z0).y,(z0).z,1.0));
308 } 308 }
309 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) { 309 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) {
310 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2 310 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2
@@ -352,9 +352,6 @@ Pipeline
352 return (z1) * (vec4 (z0,z0,z0,1.0)); 352 return (z1) * (vec4 (z0,z0,z0,1.0));
353 } 353 }
354 void main() { 354 void main() {
355 r1_Float = vec4 (1.0,0.0,0.0,0.0);
356 r2_Float = vec4 (0.0,1.0,0.0,0.0);
357 r3_Float = vec4 (0.0,0.0,1.0,0.0);
358 rotMatrix = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 355 rotMatrix = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3
359 (3.0,1.3,0.3) 356 (3.0,1.3,0.3)
360 ,vec3 (0.0,0.0,0.0) 357 ,vec3 (0.0,0.0,0.0)
@@ -400,9 +397,6 @@ Pipeline
400 in vec4 vi1; 397 in vec4 vi1;
401 in vec2 vi2; 398 in vec2 vi2;
402 smooth out vec2 vo1; 399 smooth out vec2 vo1;
403 vec4 r1_Float;
404 vec4 r2_Float;
405 vec4 r3_Float;
406 vec4 ext0_Float_3(vec3 z0) { 400 vec4 ext0_Float_3(vec3 z0) {
407 return vec4 ((z0).x,(z0).y,(z0).z,0.0); 401 return vec4 ((z0).x,(z0).y,(z0).z,0.0);
408 } 402 }
@@ -410,7 +404,10 @@ Pipeline
410 return - (z0); 404 return - (z0);
411 } 405 }
412 mat4 translateBefore4(vec3 z0) { 406 mat4 translateBefore4(vec3 z0) {
413 return mat4 (r1_Float,r2_Float,r3_Float,vec4 ((z0).x,(z0).y,(z0).z,1.0)); 407 return mat4 (vec4 (1.0,0.0,0.0,0.0)
408 ,vec4 (0.0,1.0,0.0,0.0)
409 ,vec4 (0.0,0.0,1.0,0.0)
410 ,vec4 ((z0).x,(z0).y,(z0).z,1.0));
414 } 411 }
415 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) { 412 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) {
416 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2 413 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2
@@ -458,9 +455,6 @@ Pipeline
458 return (z1) * (vec4 (z0,z0,z0,1.0)); 455 return (z1) * (vec4 (z0,z0,z0,1.0));
459 } 456 }
460 void main() { 457 void main() {
461 r1_Float = vec4 (1.0,0.0,0.0,0.0);
462 r2_Float = vec4 (0.0,1.0,0.0,0.0);
463 r3_Float = vec4 (0.0,0.0,1.0,0.0);
464 rotMatrix = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 458 rotMatrix = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3
465 (3.0,1.3,0.3) 459 (3.0,1.3,0.3)
466 ,vec3 (0.0,0.0,0.0) 460 ,vec3 (0.0,0.0,0.0)
@@ -506,9 +500,6 @@ Pipeline
506 in vec4 vi1; 500 in vec4 vi1;
507 in vec2 vi2; 501 in vec2 vi2;
508 smooth out vec2 vo1; 502 smooth out vec2 vo1;
509 vec4 r1_Float;
510 vec4 r2_Float;
511 vec4 r3_Float;
512 vec4 ext0_Float_3(vec3 z0) { 503 vec4 ext0_Float_3(vec3 z0) {
513 return vec4 ((z0).x,(z0).y,(z0).z,0.0); 504 return vec4 ((z0).x,(z0).y,(z0).z,0.0);
514 } 505 }
@@ -516,7 +507,10 @@ Pipeline
516 return - (z0); 507 return - (z0);
517 } 508 }
518 mat4 translateBefore4(vec3 z0) { 509 mat4 translateBefore4(vec3 z0) {
519 return mat4 (r1_Float,r2_Float,r3_Float,vec4 ((z0).x,(z0).y,(z0).z,1.0)); 510 return mat4 (vec4 (1.0,0.0,0.0,0.0)
511 ,vec4 (0.0,1.0,0.0,0.0)
512 ,vec4 (0.0,0.0,1.0,0.0)
513 ,vec4 ((z0).x,(z0).y,(z0).z,1.0));
520 } 514 }
521 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) { 515 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) {
522 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2 516 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2
@@ -564,9 +558,6 @@ Pipeline
564 return (z1) * (vec4 (z0,z0,z0,1.0)); 558 return (z1) * (vec4 (z0,z0,z0,1.0));
565 } 559 }
566 void main() { 560 void main() {
567 r1_Float = vec4 (1.0,0.0,0.0,0.0);
568 r2_Float = vec4 (0.0,1.0,0.0,0.0);
569 r3_Float = vec4 (0.0,0.0,1.0,0.0);
570 rotMatrix = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 561 rotMatrix = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3
571 (3.0,1.3,0.3) 562 (3.0,1.3,0.3)
572 ,vec3 (0.0,0.0,0.0) 563 ,vec3 (0.0,0.0,0.0)
@@ -612,9 +603,6 @@ Pipeline
612 in vec4 vi1; 603 in vec4 vi1;
613 in vec2 vi2; 604 in vec2 vi2;
614 smooth out vec2 vo1; 605 smooth out vec2 vo1;
615 vec4 r1_Float;
616 vec4 r2_Float;
617 vec4 r3_Float;
618 vec4 ext0_Float_3(vec3 z0) { 606 vec4 ext0_Float_3(vec3 z0) {
619 return vec4 ((z0).x,(z0).y,(z0).z,0.0); 607 return vec4 ((z0).x,(z0).y,(z0).z,0.0);
620 } 608 }
@@ -622,7 +610,10 @@ Pipeline
622 return - (z0); 610 return - (z0);
623 } 611 }
624 mat4 translateBefore4(vec3 z0) { 612 mat4 translateBefore4(vec3 z0) {
625 return mat4 (r1_Float,r2_Float,r3_Float,vec4 ((z0).x,(z0).y,(z0).z,1.0)); 613 return mat4 (vec4 (1.0,0.0,0.0,0.0)
614 ,vec4 (0.0,1.0,0.0,0.0)
615 ,vec4 (0.0,0.0,1.0,0.0)
616 ,vec4 ((z0).x,(z0).y,(z0).z,1.0));
626 } 617 }
627 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) { 618 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) {
628 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2 619 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2
@@ -670,9 +661,6 @@ Pipeline
670 return (z1) * (vec4 (z0,z0,z0,1.0)); 661 return (z1) * (vec4 (z0,z0,z0,1.0));
671 } 662 }
672 void main() { 663 void main() {
673 r1_Float = vec4 (1.0,0.0,0.0,0.0);
674 r2_Float = vec4 (0.0,1.0,0.0,0.0);
675 r3_Float = vec4 (0.0,0.0,1.0,0.0);
676 rotMatrix = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 664 rotMatrix = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3
677 (3.0,1.3,0.3) 665 (3.0,1.3,0.3)
678 ,vec3 (0.0,0.0,0.0) 666 ,vec3 (0.0,0.0,0.0)
@@ -718,9 +706,6 @@ Pipeline
718 in vec4 vi1; 706 in vec4 vi1;
719 in vec2 vi2; 707 in vec2 vi2;
720 smooth out vec2 vo1; 708 smooth out vec2 vo1;
721 vec4 r1_Float;
722 vec4 r2_Float;
723 vec4 r3_Float;
724 vec4 ext0_Float_3(vec3 z0) { 709 vec4 ext0_Float_3(vec3 z0) {
725 return vec4 ((z0).x,(z0).y,(z0).z,0.0); 710 return vec4 ((z0).x,(z0).y,(z0).z,0.0);
726 } 711 }
@@ -728,7 +713,10 @@ Pipeline
728 return - (z0); 713 return - (z0);
729 } 714 }
730 mat4 translateBefore4(vec3 z0) { 715 mat4 translateBefore4(vec3 z0) {
731 return mat4 (r1_Float,r2_Float,r3_Float,vec4 ((z0).x,(z0).y,(z0).z,1.0)); 716 return mat4 (vec4 (1.0,0.0,0.0,0.0)
717 ,vec4 (0.0,1.0,0.0,0.0)
718 ,vec4 (0.0,0.0,1.0,0.0)
719 ,vec4 ((z0).x,(z0).y,(z0).z,1.0));
732 } 720 }
733 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) { 721 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) {
734 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2 722 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2
@@ -776,9 +764,6 @@ Pipeline
776 return (z1) * (vec4 (z0,z0,z0,1.0)); 764 return (z1) * (vec4 (z0,z0,z0,1.0));
777 } 765 }
778 void main() { 766 void main() {
779 r1_Float = vec4 (1.0,0.0,0.0,0.0);
780 r2_Float = vec4 (0.0,1.0,0.0,0.0);
781 r3_Float = vec4 (0.0,0.0,1.0,0.0);
782 rotMatrix = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 767 rotMatrix = ((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3
783 (3.0,1.3,0.3) 768 (3.0,1.3,0.3)
784 ,vec3 (0.0,0.0,0.0) 769 ,vec3 (0.0,0.0,0.0)
diff --git a/testdata/editor-examples/Tetrahedron.out b/testdata/editor-examples/Tetrahedron.out
index ddce3ba3..eef77b90 100644
--- a/testdata/editor-examples/Tetrahedron.out
+++ b/testdata/editor-examples/Tetrahedron.out
@@ -30,9 +30,6 @@ Pipeline
30 uniform float Time; 30 uniform float Time;
31 in vec4 vi1; 31 in vec4 vi1;
32 smooth out vec4 vo1; 32 smooth out vec4 vo1;
33 vec4 r1_Float;
34 vec4 r2_Float;
35 vec4 r3_Float;
36 vec4 ext0_Float_3(vec3 z0) { 33 vec4 ext0_Float_3(vec3 z0) {
37 return vec4 ((z0).x,(z0).y,(z0).z,0.0); 34 return vec4 ((z0).x,(z0).y,(z0).z,0.0);
38 } 35 }
@@ -40,7 +37,10 @@ Pipeline
40 return - (z0); 37 return - (z0);
41 } 38 }
42 mat4 translateBefore4(vec3 z0) { 39 mat4 translateBefore4(vec3 z0) {
43 return mat4 (r1_Float,r2_Float,r3_Float,vec4 ((z0).x,(z0).y,(z0).z,1.0)); 40 return mat4 (vec4 (1.0,0.0,0.0,0.0)
41 ,vec4 (0.0,1.0,0.0,0.0)
42 ,vec4 (0.0,0.0,1.0,0.0)
43 ,vec4 ((z0).x,(z0).y,(z0).z,1.0));
44 } 44 }
45 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) { 45 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) {
46 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2 46 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2
@@ -81,9 +81,6 @@ Pipeline
81 return (z1) * (vec4 (z0,z0,z0,1.0)); 81 return (z1) * (vec4 (z0,z0,z0,1.0));
82 } 82 }
83 void main() { 83 void main() {
84 r1_Float = vec4 (1.0,0.0,0.0,0.0);
85 r2_Float = vec4 (0.0,1.0,0.0,0.0);
86 r3_Float = vec4 (0.0,0.0,1.0,0.0);
87 gl_Position = scale (0.5 84 gl_Position = scale (0.5
88 ,(((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 (3.0 85 ,(((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 (3.0
89 ,1.3 86 ,1.3
diff --git a/testdata/editor-examples/Texturing.out b/testdata/editor-examples/Texturing.out
index 2c488805..b969eea0 100644
--- a/testdata/editor-examples/Texturing.out
+++ b/testdata/editor-examples/Texturing.out
@@ -34,9 +34,6 @@ Pipeline
34 in vec4 vi1; 34 in vec4 vi1;
35 in vec2 vi2; 35 in vec2 vi2;
36 smooth out vec2 vo1; 36 smooth out vec2 vo1;
37 vec4 r1_Float;
38 vec4 r2_Float;
39 vec4 r3_Float;
40 vec4 ext0_Float_3(vec3 z0) { 37 vec4 ext0_Float_3(vec3 z0) {
41 return vec4 ((z0).x,(z0).y,(z0).z,0.0); 38 return vec4 ((z0).x,(z0).y,(z0).z,0.0);
42 } 39 }
@@ -44,7 +41,10 @@ Pipeline
44 return - (z0); 41 return - (z0);
45 } 42 }
46 mat4 translateBefore4(vec3 z0) { 43 mat4 translateBefore4(vec3 z0) {
47 return mat4 (r1_Float,r2_Float,r3_Float,vec4 ((z0).x,(z0).y,(z0).z,1.0)); 44 return mat4 (vec4 (1.0,0.0,0.0,0.0)
45 ,vec4 (0.0,1.0,0.0,0.0)
46 ,vec4 (0.0,0.0,1.0,0.0)
47 ,vec4 ((z0).x,(z0).y,(z0).z,1.0));
48 } 48 }
49 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) { 49 mat4 lookat(vec3 z0,vec3 z1,vec3 z2) {
50 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2 50 return (transpose (mat4 (ext0_Float_3 (normalize (cross (z2
@@ -85,9 +85,6 @@ Pipeline
85 return (z1) * (vec4 (z0,z0,z0,1.0)); 85 return (z1) * (vec4 (z0,z0,z0,1.0));
86 } 86 }
87 void main() { 87 void main() {
88 r1_Float = vec4 (1.0,0.0,0.0,0.0);
89 r2_Float = vec4 (0.0,1.0,0.0,0.0);
90 r3_Float = vec4 (0.0,0.0,1.0,0.0);
91 gl_Position = scale (0.5 88 gl_Position = scale (0.5
92 ,(((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 (3.0 89 ,(((perspective (0.1,100.0,0.5235987755982988,1.0)) * (lookat (vec3 (3.0
93 ,1.3 90 ,1.3
diff --git a/testdata/example08.out b/testdata/example08.out
index bbcf34d3..6afebe18 100644
--- a/testdata/example08.out
+++ b/testdata/example08.out
@@ -47,16 +47,16 @@ Pipeline
47 vec4 scale(float z0,vec4 z1) { 47 vec4 scale(float z0,vec4 z1) {
48 return (z1) * (vec4 (z0,z0,z0,1.0)); 48 return (z1) * (vec4 (z0,z0,z0,1.0));
49 } 49 }
50 vec4 trMat_4_4_Float(mat4 z0,vec4 z1) { 50 vec4 trMat_Float_4_4(mat4 z0,vec4 z1) {
51 return (z0) * (z1); 51 return (z0) * (z1);
52 } 52 }
53 vec4 trX(float z0,vec4 z1) { 53 vec4 trX(float z0,vec4 z1) {
54 return (vec4 (z0,0.0,0.0,0.0)) + (z1); 54 return (vec4 (z0,0.0,0.0,0.0)) + (z1);
55 } 55 }
56 void main() { 56 void main() {
57 gl_Position = trMat_4_4_Float (rotMatrixZ ((Time) * (2.0)) 57 gl_Position = trMat_Float_4_4 (rotMatrixZ ((Time) * (2.0))
58 ,(MVP) * (trX ((1.0) + ((sin (Time)) * (0.1)) 58 ,(MVP) * (trX ((1.0) + ((sin (Time)) * (0.1))
59 ,scale (4.0e-2,trMat_4_4_Float (rotMatrixX (((Time) * (2.0)) * (2.0)),vi1))))); 59 ,scale (4.0e-2,trMat_Float_4_4 (rotMatrixX (((Time) * (2.0)) * (2.0)),vi1)))));
60 vo1 = vi1; 60 vo1 = vi1;
61 } 61 }
62 """ 62 """
@@ -107,16 +107,16 @@ Pipeline
107 vec4 scale(float z0,vec4 z1) { 107 vec4 scale(float z0,vec4 z1) {
108 return (z1) * (vec4 (z0,z0,z0,1.0)); 108 return (z1) * (vec4 (z0,z0,z0,1.0));
109 } 109 }
110 vec4 trMat_4_4_Float(mat4 z0,vec4 z1) { 110 vec4 trMat_Float_4_4(mat4 z0,vec4 z1) {
111 return (z0) * (z1); 111 return (z0) * (z1);
112 } 112 }
113 vec4 trX(float z0,vec4 z1) { 113 vec4 trX(float z0,vec4 z1) {
114 return (vec4 (z0,0.0,0.0,0.0)) + (z1); 114 return (vec4 (z0,0.0,0.0,0.0)) + (z1);
115 } 115 }
116 void main() { 116 void main() {
117 gl_Position = trMat_4_4_Float (rotMatrixZ ((Time) * (1.0)) 117 gl_Position = trMat_Float_4_4 (rotMatrixZ ((Time) * (1.0))
118 ,(MVP) * (trX ((0.5) + ((sin (Time)) * (0.1)) 118 ,(MVP) * (trX ((0.5) + ((sin (Time)) * (0.1))
119 ,scale (4.0e-2,trMat_4_4_Float (rotMatrixX (((Time) * (2.0)) * (1.0)),vi1))))); 119 ,scale (4.0e-2,trMat_Float_4_4 (rotMatrixX (((Time) * (2.0)) * (1.0)),vi1)))));
120 vo1 = vi1; 120 vo1 = vi1;
121 } 121 }
122 """ 122 """
@@ -167,16 +167,16 @@ Pipeline
167 vec4 scale(float z0,vec4 z1) { 167 vec4 scale(float z0,vec4 z1) {
168 return (z1) * (vec4 (z0,z0,z0,1.0)); 168 return (z1) * (vec4 (z0,z0,z0,1.0));
169 } 169 }
170 vec4 trMat_4_4_Float(mat4 z0,vec4 z1) { 170 vec4 trMat_Float_4_4(mat4 z0,vec4 z1) {
171 return (z0) * (z1); 171 return (z0) * (z1);
172 } 172 }
173 vec4 trX(float z0,vec4 z1) { 173 vec4 trX(float z0,vec4 z1) {
174 return (vec4 (z0,0.0,0.0,0.0)) + (z1); 174 return (vec4 (z0,0.0,0.0,0.0)) + (z1);
175 } 175 }
176 void main() { 176 void main() {
177 gl_Position = trMat_4_4_Float (rotMatrixZ ((Time) * (0.0)) 177 gl_Position = trMat_Float_4_4 (rotMatrixZ ((Time) * (0.0))
178 ,(MVP) * (trX ((0.0) + ((sin (Time)) * (0.1)) 178 ,(MVP) * (trX ((0.0) + ((sin (Time)) * (0.1))
179 ,scale (4.0e-2,trMat_4_4_Float (rotMatrixX (((Time) * (2.0)) * (0.0)),vi1))))); 179 ,scale (4.0e-2,trMat_Float_4_4 (rotMatrixX (((Time) * (2.0)) * (0.0)),vi1)))));
180 vo1 = vi1; 180 vo1 = vi1;
181 } 181 }
182 """ 182 """
@@ -227,16 +227,16 @@ Pipeline
227 vec4 scale(float z0,vec4 z1) { 227 vec4 scale(float z0,vec4 z1) {
228 return (z1) * (vec4 (z0,z0,z0,1.0)); 228 return (z1) * (vec4 (z0,z0,z0,1.0));
229 } 229 }
230 vec4 trMat_4_4_Float(mat4 z0,vec4 z1) { 230 vec4 trMat_Float_4_4(mat4 z0,vec4 z1) {
231 return (z0) * (z1); 231 return (z0) * (z1);
232 } 232 }
233 vec4 trX(float z0,vec4 z1) { 233 vec4 trX(float z0,vec4 z1) {
234 return (vec4 (z0,0.0,0.0,0.0)) + (z1); 234 return (vec4 (z0,0.0,0.0,0.0)) + (z1);
235 } 235 }
236 void main() { 236 void main() {
237 gl_Position = trMat_4_4_Float (rotMatrixZ ((Time) * (-1.0)) 237 gl_Position = trMat_Float_4_4 (rotMatrixZ ((Time) * (-1.0))
238 ,(MVP) * (trX ((-0.5) + ((sin (Time)) * (0.1)) 238 ,(MVP) * (trX ((-0.5) + ((sin (Time)) * (0.1))
239 ,scale (4.0e-2,trMat_4_4_Float (rotMatrixX (((Time) * (2.0)) * (-1.0)),vi1))))); 239 ,scale (4.0e-2,trMat_Float_4_4 (rotMatrixX (((Time) * (2.0)) * (-1.0)),vi1)))));
240 vo1 = vi1; 240 vo1 = vi1;
241 } 241 }
242 """ 242 """
@@ -287,16 +287,16 @@ Pipeline
287 vec4 scale(float z0,vec4 z1) { 287 vec4 scale(float z0,vec4 z1) {
288 return (z1) * (vec4 (z0,z0,z0,1.0)); 288 return (z1) * (vec4 (z0,z0,z0,1.0));
289 } 289 }
290 vec4 trMat_4_4_Float(mat4 z0,vec4 z1) { 290 vec4 trMat_Float_4_4(mat4 z0,vec4 z1) {
291 return (z0) * (z1); 291 return (z0) * (z1);
292 } 292 }
293 vec4 trX(float z0,vec4 z1) { 293 vec4 trX(float z0,vec4 z1) {
294 return (vec4 (z0,0.0,0.0,0.0)) + (z1); 294 return (vec4 (z0,0.0,0.0,0.0)) + (z1);
295 } 295 }
296 void main() { 296 void main() {
297 gl_Position = trMat_4_4_Float (rotMatrixZ ((Time) * (0.75)) 297 gl_Position = trMat_Float_4_4 (rotMatrixZ ((Time) * (0.75))
298 ,(MVP) * (trX ((0.375) + ((sin (Time)) * (0.1)) 298 ,(MVP) * (trX ((0.375) + ((sin (Time)) * (0.1))
299 ,scale (4.0e-2,trMat_4_4_Float (rotMatrixX (((Time) * (2.0)) * (0.75)),vi1))))); 299 ,scale (4.0e-2,trMat_Float_4_4 (rotMatrixX (((Time) * (2.0)) * (0.75)),vi1)))));
300 vo1 = vi1; 300 vo1 = vi1;
301 } 301 }
302 """ 302 """
@@ -347,16 +347,16 @@ Pipeline
347 vec4 scale(float z0,vec4 z1) { 347 vec4 scale(float z0,vec4 z1) {
348 return (z1) * (vec4 (z0,z0,z0,1.0)); 348 return (z1) * (vec4 (z0,z0,z0,1.0));
349 } 349 }
350 vec4 trMat_4_4_Float(mat4 z0,vec4 z1) { 350 vec4 trMat_Float_4_4(mat4 z0,vec4 z1) {
351 return (z0) * (z1); 351 return (z0) * (z1);
352 } 352 }
353 vec4 trX(float z0,vec4 z1) { 353 vec4 trX(float z0,vec4 z1) {
354 return (vec4 (z0,0.0,0.0,0.0)) + (z1); 354 return (vec4 (z0,0.0,0.0,0.0)) + (z1);
355 } 355 }
356 void main() { 356 void main() {
357 gl_Position = trMat_4_4_Float (rotMatrixZ ((Time) * (0.3)) 357 gl_Position = trMat_Float_4_4 (rotMatrixZ ((Time) * (0.3))
358 ,(MVP) * (trX ((0.15) + ((sin (Time)) * (0.1)) 358 ,(MVP) * (trX ((0.15) + ((sin (Time)) * (0.1))
359 ,scale (4.0e-2,trMat_4_4_Float (rotMatrixX (((Time) * (2.0)) * (0.3)),vi1))))); 359 ,scale (4.0e-2,trMat_Float_4_4 (rotMatrixX (((Time) * (2.0)) * (0.3)),vi1)))));
360 vo1 = vi1; 360 vo1 = vi1;
361 } 361 }
362 """ 362 """
@@ -407,16 +407,16 @@ Pipeline
407 vec4 scale(float z0,vec4 z1) { 407 vec4 scale(float z0,vec4 z1) {
408 return (z1) * (vec4 (z0,z0,z0,1.0)); 408 return (z1) * (vec4 (z0,z0,z0,1.0));
409 } 409 }
410 vec4 trMat_4_4_Float(mat4 z0,vec4 z1) { 410 vec4 trMat_Float_4_4(mat4 z0,vec4 z1) {
411 return (z0) * (z1); 411 return (z0) * (z1);
412 } 412 }
413 vec4 trX(float z0,vec4 z1) { 413 vec4 trX(float z0,vec4 z1) {
414 return (vec4 (z0,0.0,0.0,0.0)) + (z1); 414 return (vec4 (z0,0.0,0.0,0.0)) + (z1);
415 } 415 }
416 void main() { 416 void main() {
417 gl_Position = trMat_4_4_Float (rotMatrixZ ((Time) * (0.5)) 417 gl_Position = trMat_Float_4_4 (rotMatrixZ ((Time) * (0.5))
418 ,(MVP) * (trX ((0.25) + ((sin (Time)) * (0.1)) 418 ,(MVP) * (trX ((0.25) + ((sin (Time)) * (0.1))
419 ,scale (4.0e-2,trMat_4_4_Float (rotMatrixX (((Time) * (2.0)) * (0.5)),vi1))))); 419 ,scale (4.0e-2,trMat_Float_4_4 (rotMatrixX (((Time) * (2.0)) * (0.5)),vi1)))));
420 vo1 = vi1; 420 vo1 = vi1;
421 } 421 }
422 """ 422 """
@@ -467,16 +467,16 @@ Pipeline
467 vec4 scale(float z0,vec4 z1) { 467 vec4 scale(float z0,vec4 z1) {
468 return (z1) * (vec4 (z0,z0,z0,1.0)); 468 return (z1) * (vec4 (z0,z0,z0,1.0));
469 } 469 }
470 vec4 trMat_4_4_Float(mat4 z0,vec4 z1) { 470 vec4 trMat_Float_4_4(mat4 z0,vec4 z1) {
471 return (z0) * (z1); 471 return (z0) * (z1);
472 } 472 }
473 vec4 trX(float z0,vec4 z1) { 473 vec4 trX(float z0,vec4 z1) {
474 return (vec4 (z0,0.0,0.0,0.0)) + (z1); 474 return (vec4 (z0,0.0,0.0,0.0)) + (z1);
475 } 475 }
476 void main() { 476 void main() {
477 gl_Position = trMat_4_4_Float (rotMatrixZ ((Time) * (-0.5)) 477 gl_Position = trMat_Float_4_4 (rotMatrixZ ((Time) * (-0.5))
478 ,(MVP) * (trX ((-0.25) + ((sin (Time)) * (0.1)) 478 ,(MVP) * (trX ((-0.25) + ((sin (Time)) * (0.1))
479 ,scale (4.0e-2,trMat_4_4_Float (rotMatrixX (((Time) * (2.0)) * (-0.5)),vi1))))); 479 ,scale (4.0e-2,trMat_Float_4_4 (rotMatrixX (((Time) * (2.0)) * (-0.5)),vi1)))));
480 vo1 = vi1; 480 vo1 = vi1;
481 } 481 }
482 """ 482 """
diff --git a/testdata/fetcharrays01.out b/testdata/fetcharrays01.out
index d4c100a2..6e16d4de 100644
--- a/testdata/fetcharrays01.out
+++ b/testdata/fetcharrays01.out
@@ -36,9 +36,12 @@ Pipeline
36 vec4 scale(float z0,vec4 z1) { 36 vec4 scale(float z0,vec4 z1) {
37 return (z1) * (vec4 (z0,z0,z0,1.0)); 37 return (z1) * (vec4 (z0,z0,z0,1.0));
38 } 38 }
39 vec4 v3FToV4F(vec3 z0) {
40 return vec4 ((z0).x,(z0).y,(z0).z,1.0);
41 }
39 void main() { 42 void main() {
40 gl_Position = scale (0.5,(MVP) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0))); 43 gl_Position = scale (0.5,(MVP) * (v3FToV4F (vi1)));
41 vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); 44 vo1 = v3FToV4F (vi1);
42 } 45 }
43 """ 46 """
44 , geometryShader = Nothing 47 , geometryShader = Nothing
diff --git a/testdata/framebuffer02.reject.out b/testdata/framebuffer02.reject.out
index 596300b8..6e02124d 100644
--- a/testdata/framebuffer02.reject.out
+++ b/testdata/framebuffer02.reject.out
@@ -21,14 +21,11 @@ in testdata/framebuffer02.reject.lc:2:17:
21testdata/framebuffer02.reject.lc 2:17-2:28 21testdata/framebuffer02.reject.lc 2:17-2:28
22 forall (a :: [Type]) 22 forall (a :: [Type])
23 . sameLayerCounts a 23 . sameLayerCounts a
24 => HList a 24 => HList a -> FrameBuffer (ImageLC (head a)) (map GetImageKind a)
25 -> FrameBuffer (ImageLC (head Type a)) (map Type ImageKind GetImageKind a)
26testdata/framebuffer02.reject.lc 2:17-5:30 25testdata/framebuffer02.reject.lc 2:17-5:30
27 FrameBuffer 26 FrameBuffer
28 1 27 1
29 (map 28 (map
30 Type
31 ImageKind
32 GetImageKind 29 GetImageKind
33 ' [Image 1 ('Color (VecScalar 4 Float)) 30 ' [Image 1 ('Color (VecScalar 4 Float))
34 , Image 2 ('Color (VecScalar 4 Float)) 31 , Image 2 ('Color (VecScalar 4 Float))
diff --git a/testdata/gfx03.out b/testdata/gfx03.out
index 0a5740b2..21f8838b 100644
--- a/testdata/gfx03.out
+++ b/testdata/gfx03.out
@@ -28,8 +28,11 @@ Pipeline
28 } 28 }
29 uniform mat4 MVP2; 29 uniform mat4 MVP2;
30 in vec3 vi1; 30 in vec3 vi1;
31 vec4 v3FToV4F(vec3 z0) {
32 return vec4 ((z0).x,(z0).y,(z0).z,1.0);
33 }
31 void main() { 34 void main() {
32 gl_Position = (MVP2) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); 35 gl_Position = (MVP2) * (v3FToV4F (vi1));
33 } 36 }
34 """ 37 """
35 , geometryShader = Nothing 38 , geometryShader = Nothing
@@ -60,9 +63,12 @@ Pipeline
60 uniform mat4 MVP2; 63 uniform mat4 MVP2;
61 in vec3 vi1; 64 in vec3 vi1;
62 smooth out vec4 vo1; 65 smooth out vec4 vo1;
66 vec4 v3FToV4F(vec3 z0) {
67 return vec4 ((z0).x,(z0).y,(z0).z,1.0);
68 }
63 void main() { 69 void main() {
64 gl_Position = (MVP2) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0)); 70 gl_Position = (MVP2) * (v3FToV4F (vi1));
65 vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); 71 vo1 = v3FToV4F (vi1);
66 } 72 }
67 """ 73 """
68 , geometryShader = Nothing 74 , geometryShader = Nothing
diff --git a/testdata/id.out b/testdata/id.out
index e9d1758f..c964ee71 100644
--- a/testdata/id.out
+++ b/testdata/id.out
@@ -1,7 +1,6 @@
1main is not found 1main is not found
2------------ desugared source code 2------------ desugared source code
3main' 3main' = _lhs main' (_rhs let a = \(b :: _) -> b in (a 4.0, a True))
4 = _lhs main' (_rhs let a = _lhs id' (_rhs \(b :: _) -> b) in (a 4.0, a True))
5------------ core code 4------------ core code
6main' :: (Float, Bool) 5main' :: (Float, Bool)
7main' = _rhs (4.0, True) 6main' = _rhs (4.0, True)
diff --git a/testdata/instantiate.out b/testdata/instantiate.out
index 95bc2af4..3f58a244 100644
--- a/testdata/instantiate.out
+++ b/testdata/instantiate.out
@@ -1,7 +1,6 @@
1main is not found 1main is not found
2------------ desugared source code 2------------ desugared source code
3main' 3main' = _lhs main' (_rhs let a = PrimAdd in a (V2 1.0 2.0) (V2 1.0 2.0))
4 = _lhs main' (_rhs let a = _lhs f (_rhs PrimAdd) in a (V2 1.0 2.0) (V2 1.0 2.0))
5------------ core code 4------------ core code
6main' :: VecS Float 2 5main' :: VecS Float 2
7main' = _rhs (PrimAdd ('VecS 'Float 2) TT (V2 1.0 2.0) (V2 1.0 2.0)) 6main' = _rhs (PrimAdd ('VecS 'Float 2) TT (V2 1.0 2.0) (V2 1.0 2.0))
diff --git a/testdata/instantiate2.out b/testdata/instantiate2.out
index bd3f4135..4c7edf03 100644
--- a/testdata/instantiate2.out
+++ b/testdata/instantiate2.out
@@ -1,13 +1,10 @@
1main :: (VecS Float 2, Float) 1main :: (VecS Float 2, Float)
2main = (PrimAdd ('VecS 'Float 2) TT (V2 1.0 2.0) (V2 2.3 3.4), 3.0) 2main = (PrimAdd ('VecS 'Float 2) TT (V2 1.0 2.0) (V2 2.3 3.4), 3.0)
3------------ desugared source code 3------------ desugared source code
4main 4main = _lhs main (_rhs let a = (+) in (a (V2 1.0 2.0) (V2 2.3 3.4), a 1.0 2.0))
5 = _lhs
6 main
7 (_rhs let a = _lhs f (_rhs (+)) in (a (V2 1.0 2.0) (V2 2.3 3.4), a 1.0 2.0))
8------------ core code 5------------ core code
9main :: (VecS Float 2, Float) 6main :: (VecS Float 2, Float)
10main = _rhs (PrimAdd ('VecS 'Float 2) TT (V2 1.0 2.0) (V2 2.3 3.4), 3.0) 7main = _rhs (V2 1.0 2.0 + V2 2.3 3.4, 1.0 + 2.0)
11------------ tooltips 8------------ tooltips
12testdata/instantiate2.lc 1:1-1:5 9testdata/instantiate2.lc 1:1-1:5
13 (VecS Float 2, Float) 10 (VecS Float 2, Float)
diff --git a/testdata/it.out b/testdata/it.out
index 0c3dce37..d0ab8e96 100644
--- a/testdata/it.out
+++ b/testdata/it.out
@@ -1,7 +1,9 @@
1main :: Bool 1main :: Bool
2main = True 2main = True
3------------ desugared source code 3------------ desugared source code
4from = _lhs from (_rhs \(a :: _) -> a : from (primAddInt (fromInt 1) a)) 4from
5 = primFix
6 \(a :: _) -> _lhs from (_rhs \(b :: _) -> b : a (primAddInt (fromInt 1) b))
5 7
6main 8main
7 = _lhs 9 = _lhs
@@ -33,7 +35,7 @@ main
33 (from (fromInt 0)))) 35 (from (fromInt 0))))
34------------ core code 36------------ core code
35from :: Int -> [Int] 37from :: Int -> [Int]
36from = primFix ('Int -> ['Int]) \a -> _rhs \b -> b : a (primAddInt 1 b) 38from = primFix _ \a -> _rhs \b -> b : a (primAddInt 1 b)
37 39
38main :: Bool 40main :: Bool
39main = _rhs True 41main = _rhs True
diff --git a/testdata/language-features/adt/adt02.out b/testdata/language-features/adt/adt02.out
index 84ef7d80..992c314e 100644
--- a/testdata/language-features/adt/adt02.out
+++ b/testdata/language-features/adt/adt02.out
@@ -126,19 +126,19 @@ one2 :: Data2 -> Bool
126one2 = \a -> case'Data2 (\_ -> 'Bool) (\b _ _ -> _rhs b) a 126one2 = \a -> case'Data2 (\_ -> 'Bool) (\b _ _ -> _rhs b) a
127 127
128one3 :: forall a b c . Data3 a b c -> a 128one3 :: forall a b c . Data3 a b c -> a
129one3 = \a _ _ b -> case'Data3 (\_ -> a) (\c _ _ -> _rhs c) b 129one3 = \a b c d -> case'Data3 (\_ -> a) (\e _ _ -> _rhs e) d
130 130
131thr2 :: Data2 -> Bool 131thr2 :: Data2 -> Bool
132thr2 = \a -> case'Data2 (\_ -> 'Bool) (\_ _ b -> _rhs b) a 132thr2 = \a -> case'Data2 (\_ -> 'Bool) (\_ _ b -> _rhs b) a
133 133
134thr3 :: forall a b c . Data3 a b c -> c 134thr3 :: forall a b c . Data3 a b c -> c
135thr3 = \_ _ a b -> case'Data3 (\_ -> a) (\_ _ c -> _rhs c) b 135thr3 = \a b c d -> case'Data3 (\_ -> c) (\_ _ e -> _rhs e) d
136 136
137two2 :: Data2 -> String 137two2 :: Data2 -> String
138two2 = \a -> case'Data2 (\_ -> 'String) (\_ b _ -> _rhs b) a 138two2 = \a -> case'Data2 (\_ -> 'String) (\_ b _ -> _rhs b) a
139 139
140two3 :: forall a b c . Data3 a b c -> b 140two3 :: forall a b c . Data3 a b c -> b
141two3 = \_ a _ b -> case'Data3 (\_ -> a) (\_ c _ -> _rhs c) b 141two3 = \a b c d -> case'Data3 (\_ -> b) (\_ e _ -> _rhs e) d
142 142
143value1 :: Data1 143value1 :: Data1
144value1 = _rhs (Data1 True) 144value1 = _rhs (Data1 True)
diff --git a/testdata/language-features/adt/adt05.out b/testdata/language-features/adt/adt05.out
index c44d22b9..aed76869 100644
--- a/testdata/language-features/adt/adt05.out
+++ b/testdata/language-features/adt/adt05.out
@@ -1,5 +1,5 @@
1main :: @Type -> forall a . Num a => Bool 1main :: @Type -> forall a . Num a => Bool
2main = main 2main = \_ _ _ -> True
3------------ desugared source code 3------------ desugared source code
4data TList (_ :: Type) :: Type where 4data TList (_ :: Type) :: Type where
5 TEmpty :: forall a . TList a 5 TEmpty :: forall a . TList a
@@ -47,10 +47,10 @@ case'TList
47case'TList = \_ a b c d -> <<case function of a type with 1 parameters>> 47case'TList = \_ a b c d -> <<case function of a type with 1 parameters>>
48 48
49isCons :: forall a . TList a -> Bool 49isCons :: forall a . TList a -> Bool
50isCons = \_ a -> case'TList (\_ -> 'Bool) (_rhs False) (\_ _ -> _rhs True) a 50isCons = \a b -> case'TList (\_ -> 'Bool) (_rhs False) (\_ _ -> _rhs True) b
51 51
52isEmpty :: forall a . TList a -> Bool 52isEmpty :: forall a . TList a -> Bool
53isEmpty = \_ a -> case'TList (\_ -> 'Bool) (_rhs True) (\_ _ -> _rhs False) a 53isEmpty = \a b -> case'TList (\_ -> 'Bool) (_rhs True) (\_ _ -> _rhs False) b
54 54
55main :: @Type -> forall a . Num a => Bool 55main :: @Type -> forall a . Num a => Bool
56main = \_ _ _ -> _rhs True 56main = \_ _ _ -> _rhs True
diff --git a/testdata/language-features/as-pattern/as-pattern01.out b/testdata/language-features/as-pattern/as-pattern01.out
index 5b9c82cd..3e2c4116 100644
--- a/testdata/language-features/as-pattern/as-pattern01.out
+++ b/testdata/language-features/as-pattern/as-pattern01.out
@@ -1,5 +1,6 @@
1main :: forall a . (Eq a, Num (MatVecScalarElem a), Eq a, Num a) => Bool 1main :: forall a . (Eq a, Num (MatVecScalarElem a), Eq a, Num a) => Bool
2main = main 2main
3 = \b c d e f -> (b == c) (g (fromInt b f 3) (fromInt b f 1)) (fromInt b f 5)
3------------ desugared source code 4------------ desugared source code
4f 5f
5 = _lhs 6 = _lhs
@@ -37,7 +38,7 @@ g
37main :: forall a . (Eq a, Num (MatVecScalarElem a), Eq a, Num a) => Bool 38main :: forall a . (Eq a, Num (MatVecScalarElem a), Eq a, Num a) => Bool
38main 39main
39 = \a b c d e -> _rhs 40 = \a b c d e -> _rhs
40 ((a == b) (g a c d e (fromInt a e 3) (fromInt a e 1)) (fromInt a e 5)) 41 ((a == b) (g (fromInt a e 3) (fromInt a e 1)) (fromInt a e 5))
41------------ tooltips 42------------ tooltips
42testdata/language-features/as-pattern/as-pattern01.lc 1:1-1:2 43testdata/language-features/as-pattern/as-pattern01.lc 1:1-1:2
43 forall a . [a] -> [a] 44 forall a . [a] -> [a]
diff --git a/testdata/language-features/as-pattern/as-pattern02.out b/testdata/language-features/as-pattern/as-pattern02.out
index 8a9f96bc..8b4ba9d5 100644
--- a/testdata/language-features/as-pattern/as-pattern02.out
+++ b/testdata/language-features/as-pattern/as-pattern02.out
@@ -4,7 +4,24 @@ main
4 => forall b 4 => forall b
5 . (a ~ [b], Eq b, Num b) 5 . (a ~ [b], Eq b, Num b)
6 => forall c . Eq c => forall d . (c ~ [d], Eq d, Num d) => Bool 6 => forall c . Eq c => forall d . (c ~ [d], Eq d, Num d) => Bool
7main = main 7main
8 = \_ _ e _ f g _ _ h _ i j -> PrimAnd
9 (undefined
10 ([e] -> [e] -> 'Bool)
11 (primIfThenElse
12 [e]
13 ((e == f) (fromInt e g 0) (fromInt e g 0))
14 [fromInt e g 1]
15 [fromInt e g 0, fromInt e g 1])
16 [fromInt e g 1])
17 (undefined
18 ([h] -> [h] -> 'Bool)
19 (primIfThenElse
20 [h]
21 ((h == i) (fromInt h j 1) (fromInt h j 0))
22 []
23 [fromInt h j 1])
24 [fromInt h j 1])
8------------ desugared source code 25------------ desugared source code
9f 26f
10 = _lhs 27 = _lhs
@@ -43,20 +60,9 @@ main
43 (PrimAnd 60 (PrimAnd
44 (undefined 61 (undefined
45 ([a] -> [a] -> 'Bool) 62 ([a] -> [a] -> 'Bool)
46 (primIfThenElse 63 (f [fromInt a c 0, fromInt a c 1])
47 [a]
48 ((a == b) (fromInt a c 0) (fromInt a c 0))
49 [fromInt a c 1]
50 [fromInt a c 0, fromInt a c 1])
51 [fromInt a c 1]) 64 [fromInt a c 1])
52 (undefined 65 (undefined ([d] -> [d] -> 'Bool) (f [fromInt d f 1]) [fromInt d f 1]))
53 ([d] -> [d] -> 'Bool)
54 (primIfThenElse
55 [d]
56 ((d == e) (fromInt d f 1) (fromInt d f 0))
57 []
58 [fromInt d f 1])
59 [fromInt d f 1]))
60------------ tooltips 66------------ tooltips
61testdata/language-features/as-pattern/as-pattern02.lc 3:1-3:2 67testdata/language-features/as-pattern/as-pattern02.lc 3:1-3:2
62 forall a . (Eq a, Num a) => [a] -> [a] 68 forall a . (Eq a, Num a) => [a] -> [a]
diff --git a/testdata/language-features/basic-list/dotdot01.out b/testdata/language-features/basic-list/dotdot01.out
index 9b85b6a5..c564f228 100644
--- a/testdata/language-features/basic-list/dotdot01.out
+++ b/testdata/language-features/basic-list/dotdot01.out
@@ -4,7 +4,7 @@ main = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]
4main = _lhs main (_rhs (fromTo (fromInt 1) (fromInt 10))) 4main = _lhs main (_rhs (fromTo (fromInt 1) (fromInt 10)))
5------------ core code 5------------ core code
6main :: [Float] 6main :: [Float]
7main = _rhs [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0] 7main = _rhs (1.0 : fromTo (1.0 + 1.0) 10.0)
8------------ tooltips 8------------ tooltips
9testdata/language-features/basic-list/dotdot01.lc 2:1-2:5 9testdata/language-features/basic-list/dotdot01.lc 2:1-2:5
10 [Float] 10 [Float]
diff --git a/testdata/language-features/basic-list/listcomp01.out b/testdata/language-features/basic-list/listcomp01.out
index ace40823..0c20b420 100644
--- a/testdata/language-features/basic-list/listcomp01.out
+++ b/testdata/language-features/basic-list/listcomp01.out
@@ -3,7 +3,7 @@ main is not found
3value = _lhs value (_rhs (concatMap (\(_ :: _) -> [()]) [(), (), (), ()])) 3value = _lhs value (_rhs (concatMap (\(_ :: _) -> [()]) [(), (), (), ()]))
4------------ core code 4------------ core code
5value :: [()] 5value :: [()]
6value = _rhs [(), (), (), ()] 6value = _rhs (() : [] ++ foldr (++) [] (map (\_ -> [()]) [(), (), ()]))
7------------ tooltips 7------------ tooltips
8testdata/language-features/basic-list/listcomp01.lc 1:1-1:6 8testdata/language-features/basic-list/listcomp01.lc 1:1-1:6
9 [()] 9 [()]
diff --git a/testdata/language-features/basic-list/listcomp02.out b/testdata/language-features/basic-list/listcomp02.out
index 18619ff6..528fef4a 100644
--- a/testdata/language-features/basic-list/listcomp02.out
+++ b/testdata/language-features/basic-list/listcomp02.out
@@ -8,7 +8,7 @@ l :: [()]
8l = _rhs [(), (), (), ()] 8l = _rhs [(), (), (), ()]
9 9
10value :: [()] 10value :: [()]
11value = _rhs [(), (), (), ()] 11value = _rhs (() : [] ++ foldr (++) [] (map (\a -> [a]) [(), (), ()]))
12------------ tooltips 12------------ tooltips
13testdata/language-features/basic-list/listcomp02.lc 1:1-1:2 13testdata/language-features/basic-list/listcomp02.lc 1:1-1:2
14 [()] 14 [()]
diff --git a/testdata/language-features/basic-list/listcomp04.out b/testdata/language-features/basic-list/listcomp04.out
index 4d43ac94..dfd8bd3c 100644
--- a/testdata/language-features/basic-list/listcomp04.out
+++ b/testdata/language-features/basic-list/listcomp04.out
@@ -9,7 +9,11 @@ l :: [()]
9l = _rhs [(), (), (), ()] 9l = _rhs [(), (), (), ()]
10 10
11value :: [()] 11value :: [()]
12value = _rhs [(), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ()] 12value
13 = _rhs
14 (()
15 : [] ++ foldr (++) [] (map (\_ -> [()]) [(), (), ()])
16 ++ foldr (++) [] (map (\_ -> concatMap ' () ' () (\_ -> [()]) l) [(), (), ()]))
13------------ tooltips 17------------ tooltips
14testdata/language-features/basic-list/listcomp04.lc 1:1-1:2 18testdata/language-features/basic-list/listcomp04.lc 1:1-1:2
15 [()] 19 [()]
diff --git a/testdata/language-features/basic-list/listcomp05.out b/testdata/language-features/basic-list/listcomp05.out
index c9e56736..46e18270 100644
--- a/testdata/language-features/basic-list/listcomp05.out
+++ b/testdata/language-features/basic-list/listcomp05.out
@@ -11,7 +11,7 @@ value
11 [(), ()])) 11 [(), ()]))
12------------ core code 12------------ core code
13value :: [()] 13value :: [()]
14value = _rhs [(), ()] 14value = _rhs (u : [] ++ foldr (++) [] (map (\_ -> [u]) [()]))
15------------ tooltips 15------------ tooltips
16testdata/language-features/basic-list/listcomp05.lc 1:1-1:6 16testdata/language-features/basic-list/listcomp05.lc 1:1-1:6
17 [()] 17 [()]
diff --git a/testdata/language-features/basic-list/listcomp06.out b/testdata/language-features/basic-list/listcomp06.out
index cf4e2b31..b0e13efb 100644
--- a/testdata/language-features/basic-list/listcomp06.out
+++ b/testdata/language-features/basic-list/listcomp06.out
@@ -22,10 +22,14 @@ value2
22 [(), ()])) 22 [(), ()]))
23------------ core code 23------------ core code
24value1 :: [()] 24value1 :: [()]
25value1 = _rhs [(), ()] 25value1
26 = _rhs
27 (u : [] ++ foldr (++) [] (map (\_ -> primIfThenElse [' ()] True [u] []) [()]))
26 28
27value2 :: [()] 29value2 :: [()]
28value2 = _rhs [(), ()] 30value2
31 = _rhs
32 (u : [] ++ foldr (++) [] (map (\_ -> primIfThenElse [' ()] True [u] []) [()]))
29------------ tooltips 33------------ tooltips
30testdata/language-features/basic-list/listcomp06.lc 1:1-1:7 34testdata/language-features/basic-list/listcomp06.lc 1:1-1:7
31 [()] 35 [()]
diff --git a/testdata/language-features/basic-list/listcomp07.out b/testdata/language-features/basic-list/listcomp07.out
index 2f4d633a..cbabbc48 100644
--- a/testdata/language-features/basic-list/listcomp07.out
+++ b/testdata/language-features/basic-list/listcomp07.out
@@ -40,13 +40,19 @@ value3
40 [(), ()])) 40 [(), ()]))
41------------ core code 41------------ core code
42value1 :: [()] 42value1 :: [()]
43value1 = _rhs [(), ()] 43value1
44 = _rhs
45 (u : [] ++ foldr (++) [] (map (\_ -> primIfThenElse [' ()] True [u] []) [()]))
44 46
45value2 :: [()] 47value2 :: [()]
46value2 = _rhs [(), ()] 48value2
49 = _rhs
50 (u : [] ++ foldr (++) [] (map (\_ -> primIfThenElse [' ()] True [u] []) [()]))
47 51
48value3 :: [()] 52value3 :: [()]
49value3 = _rhs [(), ()] 53value3
54 = _rhs
55 (u : [] ++ foldr (++) [] (map (\_ -> primIfThenElse [' ()] True [u] []) [()]))
50------------ tooltips 56------------ tooltips
51testdata/language-features/basic-list/listcomp07.lc 1:1-1:7 57testdata/language-features/basic-list/listcomp07.lc 1:1-1:7
52 [()] 58 [()]
diff --git a/testdata/language-features/basic-values/def01.out b/testdata/language-features/basic-values/def01.out
index 6564e1b8..eba795a8 100644
--- a/testdata/language-features/basic-values/def01.out
+++ b/testdata/language-features/basic-values/def01.out
@@ -7,10 +7,10 @@ fun1 = _lhs fun1 \(_ :: _) -> _rhs (fromInt 1)
7fun2 = _lhs fun2 \(_ :: _) (_ :: _) (_ :: _) (_ :: _) (_ :: _) -> _rhs 'c' 7fun2 = _lhs fun2 \(_ :: _) (_ :: _) (_ :: _) (_ :: _) (_ :: _) -> _rhs 'c'
8------------ core code 8------------ core code
9fun1 :: forall a b . Num b => a -> b 9fun1 :: forall a b . Num b => a -> b
10fun1 = \_ a b _ -> _rhs (fromInt a b 1) 10fun1 = \a b c _ -> _rhs (fromInt b c 1)
11 11
12fun2 :: forall a b c d e . a -> b -> c -> d -> e -> Char 12fun2 :: forall a b c d e . a -> b -> c -> d -> e -> Char
13fun2 = \_ _ _ _ _ _ _ _ _ _ -> _rhs 'c' 13fun2 = \a b c d e _ _ _ _ _ -> _rhs 'c'
14 14
15unit :: () 15unit :: ()
16unit = _rhs () 16unit = _rhs ()
diff --git a/testdata/language-features/basic-values/def04.out b/testdata/language-features/basic-values/def04.out
index 127129e9..d4fbfa4e 100644
--- a/testdata/language-features/basic-values/def04.out
+++ b/testdata/language-features/basic-values/def04.out
@@ -28,11 +28,11 @@ fun
28 28
29fun2 :: forall a b . (Eq a, Num a, Eq a, Num a) => a -> b -> Char 29fun2 :: forall a b . (Eq a, Num a, Eq a, Num a) => a -> b -> Char
30fun2 30fun2
31 = \a _ b c d e f _ -> case'Bool 31 = \a b c d e f g _ -> case'Bool
32 (\_ -> 'Char) 32 (\_ -> 'Char)
33 (case'Bool (\_ -> 'Char) (_rhs '_') (_rhs '2') ((a == b) (fromInt a c 2) f)) 33 (case'Bool (\_ -> 'Char) (_rhs '_') (_rhs '2') ((a == c) (fromInt a d 2) g))
34 (_rhs '1') 34 (_rhs '1')
35 ((a == d) (fromInt a e 1) f) 35 ((a == e) (fromInt a f 1) g)
36------------ tooltips 36------------ tooltips
37testdata/language-features/basic-values/def04.lc 1:1-1:4 37testdata/language-features/basic-values/def04.lc 1:1-1:4
38 forall a . (Eq a, Num a, Eq a, Num a) => a -> Char 38 forall a . (Eq a, Num a, Eq a, Num a) => a -> Char
diff --git a/testdata/language-features/basic-values/deforder03.out b/testdata/language-features/basic-values/deforder03.out
index cf40c23e..66cb3c71 100644
--- a/testdata/language-features/basic-values/deforder03.out
+++ b/testdata/language-features/basic-values/deforder03.out
@@ -1,6 +1,6 @@
1main is not found 1main is not found
2------------ desugared source code 2------------ desugared source code
3value = _lhs value (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs a) in '1') 3value = _lhs value (_rhs let a = (); b = a in '1')
4------------ core code 4------------ core code
5value :: Char 5value :: Char
6value = _rhs '1' 6value = _rhs '1'
diff --git a/testdata/language-features/basic-values/deforder04.out b/testdata/language-features/basic-values/deforder04.out
index 767b8a9b..17a9a408 100644
--- a/testdata/language-features/basic-values/deforder04.out
+++ b/testdata/language-features/basic-values/deforder04.out
@@ -1,6 +1,6 @@
1main is not found 1main is not found
2------------ desugared source code 2------------ desugared source code
3value = _lhs value (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs a) in '1') 3value = _lhs value (_rhs let a = (); b = a in '1')
4------------ core code 4------------ core code
5value :: Char 5value :: Char
6value = _rhs '1' 6value = _rhs '1'
diff --git a/testdata/language-features/basic-values/deforder05.out b/testdata/language-features/basic-values/deforder05.out
index 7345785e..abc83591 100644
--- a/testdata/language-features/basic-values/deforder05.out
+++ b/testdata/language-features/basic-values/deforder05.out
@@ -1,6 +1,6 @@
1main is not found 1main is not found
2------------ desugared source code 2------------ desugared source code
3value = _lhs value (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs a) in '1') 3value = _lhs value (_rhs let a = (); b = a in '1')
4------------ core code 4------------ core code
5value :: Char 5value :: Char
6value = _rhs '1' 6value = _rhs '1'
diff --git a/testdata/language-features/basic-values/deforder06.out b/testdata/language-features/basic-values/deforder06.out
index 2a0ead81..c44eec77 100644
--- a/testdata/language-features/basic-values/deforder06.out
+++ b/testdata/language-features/basic-values/deforder06.out
@@ -1,6 +1,6 @@
1main is not found 1main is not found
2------------ desugared source code 2------------ desugared source code
3value = _lhs value (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs a) in '1') 3value = _lhs value (_rhs let a = (); b = a in '1')
4------------ core code 4------------ core code
5value :: Char 5value :: Char
6value = _rhs '1' 6value = _rhs '1'
diff --git a/testdata/language-features/basic-values/fixity01.out b/testdata/language-features/basic-values/fixity01.out
index f4f17b40..689c921a 100644
--- a/testdata/language-features/basic-values/fixity01.out
+++ b/testdata/language-features/basic-values/fixity01.out
@@ -17,16 +17,16 @@ infixr 6 >>>>
17infixr 6 funR 17infixr 6 funR
18------------ core code 18------------ core code
19<<<< :: forall a b . a -> b -> a 19<<<< :: forall a b . a -> b -> a
20<<<< = \_ _ a _ -> _rhs a 20<<<< = \a b c _ -> _rhs c
21 21
22>>>> :: forall a b . a -> b -> b 22>>>> :: forall a b . a -> b -> b
23>>>> = \_ _ _ a -> _rhs a 23>>>> = \a b _ c -> _rhs c
24 24
25funL :: forall a b . a -> b -> a 25funL :: forall a b . a -> b -> a
26funL = \_ _ a _ -> _rhs a 26funL = \a b c _ -> _rhs c
27 27
28funR :: forall a b . a -> b -> a 28funR :: forall a b . a -> b -> a
29funR = \_ _ a _ -> _rhs a 29funR = \a b c _ -> _rhs c
30------------ tooltips 30------------ tooltips
31testdata/language-features/basic-values/fixity01.lc 1:1-1:5 31testdata/language-features/basic-values/fixity01.lc 1:1-1:5
32 forall a b . a -> b -> a 32 forall a b . a -> b -> a
diff --git a/testdata/language-features/basic-values/fixity02.out b/testdata/language-features/basic-values/fixity02.out
index b07707af..1dbf5728 100644
--- a/testdata/language-features/basic-values/fixity02.out
+++ b/testdata/language-features/basic-values/fixity02.out
@@ -55,16 +55,16 @@ funValue7
55funValue8 = _lhs funValue8 (_rhs (() `funL` 'c' `funL` "hi" `funL` 1.2 :: ())) 55funValue8 = _lhs funValue8 (_rhs (() `funL` 'c' `funL` "hi" `funL` 1.2 :: ()))
56------------ core code 56------------ core code
57<@ :: forall a b . a -> b -> a 57<@ :: forall a b . a -> b -> a
58<@ = \_ _ a _ -> _rhs a 58<@ = \a b c _ -> _rhs c
59 59
60@> :: forall a b . a -> b -> b 60@> :: forall a b . a -> b -> b
61@> = \_ _ _ a -> _rhs a 61@> = \a b _ c -> _rhs c
62 62
63funL :: forall a b . a -> b -> a 63funL :: forall a b . a -> b -> a
64funL = \_ _ a _ -> _rhs a 64funL = \a b c _ -> _rhs c
65 65
66funR :: forall a b . a -> b -> b 66funR :: forall a b . a -> b -> b
67funR = \_ _ _ a -> _rhs a 67funR = \a b _ c -> _rhs c
68 68
69funValue1 :: Float 69funValue1 :: Float
70funValue1 = _rhs 1.2 70funValue1 = _rhs 1.2
diff --git a/testdata/language-features/basic-values/infix01.out b/testdata/language-features/basic-values/infix01.out
index ced45621..55d5dad5 100644
--- a/testdata/language-features/basic-values/infix01.out
+++ b/testdata/language-features/basic-values/infix01.out
@@ -5,10 +5,10 @@ fun = _lhs fun \(_ :: _) (_ :: _) -> _rhs ()
5value = _lhs value \(a :: _) (b :: _) -> _rhs (a `fun` b) 5value = _lhs value \(a :: _) (b :: _) -> _rhs (a `fun` b)
6------------ core code 6------------ core code
7fun :: forall a b . a -> b -> () 7fun :: forall a b . a -> b -> ()
8fun = \_ _ _ _ -> _rhs () 8fun = \a b _ _ -> _rhs ()
9 9
10value :: forall a b . a -> b -> () 10value :: forall a b . a -> b -> ()
11value = \_ _ _ _ -> _rhs () 11value = \a b _ _ -> _rhs ()
12------------ tooltips 12------------ tooltips
13testdata/language-features/basic-values/infix01.lc 1:1-1:4 13testdata/language-features/basic-values/infix01.lc 1:1-1:4
14 forall a b . a -> b -> () 14 forall a b . a -> b -> ()
diff --git a/testdata/language-features/basic-values/infix02.out b/testdata/language-features/basic-values/infix02.out
index 888f4d9f..c32a0ce7 100644
--- a/testdata/language-features/basic-values/infix02.out
+++ b/testdata/language-features/basic-values/infix02.out
@@ -5,10 +5,10 @@ fun = _lhs fun \(_ :: _) (_ :: _) (_ :: _) -> _rhs ()
5value = _lhs value \(a :: _) (b :: _) -> _rhs (a `fun` b) 5value = _lhs value \(a :: _) (b :: _) -> _rhs (a `fun` b)
6------------ core code 6------------ core code
7fun :: forall a b c . a -> b -> c -> () 7fun :: forall a b c . a -> b -> c -> ()
8fun = \_ _ _ _ _ _ -> _rhs () 8fun = \a b c _ _ _ -> _rhs ()
9 9
10value :: forall a b c . a -> b -> c -> () 10value :: forall a b c . a -> b -> c -> ()
11value = \a b c d e -> _rhs (fun a b c d e) 11value = \a b c d e -> _rhs (fun d e)
12------------ tooltips 12------------ tooltips
13testdata/language-features/basic-values/infix02.lc 1:1-1:4 13testdata/language-features/basic-values/infix02.lc 1:1-1:4
14 forall a b c . a -> b -> c -> () 14 forall a b c . a -> b -> c -> ()
diff --git a/testdata/language-features/basic-values/lambda01.out b/testdata/language-features/basic-values/lambda01.out
index 0a07171f..1476c47f 100644
--- a/testdata/language-features/basic-values/lambda01.out
+++ b/testdata/language-features/basic-values/lambda01.out
@@ -15,17 +15,17 @@ fun4
15 -> ()) 15 -> ())
16------------ core code 16------------ core code
17fun1 :: forall a . a -> () 17fun1 :: forall a . a -> ()
18fun1 = \_ -> _rhs \_ -> () 18fun1 = \a -> _rhs \_ -> ()
19 19
20fun2 :: forall a . a -> () 20fun2 :: forall a . a -> ()
21fun2 = \_ -> _rhs \_ -> () 21fun2 = \a -> _rhs \_ -> ()
22 22
23fun3 :: forall a . a -> () 23fun3 :: forall a . a -> ()
24fun3 = \_ -> _rhs \_ -> () 24fun3 = \a -> _rhs \_ -> ()
25 25
26fun4 26fun4
27 :: forall a b c d e f g h i . a -> b -> c -> d -> e -> f -> g -> h -> i -> () 27 :: forall a b c d e f g h i . a -> b -> c -> d -> e -> f -> g -> h -> i -> ()
28fun4 = \_ _ _ _ _ _ _ _ _ -> _rhs \_ _ _ _ _ _ _ _ _ -> () 28fun4 = \a b c d e f g h i -> _rhs \_ _ _ _ _ _ _ _ _ -> ()
29------------ tooltips 29------------ tooltips
30testdata/language-features/basic-values/lambda01.lc 1:1-1:5 30testdata/language-features/basic-values/lambda01.lc 1:1-1:5
31 forall a . a -> () 31 forall a . a -> ()
diff --git a/testdata/language-features/basic-values/lambda03.out b/testdata/language-features/basic-values/lambda03.out
index f9ddcaa4..50af2ae5 100644
--- a/testdata/language-features/basic-values/lambda03.out
+++ b/testdata/language-features/basic-values/lambda03.out
@@ -5,10 +5,10 @@ fun1 = _lhs fun1 (_rhs \(_ :: _) (a :: _) (_ :: _) -> a)
5fun2 = _lhs fun2 \(a :: _) -> _rhs \(_ :: _) (_ :: _) (_ :: _) -> a 5fun2 = _lhs fun2 \(a :: _) -> _rhs \(_ :: _) (_ :: _) (_ :: _) -> a
6------------ core code 6------------ core code
7fun1 :: forall a b c . a -> b -> c -> b 7fun1 :: forall a b c . a -> b -> c -> b
8fun1 = \_ _ _ -> _rhs \_ a _ -> a 8fun1 = \a b c -> _rhs \_ d _ -> d
9 9
10fun2 :: forall a b c d . a -> b -> c -> d -> a 10fun2 :: forall a b c d . a -> b -> c -> d -> a
11fun2 = \_ _ _ _ a -> _rhs \_ _ _ -> a 11fun2 = \a b c d e -> _rhs \_ _ _ -> e
12------------ tooltips 12------------ tooltips
13testdata/language-features/basic-values/lambda03.lc 1:1-1:5 13testdata/language-features/basic-values/lambda03.lc 1:1-1:5
14 forall a b c . a -> b -> c -> b 14 forall a b c . a -> b -> c -> b
diff --git a/testdata/language-features/basic-values/let01.out b/testdata/language-features/basic-values/let01.out
index 7d40e348..bd59a558 100644
--- a/testdata/language-features/basic-values/let01.out
+++ b/testdata/language-features/basic-values/let01.out
@@ -1,21 +1,14 @@
1main is not found 1main is not found
2------------ desugared source code 2------------ desugared source code
3value1 = _lhs value1 (_rhs let a = _lhs x (_rhs (fromInt 1)) in fromInt 1) 3value1 = _lhs value1 (_rhs let a = fromInt 1 in fromInt 1)
4 4
5value2 = _lhs value2 (_rhs let a = _lhs x (_rhs (fromInt 1)) in fromInt 1) 5value2 = _lhs value2 (_rhs let a = fromInt 1 in fromInt 1)
6 6
7value3 7value3 = _lhs value3 (_rhs let a = fromInt 1; b = 'c' in fromInt 1)
8 = _lhs
9 value3
10 (_rhs let a = _lhs x (_rhs (fromInt 1)); b = _lhs y (_rhs 'c') in fromInt 1)
11 8
12value4 = _lhs value4 (_rhs let a = _lhs x (_rhs (fromInt 1)) in fromInt 1) 9value4 = _lhs value4 (_rhs let a = fromInt 1 in fromInt 1)
13 10
14value5 11value5 = _lhs value5 (_rhs let a = fromInt 1; b = fromInt 2 in fromInt 1)
15 = _lhs
16 value5
17 (_rhs
18 let a = _lhs x (_rhs (fromInt 1)); b = _lhs y (_rhs (fromInt 2)) in fromInt 1)
19------------ core code 12------------ core code
20value1 :: forall a . Num a => a 13value1 :: forall a . Num a => a
21value1 = \a b -> _rhs (fromInt a b 1) 14value1 = \a b -> _rhs (fromInt a b 1)
diff --git a/testdata/language-features/basic-values/let02.out b/testdata/language-features/basic-values/let02.out
index f9de03b4..574a8d36 100644
--- a/testdata/language-features/basic-values/let02.out
+++ b/testdata/language-features/basic-values/let02.out
@@ -5,15 +5,7 @@ value
5 value 5 value
6 (_rhs 6 (_rhs
7 let 7 let
8 a = _lhs x (_rhs ()); 8 a = (); b = let d = 'A' in (); c = let e = (); f = fromInt 1; g = "hello" in 'B'
9 b = _lhs y (_rhs let d = _lhs c (_rhs 'A') in ());
10 c
11 = _lhs
12 z
13 (_rhs
14 let
15 e = _lhs a (_rhs ()); f = _lhs b (_rhs (fromInt 1)); g = _lhs c (_rhs "hello")
16 in 'B')
17 in ()) 9 in ())
18------------ core code 10------------ core code
19value :: () 11value :: ()
diff --git a/testdata/language-features/basic-values/operator01.out b/testdata/language-features/basic-values/operator01.out
index 3b6dd323..817d1b5f 100644
--- a/testdata/language-features/basic-values/operator01.out
+++ b/testdata/language-features/basic-values/operator01.out
@@ -9,16 +9,16 @@ main is not found
9($$$) = _lhs ($$$) \(_ :: _) (_ :: _) -> _rhs () 9($$$) = _lhs ($$$) \(_ :: _) (_ :: _) -> _rhs ()
10------------ core code 10------------ core code
11#$# :: forall a b . a -> b -> () 11#$# :: forall a b . a -> b -> ()
12#$# = \_ _ _ _ -> _rhs () 12#$# = \a b _ _ -> _rhs ()
13 13
14$$# :: forall a b . a -> b -> () 14$$# :: forall a b . a -> b -> ()
15$$# = \_ _ _ _ -> _rhs () 15$$# = \a b _ _ -> _rhs ()
16 16
17$$$ :: forall a b . a -> b -> () 17$$$ :: forall a b . a -> b -> ()
18$$$ = \_ _ _ _ -> _rhs () 18$$$ = \a b _ _ -> _rhs ()
19 19
20$$$# :: forall a b . a -> b -> () 20$$$# :: forall a b . a -> b -> ()
21$$$# = \_ _ _ _ -> _rhs () 21$$$# = \a b _ _ -> _rhs ()
22------------ tooltips 22------------ tooltips
23testdata/language-features/basic-values/operator01.lc 1:3-1:6 23testdata/language-features/basic-values/operator01.lc 1:3-1:6
24 forall a b . a -> b -> () 24 forall a b . a -> b -> ()
diff --git a/testdata/language-features/basic-values/shadowing01.out b/testdata/language-features/basic-values/shadowing01.out
index b1288270..502ad96f 100644
--- a/testdata/language-features/basic-values/shadowing01.out
+++ b/testdata/language-features/basic-values/shadowing01.out
@@ -5,23 +5,12 @@ value
5 value 5 value
6 (_rhs 6 (_rhs
7 let 7 let
8 a = _lhs x (_rhs 'A'); 8 a = 'A';
9 b = _lhs y (_rhs "hello"); 9 b = "hello";
10 c 10 c
11 = _lhs 11 = let
12 c 12 d = fromInt 1; e = 2.12; f = let g = (); h = 'C'; i = 3.12 in "world"
13 (_rhs 13 in ()
14 let
15 d = _lhs x (_rhs (fromInt 1));
16 e = _lhs y (_rhs 2.12);
17 f
18 = _lhs
19 c
20 (_rhs
21 let
22 g = _lhs x (_rhs ()); h = _lhs y (_rhs 'C'); i = _lhs c (_rhs 3.12)
23 in "world")
24 in ())
25 in '7') 14 in '7')
26------------ core code 15------------ core code
27value :: Char 16value :: Char
diff --git a/testdata/language-features/basic-values/shadowing02.out b/testdata/language-features/basic-values/shadowing02.out
index 7edd4cef..aa0b9af2 100644
--- a/testdata/language-features/basic-values/shadowing02.out
+++ b/testdata/language-features/basic-values/shadowing02.out
@@ -9,27 +9,13 @@ value2
9 value2 9 value2
10 (_rhs 10 (_rhs
11 let 11 let
12 a = _lhs x (_rhs 'A'); 12 a = 'A';
13 b = _lhs y (_rhs "hello"); 13 b = "hello";
14 c = _lhs w (_rhs (fromInt 123)); 14 c = fromInt 123;
15 d 15 d
16 = _lhs 16 = let
17 c 17 e = fromInt 1; f = 2.12; g = let h = (); i = 'C'; j = 3.12; k = c in world
18 (_rhs 18 in ()
19 let
20 e = _lhs x (_rhs (fromInt 1));
21 f = _lhs y (_rhs 2.12);
22 g
23 = _lhs
24 c
25 (_rhs
26 let
27 h = _lhs x (_rhs ());
28 i = _lhs y (_rhs 'C');
29 j = _lhs c (_rhs 3.12);
30 k = _lhs d (_rhs c)
31 in world)
32 in ())
33 in '7') 19 in '7')
34------------ core code 20------------ core code
35c :: forall a . Num a => a 21c :: forall a . Num a => a
diff --git a/testdata/language-features/basic-values/shadowing03.out b/testdata/language-features/basic-values/shadowing03.out
index f796c908..cb7d1050 100644
--- a/testdata/language-features/basic-values/shadowing03.out
+++ b/testdata/language-features/basic-values/shadowing03.out
@@ -3,7 +3,7 @@ main is not found
3x = _lhs x \(_ :: _) (_ :: _) -> _rhs () 3x = _lhs x \(_ :: _) (_ :: _) -> _rhs ()
4------------ core code 4------------ core code
5x :: forall a b . a -> b -> () 5x :: forall a b . a -> b -> ()
6x = \_ _ _ _ -> _rhs () 6x = \a b _ _ -> _rhs ()
7------------ tooltips 7------------ tooltips
8testdata/language-features/basic-values/shadowing03.lc 1:1-1:2 8testdata/language-features/basic-values/shadowing03.lc 1:1-1:2
9 forall a b . a -> b -> () 9 forall a b . a -> b -> ()
diff --git a/testdata/language-features/basic-values/shadowing04.out b/testdata/language-features/basic-values/shadowing04.out
index 59d10c41..042c221d 100644
--- a/testdata/language-features/basic-values/shadowing04.out
+++ b/testdata/language-features/basic-values/shadowing04.out
@@ -3,7 +3,7 @@ main is not found
3__ = _lhs __ \(_ :: _) (_ :: _) -> _rhs () 3__ = _lhs __ \(_ :: _) (_ :: _) -> _rhs ()
4------------ core code 4------------ core code
5__ :: forall a b . a -> b -> () 5__ :: forall a b . a -> b -> ()
6__ = \_ _ _ _ -> _rhs () 6__ = \a b _ _ -> _rhs ()
7------------ tooltips 7------------ tooltips
8testdata/language-features/basic-values/shadowing04.lc 1:1-1:3 8testdata/language-features/basic-values/shadowing04.lc 1:1-1:3
9 forall a b . a -> b -> () 9 forall a b . a -> b -> ()
diff --git a/testdata/language-features/basic-values/typesig05.out b/testdata/language-features/basic-values/typesig05.out
index 7ca5e11a..fc1da409 100644
--- a/testdata/language-features/basic-values/typesig05.out
+++ b/testdata/language-features/basic-values/typesig05.out
@@ -15,10 +15,10 @@ value4 :: String
15value4 = _lhs value4 (_rhs (funR 'a' "b")) 15value4 = _lhs value4 (_rhs (funR 'a' "b"))
16------------ core code 16------------ core code
17funL :: forall a b . a -> b -> a 17funL :: forall a b . a -> b -> a
18funL = \_ _ a _ -> _rhs a 18funL = \a b c _ -> _rhs c
19 19
20funR :: forall a b . a -> b -> b 20funR :: forall a b . a -> b -> b
21funR = \_ _ _ a -> _rhs a 21funR = \a b _ c -> _rhs c
22 22
23value1 :: Char 23value1 :: Char
24value1 = _rhs 'a' 24value1 = _rhs 'a'
diff --git a/testdata/language-features/basic-values/typesig06.out b/testdata/language-features/basic-values/typesig06.out
index 6cc32fea..04783c47 100644
--- a/testdata/language-features/basic-values/typesig06.out
+++ b/testdata/language-features/basic-values/typesig06.out
@@ -9,10 +9,10 @@ value1 = _lhs value1 (_rhs ("hi" <@ 1.2 :: String))
9value2 = _lhs value2 (_rhs ("hi" `funL` 1.2 :: String)) 9value2 = _lhs value2 (_rhs ("hi" `funL` 1.2 :: String))
10------------ core code 10------------ core code
11<@ :: forall a b . a -> b -> a 11<@ :: forall a b . a -> b -> a
12<@ = \_ _ a _ -> _rhs a 12<@ = \a b c _ -> _rhs c
13 13
14funL :: forall a b . a -> b -> a 14funL :: forall a b . a -> b -> a
15funL = \_ _ a _ -> _rhs a 15funL = \a b c _ -> _rhs c
16 16
17value1 :: String 17value1 :: String
18value1 = _rhs "hi" 18value1 = _rhs "hi"
diff --git a/testdata/language-features/basic-values/where01.out b/testdata/language-features/basic-values/where01.out
index 3b56a3c4..45cdab5f 100644
--- a/testdata/language-features/basic-values/where01.out
+++ b/testdata/language-features/basic-values/where01.out
@@ -1,14 +1,14 @@
1main is not found 1main is not found
2------------ desugared source code 2------------ desugared source code
3value1 = _lhs value1 (_rhs let a = _lhs x (_rhs ()) in ()) 3value1 = _lhs value1 (_rhs let a = () in ())
4 4
5value2 = _lhs value2 (_rhs let a = _lhs x (_rhs ()) in a) 5value2 = _lhs value2 (_rhs let a = () in a)
6 6
7value3 = _lhs value3 (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs ()) in a) 7value3 = _lhs value3 (_rhs let a = (); b = () in a)
8 8
9value4 = _lhs value4 (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs ()) in b) 9value4 = _lhs value4 (_rhs let a = (); b = () in b)
10 10
11value5 = _lhs value5 (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs ()) in a) 11value5 = _lhs value5 (_rhs let a = (); b = () in a)
12 12
13value6 = _lhs value6 (_rhs ()) 13value6 = _lhs value6 (_rhs ())
14 14
@@ -16,13 +16,11 @@ value7 = _lhs value7 (_rhs ())
16 16
17value8 = _lhs value8 (_rhs ()) 17value8 = _lhs value8 (_rhs ())
18 18
19value9 = _lhs value9 (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs ()) in a) 19value9 = _lhs value9 (_rhs let a = (); b = () in a)
20 20
21value10 21value10 = _lhs value10 (_rhs let a = (); b = () in a)
22 = _lhs value10 (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs ()) in a)
23 22
24value11 23value11 = _lhs value11 (_rhs let a = (); b = () in a)
25 = _lhs value11 (_rhs let a = _lhs x (_rhs ()); b = _lhs y (_rhs ()) in a)
26------------ core code 24------------ core code
27value1 :: () 25value1 :: ()
28value1 = _rhs () 26value1 = _rhs ()
diff --git a/testdata/language-features/basic-values/where04.out b/testdata/language-features/basic-values/where04.out
index 3095e9d3..0c247314 100644
--- a/testdata/language-features/basic-values/where04.out
+++ b/testdata/language-features/basic-values/where04.out
@@ -1,13 +1,10 @@
1main is not found 1main is not found
2------------ desugared source code 2------------ desugared source code
3value1 3value1 = _lhs value1 (_rhs let a = let b = () in b in a)
4 = _lhs value1 (_rhs let a = _lhs x (_rhs let b = _lhs y (_rhs ()) in b) in a)
5 4
6value2 5value2 = _lhs value2 (_rhs let a = let b = () in b in a)
7 = _lhs value2 (_rhs let a = _lhs x (_rhs let b = _lhs y (_rhs ()) in b) in a)
8 6
9value3 7value3 = _lhs value3 (_rhs let a = let b = () in b in a)
10 = _lhs value3 (_rhs let a = _lhs x (_rhs let b = _lhs y (_rhs ()) in b) in a)
11------------ core code 8------------ core code
12value1 :: () 9value1 :: ()
13value1 = _rhs () 10value1 = _rhs ()
diff --git a/testdata/language-features/basic-values/where05.out b/testdata/language-features/basic-values/where05.out
index 0dc19f61..768de934 100644
--- a/testdata/language-features/basic-values/where05.out
+++ b/testdata/language-features/basic-values/where05.out
@@ -4,44 +4,28 @@ value1
4 = _lhs 4 = _lhs
5 value1 5 value1
6 (_rhs 6 (_rhs
7 ((\(a :: _) -> case'Bool 7 ((\(a :: _) -> case'Bool (\(_ :: _) -> _) () (let b = () in b) (fromInt 1 == a))
8 (\(_ :: _) -> _)
9 ()
10 (let b = _lhs x (_rhs ()) in b)
11 (fromInt 1 == a))
12 (fromInt 1))) 8 (fromInt 1)))
13 9
14value2 10value2
15 = _lhs 11 = _lhs
16 value2 12 value2
17 (_rhs 13 (_rhs
18 ((\(a :: _) -> case'Bool 14 ((\(a :: _) -> case'Bool (\(_ :: _) -> _) () (let b = () in b) (fromInt 1 == a))
19 (\(_ :: _) -> _)
20 ()
21 (let b = _lhs x (_rhs ()) in b)
22 (fromInt 1 == a))
23 (fromInt 1))) 15 (fromInt 1)))
24 16
25value3 17value3
26 = _lhs 18 = _lhs
27 value3 19 value3
28 (_rhs 20 (_rhs
29 ((\(a :: _) -> case'Bool 21 ((\(a :: _) -> case'Bool (\(_ :: _) -> _) () (let b = () in b) (fromInt 1 == a))
30 (\(_ :: _) -> _)
31 ()
32 (let b = _lhs x (_rhs ()) in b)
33 (fromInt 1 == a))
34 (fromInt 1))) 22 (fromInt 1)))
35 23
36value4 24value4
37 = _lhs 25 = _lhs
38 value4 26 value4
39 (_rhs 27 (_rhs
40 let a = _lhs x (_rhs ()) in (\(b :: _) -> case'Bool 28 let a = () in (\(b :: _) -> case'Bool (\(_ :: _) -> _) () a (fromInt 1 == b))
41 (\(_ :: _) -> _)
42 ()
43 a
44 (fromInt 1 == b))
45 (fromInt 1)) 29 (fromInt 1))
46------------ core code 30------------ core code
47value1 :: forall a . (Eq a, Num a) => () 31value1 :: forall a . (Eq a, Num a) => ()
diff --git a/testdata/language-features/basic-values/wildcard01.out b/testdata/language-features/basic-values/wildcard01.out
index b462aac7..4f954c87 100644
--- a/testdata/language-features/basic-values/wildcard01.out
+++ b/testdata/language-features/basic-values/wildcard01.out
@@ -3,7 +3,7 @@ main is not found
3funUnit = _lhs funUnit \(_ :: _) -> _rhs () 3funUnit = _lhs funUnit \(_ :: _) -> _rhs ()
4------------ core code 4------------ core code
5funUnit :: forall a . a -> () 5funUnit :: forall a . a -> ()
6funUnit = \_ _ -> _rhs () 6funUnit = \a _ -> _rhs ()
7------------ tooltips 7------------ tooltips
8testdata/language-features/basic-values/wildcard01.lc 1:1-1:8 8testdata/language-features/basic-values/wildcard01.lc 1:1-1:8
9 forall a . a -> () 9 forall a . a -> ()
diff --git a/testdata/language-features/pattern/caseWhere.out b/testdata/language-features/pattern/caseWhere.out
index 3c090334..0a5e69c4 100644
--- a/testdata/language-features/pattern/caseWhere.out
+++ b/testdata/language-features/pattern/caseWhere.out
@@ -5,12 +5,7 @@ main
5 = _lhs 5 = _lhs
6 main 6 main
7 (_rhs 7 (_rhs
8 ((\(a :: _) -> let b = _lhs c (_rhs a) in case'Bool 8 ((\(a :: _) -> let b = a in case'Bool (\(_ :: _) -> _) undefined a b) True))
9 (\(_ :: _) -> _)
10 undefined
11 a
12 b)
13 True))
14------------ core code 9------------ core code
15main :: Bool 10main :: Bool
16main = _rhs True 11main = _rhs True
diff --git a/testdata/language-features/pattern/unreachable.out b/testdata/language-features/pattern/unreachable.out
index 7b7df75d..8eb5d0db 100644
--- a/testdata/language-features/pattern/unreachable.out
+++ b/testdata/language-features/pattern/unreachable.out
@@ -3,7 +3,7 @@ main is not found
3f = _lhs f \(_ :: _) -> _rhs "hello" 3f = _lhs f \(_ :: _) -> _rhs "hello"
4------------ core code 4------------ core code
5f :: forall a . a -> String 5f :: forall a . a -> String
6f = \_ _ -> _rhs "hello" 6f = \a _ -> _rhs "hello"
7------------ tooltips 7------------ tooltips
8testdata/language-features/pattern/unreachable.lc 4:1-4:2 8testdata/language-features/pattern/unreachable.lc 4:1-4:2
9 forall a . a -> String 9 forall a . a -> String
diff --git a/testdata/language-features/pattern/viewPattern.out b/testdata/language-features/pattern/viewPattern.out
index f8fdb6d9..654f8467 100644
--- a/testdata/language-features/pattern/viewPattern.out
+++ b/testdata/language-features/pattern/viewPattern.out
@@ -9,7 +9,7 @@ main
9 (_rhs ((\(a :: _) -> case'Bool (\(_ :: _) -> _) undefined True (id a)) True)) 9 (_rhs ((\(a :: _) -> case'Bool (\(_ :: _) -> _) undefined True (id a)) True))
10------------ core code 10------------ core code
11id :: forall a . a -> a 11id :: forall a . a -> a
12id = \_ a -> _rhs a 12id = \a b -> _rhs b
13 13
14main :: Bool 14main :: Bool
15main = _rhs True 15main = _rhs True
diff --git a/testdata/language-features/recursion/mutualConst.lc b/testdata/language-features/recursion/mutualConst.lc
index c7f83f18..526a14a7 100644
--- a/testdata/language-features/recursion/mutualConst.lc
+++ b/testdata/language-features/recursion/mutualConst.lc
@@ -1,9 +1,14 @@
1{-# LANGUAGE NoImplicitPrelude #-}
2import Internals
1 3
2xy = (\x y -> ((1 :: Int): y, 1: x)) (fst xy) (snd xy) 4fst (x, y) = x
5snd (x, y) = y
6
7xy = (\x y -> (False: y, True: x)) (fst xy) (snd xy)
3 8
4(x, y) = xy 9(x, y) = xy
5 10
6main = case x of 11main = case x of
7 1: 1: 1: _ -> True 12 False: True: False: _ -> True
8 13
9 14
diff --git a/testdata/language-features/recursion/mutualConst.out b/testdata/language-features/recursion/mutualConst.out
index 4791ed55..34d37bc7 100644
--- a/testdata/language-features/recursion/mutualConst.out
+++ b/testdata/language-features/recursion/mutualConst.out
@@ -1 +1,194 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4fst
5 = _lhs
6 fst
7 \(a :: _) -> hlistConsCase
8 _
9 (\(b :: _) (c :: _) -> hlistConsCase
10 _
11 (\(_ :: _) (d :: _) -> hlistNilCase _ (_rhs b) d)
12 c)
13 a
14
15snd
16 = _lhs
17 snd
18 \(a :: _) -> hlistConsCase
19 _
20 (\(_ :: _) (b :: _) -> hlistConsCase
21 _
22 (\(c :: _) (d :: _) -> hlistNilCase _ (_rhs c) d)
23 b)
24 a
25
26xy
27 = primFix
28 \(a :: _) -> _lhs
29 xy
30 (_rhs ((\(b :: _) (c :: _) -> (False : c, True : b)) (fst a) (snd a)))
31
32_y_x = _lhs _y_x (_rhs xy)
33
34y
35 = _lhs
36 y
37 (_rhs
38 ((\(a :: _) -> hlistConsCase
39 _
40 (\(_ :: _) (b :: _) -> hlistConsCase
41 _
42 (\(c :: _) (d :: _) -> hlistNilCase _ c d)
43 b)
44 a)
45 _y_x))
46
47x
48 = _lhs
49 x
50 (_rhs
51 ((\(a :: _) -> hlistConsCase
52 _
53 (\(b :: _) (c :: _) -> hlistConsCase
54 _
55 (\(_ :: _) (d :: _) -> hlistNilCase _ b d)
56 c)
57 a)
58 _y_x))
59
60main
61 = _lhs
62 main
63 (_rhs
64 ((\(a :: _) -> case'List
65 (\(_ :: _) -> _)
66 undefined
67 (\(b :: _) (c :: _) -> case'Bool
68 (\(_ :: _) -> _)
69 (case'List
70 (\(_ :: _) -> _)
71 undefined
72 (\(d :: _) (e :: _) -> case'Bool
73 (\(_ :: _) -> _)
74 undefined
75 (case'List
76 (\(_ :: _) -> _)
77 undefined
78 (\(f :: _) (_ :: _) -> case'Bool (\(_ :: _) -> _) True undefined f)
79 e)
80 d)
81 c)
82 undefined
83 b)
84 a)
85 x))
86------------ core code
87_y_x :: ([Bool], [Bool])
88_y_x = _rhs (False : snd xy, True : fst xy)
89
90fst :: forall a b . (a, b) -> a
91fst
92 = \a b c -> hlistConsCase
93 a
94 [b]
95 a
96 (\d e -> hlistConsCase b [] a (\_ f -> hlistNilCase a (_rhs d) f) e)
97 c
98
99main :: Bool
100main = _rhs True
101
102snd :: forall a b . (a, b) -> b
103snd
104 = \a b c -> hlistConsCase
105 a
106 [b]
107 b
108 (\_ d -> hlistConsCase b [] b (\e f -> hlistNilCase b (_rhs e) f) d)
109 c
110
111x :: [Bool]
112x = _rhs (False : snd xy)
113
114xy :: ([Bool], [Bool])
115xy = primFix _ \a -> _rhs (False : snd a, True : fst a)
116
117y :: [Bool]
118y = _rhs (True : fst xy)
119------------ tooltips
120testdata/language-features/recursion/mutualConst.lc 4:1-4:4
121 forall a b . (a, b) -> a
122testdata/language-features/recursion/mutualConst.lc 4:14-4:15
123 _k | _h | _d
124testdata/language-features/recursion/mutualConst.lc 5:1-5:4
125 forall a b . (a, b) -> b
126testdata/language-features/recursion/mutualConst.lc 5:14-5:15
127 _f | _c | _c
128testdata/language-features/recursion/mutualConst.lc 7:1-7:3
129 ([Bool], [Bool])
130testdata/language-features/recursion/mutualConst.lc 7:6-7:44
131 [Bool] -> ([Bool], [Bool])
132testdata/language-features/recursion/mutualConst.lc 7:6-7:53
133 ([Bool], [Bool])
134testdata/language-features/recursion/mutualConst.lc 7:15-7:34
135 ([Bool], [Bool])
136testdata/language-features/recursion/mutualConst.lc 7:16-7:21
137 Bool
138testdata/language-features/recursion/mutualConst.lc 7:16-7:22
139 [Bool] -> [Bool]
140testdata/language-features/recursion/mutualConst.lc 7:16-7:24
141 [Bool]
142testdata/language-features/recursion/mutualConst.lc 7:21-7:22
143 forall a . a -> [a] -> [a]
144testdata/language-features/recursion/mutualConst.lc 7:23-7:24
145 _c
146testdata/language-features/recursion/mutualConst.lc 7:26-7:30
147 Bool
148testdata/language-features/recursion/mutualConst.lc 7:26-7:31
149 [Bool] -> [Bool]
150testdata/language-features/recursion/mutualConst.lc 7:26-7:33
151 [Bool] | (([Bool]))
152testdata/language-features/recursion/mutualConst.lc 7:30-7:31
153 forall a . a -> [a] -> [a]
154testdata/language-features/recursion/mutualConst.lc 7:32-7:33
155 _e
156testdata/language-features/recursion/mutualConst.lc 7:37-7:40
157 forall a b . (a, b) -> a
158testdata/language-features/recursion/mutualConst.lc 7:37-7:43
159 _b
160testdata/language-features/recursion/mutualConst.lc 7:41-7:43
161 _d
162testdata/language-features/recursion/mutualConst.lc 7:46-7:49
163 forall a b . (a, b) -> b
164testdata/language-features/recursion/mutualConst.lc 7:46-7:52
165 [Bool]
166testdata/language-features/recursion/mutualConst.lc 7:50-7:52
167 ([Bool], [Bool])
168testdata/language-features/recursion/mutualConst.lc 9:2-9:3
169 _k | _h | _d | [Bool]
170testdata/language-features/recursion/mutualConst.lc 9:2-9:6
171 ([Bool], [Bool]) | ([Bool], [Bool]) | ([Bool], [Bool])
172testdata/language-features/recursion/mutualConst.lc 9:5-9:6
173 _f | _c | _c | [Bool]
174testdata/language-features/recursion/mutualConst.lc 9:10-9:12
175 ([Bool], [Bool])
176testdata/language-features/recursion/mutualConst.lc 11:1-11:5
177 Bool
178testdata/language-features/recursion/mutualConst.lc 11:8-12:34
179 Bool
180testdata/language-features/recursion/mutualConst.lc 11:13-11:14
181 [Bool]
182testdata/language-features/recursion/mutualConst.lc 12:30-12:34
183 Bool | Bool | Bool | Bool | Bool | Bool
184------------ warnings
185Uncovered pattern(s) at testdata/language-features/recursion/mutualConst.lc:11:13:
186main = case x of
187 ^
188Missing case(s):
189 []
190 [False]
191 (False : False : _)
192 [False, True]
193 (False : True : True : _)
194 (True : _) \ No newline at end of file
diff --git a/testdata/language-features/recursion/mutualFunc.lc b/testdata/language-features/recursion/mutualFunc.lc
new file mode 100644
index 00000000..2f3a524e
--- /dev/null
+++ b/testdata/language-features/recursion/mutualFunc.lc
@@ -0,0 +1,11 @@
1{-# LANGUAGE NoImplicitPrelude #-}
2import Internals
3
4f True = g False
5f False = g True
6
7g True = True
8g x = f x
9
10main = f True
11
diff --git a/testdata/language-features/recursion/mutualFunc.out b/testdata/language-features/recursion/mutualFunc.out
new file mode 100644
index 00000000..6dd3f158
--- /dev/null
+++ b/testdata/language-features/recursion/mutualFunc.out
@@ -0,0 +1,107 @@
1main :: Bool
2main = True
3------------ desugared source code
4_g_f
5 = primFix
6 \(a :: _) -> let
7 b = a;
8 c
9 = (\(e :: _) -> hlistConsCase
10 _
11 (\(_ :: _) (f :: _) -> hlistConsCase
12 _
13 (\(g :: _) (h :: _) -> hlistNilCase _ g h)
14 f)
15 e)
16 b;
17 d
18 = (\(i :: _) -> hlistConsCase
19 _
20 (\(j :: _) (k :: _) -> hlistConsCase
21 _
22 (\(_ :: _) (l :: _) -> hlistNilCase _ j l)
23 k)
24 i)
25 b
26 in (_lhs g \(m :: _) -> case'Bool (\(_ :: _) -> _) (_rhs (c m)) (_rhs True) m
27 , _lhs
28 f
29 \(n :: _) -> case'Bool (\(_ :: _) -> _) (_rhs (d True)) (_rhs (d False)) n)
30
31_f_g = _g_f
32
33f
34 = (\(a :: _) -> hlistConsCase
35 _
36 (\(_ :: _) (b :: _) -> hlistConsCase
37 _
38 (\(c :: _) (d :: _) -> hlistNilCase _ c d)
39 b)
40 a)
41 _f_g
42
43g
44 = (\(a :: _) -> hlistConsCase
45 _
46 (\(b :: _) (c :: _) -> hlistConsCase
47 _
48 (\(_ :: _) (d :: _) -> hlistNilCase _ b d)
49 c)
50 a)
51 _f_g
52
53main = _lhs main (_rhs (f True))
54------------ core code
55_f_g :: (Bool -> Bool, Bool -> Bool)
56_f_g = primFix _ \a -> <<1st constructor of 'HList>>
57
58_g_f :: (Bool -> Bool, Bool -> Bool)
59_g_f = primFix _ \a -> <<1st constructor of 'HList>>
60
61f :: Bool -> Bool
62f = \a -> case'Bool (\_ -> 'Bool) (_rhs True) (_rhs True) a
63
64g :: Bool -> Bool
65g = \a -> case'Bool (\_ -> 'Bool) (_rhs (f a)) (_rhs True) a
66
67main :: Bool
68main = _rhs True
69------------ tooltips
70testdata/language-features/recursion/mutualFunc.lc 4:1-4:2
71 _f | _c | _c | _f | _c | _c | Bool -> Bool
72testdata/language-features/recursion/mutualFunc.lc 4:1-7:2
73 _b | _e | (_e, _d) | (Bool -> Bool, Bool -> Bool) | (Bool -> Bool
74 , Bool -> Bool) | (Bool -> Bool, Bool -> Bool) | (Bool -> Bool
75 , Bool -> Bool) | (Bool -> Bool, Bool -> Bool)
76testdata/language-features/recursion/mutualFunc.lc 4:10-4:11
77 Bool -> _a
78testdata/language-features/recursion/mutualFunc.lc 4:10-4:17
79 _a
80testdata/language-features/recursion/mutualFunc.lc 4:10-5:17
81 Bool -> _a | ((Bool -> _a))
82testdata/language-features/recursion/mutualFunc.lc 4:10-8:10
83 (Bool -> Bool, Bool -> _a)
84testdata/language-features/recursion/mutualFunc.lc 4:12-4:17
85 Bool
86testdata/language-features/recursion/mutualFunc.lc 5:11-5:12
87 _i
88testdata/language-features/recursion/mutualFunc.lc 5:13-5:17
89 Bool
90testdata/language-features/recursion/mutualFunc.lc 7:1-7:2
91 _k | _h | _d | _k | _h | _d | Bool -> Bool
92testdata/language-features/recursion/mutualFunc.lc 7:10-7:14
93 Bool
94testdata/language-features/recursion/mutualFunc.lc 7:10-8:10
95 Bool -> Bool
96testdata/language-features/recursion/mutualFunc.lc 8:7-8:8
97 _h
98testdata/language-features/recursion/mutualFunc.lc 8:9-8:10
99 _f
100testdata/language-features/recursion/mutualFunc.lc 10:1-10:5
101 Bool
102testdata/language-features/recursion/mutualFunc.lc 10:8-10:9
103 Bool -> Bool
104testdata/language-features/recursion/mutualFunc.lc 10:8-10:14
105 Bool
106testdata/language-features/recursion/mutualFunc.lc 10:10-10:14
107 Bool \ No newline at end of file
diff --git a/testdata/language-features/recursion/mutualRec.lc b/testdata/language-features/recursion/mutualRec.lc
index c9ae6135..9a9422de 100644
--- a/testdata/language-features/recursion/mutualRec.lc
+++ b/testdata/language-features/recursion/mutualRec.lc
@@ -1,8 +1,10 @@
1{-# LANGUAGE NoImplicitPrelude #-}
2import Internals
1 3
2x = 2: y 4x = False: y
3y = 1: x 5y = True: x
4 6
5main = case (x :: [Int]) of 7main = case x of
6 2: 1: 2: _ -> True 8 False: True: False: _ -> True
7 9
8 10
diff --git a/testdata/language-features/recursion/mutualRec.out b/testdata/language-features/recursion/mutualRec.out
index 4791ed55..885bd1ba 100644
--- a/testdata/language-features/recursion/mutualRec.out
+++ b/testdata/language-features/recursion/mutualRec.out
@@ -1 +1,139 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4_y_x
5 = primFix
6 \(a :: _) -> let
7 b = a;
8 c
9 = (\(e :: _) -> hlistConsCase
10 _
11 (\(_ :: _) (f :: _) -> hlistConsCase
12 _
13 (\(g :: _) (h :: _) -> hlistNilCase _ g h)
14 f)
15 e)
16 b;
17 d
18 = (\(i :: _) -> hlistConsCase
19 _
20 (\(j :: _) (k :: _) -> hlistConsCase
21 _
22 (\(_ :: _) (l :: _) -> hlistNilCase _ j l)
23 k)
24 i)
25 b
26 in (_lhs y (_rhs (True : c)), _lhs x (_rhs (False : d)))
27
28_x_y = _y_x
29
30x
31 = (\(a :: _) -> hlistConsCase
32 _
33 (\(_ :: _) (b :: _) -> hlistConsCase
34 _
35 (\(c :: _) (d :: _) -> hlistNilCase _ c d)
36 b)
37 a)
38 _x_y
39
40y
41 = (\(a :: _) -> hlistConsCase
42 _
43 (\(b :: _) (c :: _) -> hlistConsCase
44 _
45 (\(_ :: _) (d :: _) -> hlistNilCase _ b d)
46 c)
47 a)
48 _x_y
49
50main
51 = _lhs
52 main
53 (_rhs
54 ((\(a :: _) -> case'List
55 (\(_ :: _) -> _)
56 undefined
57 (\(b :: _) (c :: _) -> case'Bool
58 (\(_ :: _) -> _)
59 (case'List
60 (\(_ :: _) -> _)
61 undefined
62 (\(d :: _) (e :: _) -> case'Bool
63 (\(_ :: _) -> _)
64 undefined
65 (case'List
66 (\(_ :: _) -> _)
67 undefined
68 (\(f :: _) (_ :: _) -> case'Bool (\(_ :: _) -> _) True undefined f)
69 e)
70 d)
71 c)
72 undefined
73 b)
74 a)
75 x))
76------------ core code
77_x_y :: ([Bool], [Bool])
78_x_y = primFix _ \a -> <<1st constructor of 'HList>>
79
80_y_x :: ([Bool], [Bool])
81_y_x = primFix _ \a -> <<1st constructor of 'HList>>
82
83main :: Bool
84main = _rhs True
85
86x :: [Bool]
87x = _rhs (False : y)
88
89y :: [Bool]
90y = _rhs (True : x)
91------------ tooltips
92testdata/language-features/recursion/mutualRec.lc 4:1-4:2
93 _f | _c | _c | _f | _c | _c | [Bool]
94testdata/language-features/recursion/mutualRec.lc 4:1-5:2
95 _b | _e | (_e, _d) | ([Bool], [Bool]) | ([Bool], [Bool]) | ([Bool]
96 , [Bool]) | ([Bool], [Bool]) | ([Bool], [Bool])
97testdata/language-features/recursion/mutualRec.lc 4:5-4:10
98 Bool
99testdata/language-features/recursion/mutualRec.lc 4:5-4:11
100 [Bool] -> [Bool]
101testdata/language-features/recursion/mutualRec.lc 4:5-4:13
102 [Bool] | (([Bool]))
103testdata/language-features/recursion/mutualRec.lc 4:5-5:12
104 ([Bool], [Bool])
105testdata/language-features/recursion/mutualRec.lc 4:10-4:11
106 forall a . a -> [a] -> [a]
107testdata/language-features/recursion/mutualRec.lc 4:12-4:13
108 _e
109testdata/language-features/recursion/mutualRec.lc 5:1-5:2
110 _k | _h | _d | _k | _h | _d | [Bool]
111testdata/language-features/recursion/mutualRec.lc 5:5-5:9
112 Bool
113testdata/language-features/recursion/mutualRec.lc 5:5-5:10
114 [Bool] -> [Bool]
115testdata/language-features/recursion/mutualRec.lc 5:5-5:12
116 [Bool]
117testdata/language-features/recursion/mutualRec.lc 5:9-5:10
118 forall a . a -> [a] -> [a]
119testdata/language-features/recursion/mutualRec.lc 5:11-5:12
120 _d
121testdata/language-features/recursion/mutualRec.lc 7:1-7:5
122 Bool
123testdata/language-features/recursion/mutualRec.lc 7:8-8:34
124 Bool
125testdata/language-features/recursion/mutualRec.lc 7:13-7:14
126 [Bool]
127testdata/language-features/recursion/mutualRec.lc 8:30-8:34
128 Bool | Bool | Bool | Bool | Bool | Bool
129------------ warnings
130Uncovered pattern(s) at testdata/language-features/recursion/mutualRec.lc:7:13:
131main = case x of
132 ^
133Missing case(s):
134 []
135 [False]
136 (False : False : _)
137 [False, True]
138 (False : True : True : _)
139 (True : _) \ No newline at end of file
diff --git a/testdata/language-features/recursion/simplerec01.out b/testdata/language-features/recursion/simplerec01.out
index 736caa77..823d544e 100644
--- a/testdata/language-features/recursion/simplerec01.out
+++ b/testdata/language-features/recursion/simplerec01.out
@@ -1,18 +1,19 @@
1main is not found 1main is not found
2------------ desugared source code 2------------ desugared source code
3fun 3fun
4 = _lhs 4 = primFix
5 fun 5 \(a :: _) -> _lhs
6 \(a :: _) -> case'Bool 6 fun
7 (\(_ :: _) -> _) 7 \(b :: _) -> case'Bool
8 (_rhs (fun (fromInt 0))) 8 (\(_ :: _) -> _)
9 (_rhs 'a') 9 (_rhs (a (fromInt 0)))
10 (fromInt 0 == a) 10 (_rhs 'a')
11 (fromInt 0 == b)
11------------ core code 12------------ core code
12fun :: forall a . (Num a, Eq a, Num a) => a -> Char 13fun :: forall a . (Num a, Eq a, Num a) => a -> Char
13fun 14fun
14 = \a b c d -> primFix 15 = \a b c d -> primFix
15 (a -> 'Char) 16 _
16 \e f -> case'Bool 17 \e f -> case'Bool
17 (\_ -> 'Char) 18 (\_ -> 'Char)
18 (_rhs (e (fromInt a b 0))) 19 (_rhs (e (fromInt a b 0)))
diff --git a/testdata/language-features/section/section01.out b/testdata/language-features/section/section01.out
index a06769e3..0252cce5 100644
--- a/testdata/language-features/section/section01.out
+++ b/testdata/language-features/section/section01.out
@@ -7,13 +7,13 @@ value1 = _lhs value1 \(a :: _) -> _rhs \(b :: _) -> a !@! b
7value2 = _lhs value2 \(a :: _) -> _rhs \(b :: _) -> b !@! a 7value2 = _lhs value2 \(a :: _) -> _rhs \(b :: _) -> b !@! a
8------------ core code 8------------ core code
9!@! :: forall a b . a -> b -> () 9!@! :: forall a b . a -> b -> ()
10!@! = \_ _ _ _ -> _rhs () 10!@! = \a b _ _ -> _rhs ()
11 11
12value1 :: forall a b . a -> b -> () 12value1 :: forall a b . a -> b -> ()
13value1 = \a b c -> _rhs \d -> () 13value1 = \a b c -> _rhs \d -> c !@! d
14 14
15value2 :: forall a b . a -> b -> () 15value2 :: forall a b . a -> b -> ()
16value2 = \a b c -> _rhs \d -> () 16value2 = \a b c -> _rhs \d -> d !@! c
17------------ tooltips 17------------ tooltips
18testdata/language-features/section/section01.lc 1:3-1:6 18testdata/language-features/section/section01.lc 1:3-1:6
19 forall a b . a -> b -> () 19 forall a b . a -> b -> ()
diff --git a/testdata/let.out b/testdata/let.out
index a3809ea8..3a5eb302 100644
--- a/testdata/let.out
+++ b/testdata/let.out
@@ -2,13 +2,13 @@ main is not found
2------------ desugared source code 2------------ desugared source code
3id = _lhs id \(a :: _) -> _rhs a 3id = _lhs id \(a :: _) -> _rhs a
4 4
5f = _lhs f \(a :: _) -> _rhs let b = _lhs y (_rhs (id a)) in b 5f = _lhs f \(a :: _) -> _rhs let b = id a in b
6------------ core code 6------------ core code
7f :: forall a . a -> a 7f :: forall a . a -> a
8f = \_ a -> _rhs a 8f = \a b -> _rhs b
9 9
10id :: forall a . a -> a 10id :: forall a . a -> a
11id = \_ a -> _rhs a 11id = \a b -> _rhs b
12------------ tooltips 12------------ tooltips
13testdata/let.lc 4:1-4:3 13testdata/let.lc 4:1-4:3
14 forall a . a -> a 14 forall a . a -> a
diff --git a/testdata/letIndent.out b/testdata/letIndent.out
index 569c73ae..1aebe94e 100644
--- a/testdata/letIndent.out
+++ b/testdata/letIndent.out
@@ -1,13 +1,9 @@
1main is not found 1main is not found
2------------ desugared source code 2------------ desugared source code
3fun 3fun = _lhs fun \(a :: _) -> _rhs let b = fromInt 1; c = fromInt 2 in a
4 = _lhs
5 fun
6 \(a :: _) -> _rhs
7 let b = _lhs a (_rhs (fromInt 1)); c = _lhs b (_rhs (fromInt 2)) in a
8------------ core code 4------------ core code
9fun :: forall a . a -> a 5fun :: forall a . a -> a
10fun = \_ a -> _rhs a 6fun = \a b -> _rhs b
11------------ tooltips 7------------ tooltips
12testdata/letIndent.lc 2:1-2:4 8testdata/letIndent.lc 2:1-2:4
13 forall a . a -> a 9 forall a . a -> a
diff --git a/testdata/line01.out b/testdata/line01.out
index 9c5a0369..b138bafd 100644
--- a/testdata/line01.out
+++ b/testdata/line01.out
@@ -33,9 +33,12 @@ Pipeline
33 vec4 scale(float z0,vec4 z1) { 33 vec4 scale(float z0,vec4 z1) {
34 return (z1) * (vec4 (z0,z0,z0,1.0)); 34 return (z1) * (vec4 (z0,z0,z0,1.0));
35 } 35 }
36 vec4 v3FToV4F(vec3 z0) {
37 return vec4 ((z0).x,(z0).y,(z0).z,1.0);
38 }
36 void main() { 39 void main() {
37 gl_Position = scale (0.5,(MVP) * (vec4 ((vi1).x,(vi1).y,(vi1).z,1.0))); 40 gl_Position = scale (0.5,(MVP) * (v3FToV4F (vi1)));
38 vo1 = vec4 ((vi1).x,(vi1).y,(vi1).z,1.0); 41 vo1 = v3FToV4F (vi1);
39 } 42 }
40 """ 43 """
41 , geometryShader = Nothing 44 , geometryShader = Nothing
diff --git a/testdata/listcompr01.out b/testdata/listcompr01.out
index 0b839ae1..9624f5be 100644
--- a/testdata/listcompr01.out
+++ b/testdata/listcompr01.out
@@ -37,7 +37,14 @@ main
37 a)) 37 a))
38------------ core code 38------------ core code
39a :: [(Float, Float)] 39a :: [(Float, Float)]
40a = _rhs [(1.0, 1.0)] 40a
41 = _rhs
42 ((1.0, 1.0)
43 : [] ++ foldr (++) [] (map (\a -> [(1.0, a)]) [])
44 ++ foldr
45 (++)
46 []
47 (map (\b -> concatMap 'Float ' ('Float, 'Float) (\c -> [(b, c)]) [1.0]) []))
41 48
42main :: Bool 49main :: Bool
43main = _rhs True 50main = _rhs True
diff --git a/testdata/listcompr02.out b/testdata/listcompr02.out
index 88460fca..8692e5f9 100644
--- a/testdata/listcompr02.out
+++ b/testdata/listcompr02.out
@@ -103,7 +103,20 @@ main
103 a)) 103 a))
104------------ core code 104------------ core code
105a :: [(Float, Float)] 105a :: [(Float, Float)]
106a = _rhs [(1.0, 2.0), (1.0, 2.0), (1.0, 2.0), (1.0, 2.0)] 106a
107 = _rhs
108 ((1.0 *! 1.0, 1.0 +! 1.0)
109 : [] ++ foldr (++) [] (map (\a -> [(1.0 *! a, 1.0 +! a)]) [1.0])
110 ++ foldr
111 (++)
112 []
113 (map
114 (\b -> concatMap
115 ('MatVecScalarElem 'Float)
116 ' ('Float, 'Float)
117 (\c -> [(b *! c, b +! c)])
118 [1.0, 1.0])
119 [1.0]))
107 120
108main :: Bool 121main :: Bool
109main = _rhs True 122main = _rhs True
diff --git a/testdata/listcompr03.out b/testdata/listcompr03.out
index 9a33c1ea..7c9bf0d3 100644
--- a/testdata/listcompr03.out
+++ b/testdata/listcompr03.out
@@ -103,7 +103,20 @@ main
103 a)) 103 a))
104------------ core code 104------------ core code
105a :: [(Float, Float)] 105a :: [(Float, Float)]
106a = _rhs [(1.0, 2.0), (1.0, 2.0), (1.0, 2.0), (1.0, 2.0)] 106a
107 = _rhs
108 ((k *! 1.0 *! 1.0, 1.0 +! 1.0)
109 : [] ++ foldr (++) [] (map (\a -> [(k *! 1.0 *! a, 1.0 +! a)]) [1.0])
110 ++ foldr
111 (++)
112 []
113 (map
114 (\b -> concatMap
115 'Float
116 ' ('Float, 'Float)
117 (\c -> [(k *! b *! c, b +! c)])
118 [1.0, 1.0])
119 [k]))
107 120
108main :: Bool 121main :: Bool
109main = _rhs True 122main = _rhs True
diff --git a/testdata/listcompr04.out b/testdata/listcompr04.out
index db27d5d9..198e0383 100644
--- a/testdata/listcompr04.out
+++ b/testdata/listcompr04.out
@@ -35,7 +35,7 @@ main
35 a)) 35 a))
36------------ core code 36------------ core code
37a :: [Float] 37a :: [Float]
38a = _rhs [2.0, 4.0] 38a = _rhs (1.0 *! k : [] ++ foldr (++) [] (map (\a -> [a *! k]) [k]))
39 39
40main :: Bool 40main :: Bool
41main = _rhs True 41main = _rhs True
diff --git a/testdata/listcompr05.out b/testdata/listcompr05.out
index 0e6445e3..d058a5e0 100644
--- a/testdata/listcompr05.out
+++ b/testdata/listcompr05.out
@@ -43,7 +43,24 @@ main
43 a)) 43 a))
44------------ core code 44------------ core code
45a :: [Float] 45a :: [Float]
46a = _rhs [0.0, 0.0] 46a
47 = _rhs
48 (0.0 *! 1.0
49 : []
50 ++ foldr
51 (++)
52 []
53 (map (\a -> primIfThenElse ['Float] (isZero 0.0) [0.0 *! a] []) [2.0])
54 ++ foldr
55 (++)
56 []
57 (map
58 (\b -> concatMap
59 'Float
60 'Float
61 (\c -> primIfThenElse ['Float] (isZero b) [b *! c] [])
62 [1.0, 2.0])
63 [2.0]))
47 64
48isZero :: Float -> Bool 65isZero :: Float -> Bool
49isZero 66isZero
diff --git a/testdata/localfun.out b/testdata/localfun.out
index bf1b11b3..eace1650 100644
--- a/testdata/localfun.out
+++ b/testdata/localfun.out
@@ -12,7 +12,7 @@ f
12main = _lhs main (_rhs (f True False && f False True)) 12main = _lhs main (_rhs (f True False && f False True))
13------------ core code 13------------ core code
14f :: Bool -> Bool -> Bool 14f :: Bool -> Bool -> Bool
15f = \a b -> _rhs (g b a) 15f = \a b -> _rhs (g a)
16 16
17main :: Bool 17main :: Bool
18main = _rhs True 18main = _rhs True
diff --git a/testdata/localfun2.out b/testdata/localfun2.out
index ca1f097b..f2f0ef52 100644
--- a/testdata/localfun2.out
+++ b/testdata/localfun2.out
@@ -1,45 +1,40 @@
1main is not found 1main is not found
2------------ desugared source code 2------------ desugared source code
3split 3split
4 = _lhs 4 = primFix
5 split 5 \(a :: _) -> _lhs
6 \(a :: _) -> case'List 6 split
7 (\(_ :: _) -> _) 7 \(b :: _) -> case'List
8 (_rhs ([], [])) 8 (\(_ :: _) -> _)
9 (\(b :: _) (c :: _) -> _rhs 9 (_rhs ([], []))
10 let 10 (\(c :: _) (d :: _) -> _rhs
11 d = _lhs _bs_as (_rhs (split c)); 11 let
12 e 12 e = a d;
13 = _lhs 13 f
14 bs 14 = (\(h :: _) -> hlistConsCase
15 (_rhs 15 _
16 ((\(g :: _) -> hlistConsCase 16 (\(_ :: _) (i :: _) -> hlistConsCase
17 _ 17 _
18 (\(_ :: _) (h :: _) -> hlistConsCase 18 (\(j :: _) (k :: _) -> hlistNilCase _ j k)
19 _ 19 i)
20 (\(i :: _) (j :: _) -> hlistNilCase _ i j) 20 h)
21 h) 21 e;
22 g) 22 g
23 d)); 23 = (\(l :: _) -> hlistConsCase
24 f 24 _
25 = _lhs 25 (\(m :: _) (n :: _) -> hlistConsCase
26 as
27 (_rhs
28 ((\(k :: _) -> hlistConsCase
29 _ 26 _
30 (\(l :: _) (m :: _) -> hlistConsCase 27 (\(_ :: _) (o :: _) -> hlistNilCase _ m o)
31 _ 28 n)
32 (\(_ :: _) (n :: _) -> hlistNilCase _ l n) 29 l)
33 m) 30 e
34 k) 31 in (c : f, g))
35 d)) 32 b
36 in (b : e, f))
37 a
38------------ core code 33------------ core code
39split :: forall a . [a] -> ([a], [a]) 34split :: forall a . [a] -> ([a], [a])
40split 35split
41 = \a -> primFix 36 = \a -> primFix
42 ([a] -> ' ([a], [a])) 37 _
43 \b c -> case'List 38 \b c -> case'List
44 (\_ -> ' ([a], [a])) 39 (\_ -> ' ([a], [a]))
45 (_rhs ([], [])) 40 (_rhs ([], []))
diff --git a/testdata/loopIssue.out b/testdata/loopIssue.out
index 4791ed55..86b64220 100644
--- a/testdata/loopIssue.out
+++ b/testdata/loopIssue.out
@@ -1 +1,195 @@
1True \ No newline at end of file 1main :: Bool
2main = True
3------------ desugared source code
4data Inf :: Type where
5 Inf :: Inf -> Inf
6
7inf = primFix \(a :: _) -> _lhs inf (_rhs (Inf a))
8
9main'
10 = _lhs
11 main'
12 (_rhs ((\(a :: _) -> case'Inf (\(_ :: _) -> _) (\(_ :: _) -> True) a) inf))
13
14inf2 = _lhs inf2 (_rhs inf)
15
16(-) = _lhs (-) (_rhs primSubInt)
17
18repeat = primFix \(a :: _) -> _lhs repeat \(b :: _) -> _rhs ((b :: Bool) : a b)
19
20repeatT = primFix \(a :: _) -> _lhs repeatT (_rhs (True : a))
21
22primes = _lhs primes (_rhs repeatT)
23
24(!!)
25 = primFix
26 \(a :: _) -> _lhs
27 (!!)
28 \(b :: _) (c :: _) -> case'List
29 (\(_ :: _) -> _)
30 (_rhs undefined)
31 (\(d :: _) (e :: _) -> case'Bool
32 (\(_ :: _) -> _)
33 (_rhs (a e (c - fromInt 1)))
34 (_rhs d)
35 (fromInt 0 == c))
36 b
37
38main = _lhs main (_rhs (primes !! fromInt 20))
39------------ core code
40!! :: forall a . [a] -> Int -> a
41!!
42 = \a -> primFix
43 _
44 \b c d -> case'List
45 (\_ -> a)
46 (_rhs (undefined a))
47 (\e f -> case'Bool
48 (\_ -> a)
49 (_rhs (b f (primSubInt d 1)))
50 (_rhs e)
51 (isEQ (primCompareInt 0 d)))
52 c
53
54'Inf :: Type
55'Inf = <<type constructor with 0 indices; constructors: Inf>>
56
57- :: Int -> Int -> Int
58- = _rhs \a b -> primSubInt a b
59
60Inf :: Inf -> Inf
61Inf = <<0th constructor of 'Inf>>
62
63case'Inf
64 :: forall (a :: Inf -> Type)
65 -> (forall (b :: Inf) -> a ('Inf b)) -> forall (c :: Inf) -> a c
66case'Inf = \a b c -> <<case function of a type with 0 parameters>>
67
68inf :: Inf
69inf = primFix _ \a -> _rhs (Inf a)
70
71inf2 :: Inf
72inf2 = _rhs (Inf inf)
73
74main :: Bool
75main = _rhs True
76
77main' :: Bool
78main' = _rhs True
79
80match'Inf :: forall (a :: Type -> Type) -> a Inf -> forall b -> a b -> a b
81match'Inf = \a b c d -> <<type case function>>
82
83primes :: [Bool]
84primes = _rhs (True : repeatT)
85
86repeat :: Bool -> [Bool]
87repeat = primFix _ \a b -> _rhs (typeAnn b : a b)
88
89repeatT :: [Bool]
90repeatT = primFix _ \a -> _rhs (True : a)
91------------ tooltips
92testdata/loopIssue.lc 5:6-5:9
93 Type | Type | Type | Type | Type | Type
94testdata/loopIssue.lc 5:6-5:15
95 Type
96testdata/loopIssue.lc 5:12-5:15
97 Inf -> Inf | Inf | Type | Type
98testdata/loopIssue.lc 5:16-5:19
99 Type
100testdata/loopIssue.lc 7:1-7:4
101 Inf
102testdata/loopIssue.lc 7:7-7:10
103 Inf -> Inf
104testdata/loopIssue.lc 7:7-7:14
105 Inf
106testdata/loopIssue.lc 7:11-7:14
107 Inf
108testdata/loopIssue.lc 9:1-9:6
109 Bool
110testdata/loopIssue.lc 9:9-10:18
111 Bool
112testdata/loopIssue.lc 9:14-9:17
113 Inf
114testdata/loopIssue.lc 10:14-10:18
115 Bool
116testdata/loopIssue.lc 13:1-13:5
117 Inf
118testdata/loopIssue.lc 13:8-13:11
119 Inf
120testdata/loopIssue.lc 15:2-15:3
121 Int -> Int -> Int
122testdata/loopIssue.lc 15:7-15:17
123 Int -> Int -> Int
124testdata/loopIssue.lc 17:1-17:7
125 Bool -> [Bool]
126testdata/loopIssue.lc 17:12-17:24
127 [Bool] -> [Bool]
128testdata/loopIssue.lc 17:12-17:33
129 [Bool]
130testdata/loopIssue.lc 17:13-17:14
131 _b
132testdata/loopIssue.lc 17:13-17:22
133 Bool
134testdata/loopIssue.lc 17:18-17:22
135 Type
136testdata/loopIssue.lc 17:23-17:24
137 forall a . a -> [a] -> [a]
138testdata/loopIssue.lc 17:25-17:31
139 _c
140testdata/loopIssue.lc 17:32-17:33
141 Bool
142testdata/loopIssue.lc 19:1-19:8
143 [Bool]
144testdata/loopIssue.lc 19:11-19:15
145 Bool
146testdata/loopIssue.lc 19:11-19:16
147 [Bool] -> [Bool]
148testdata/loopIssue.lc 19:11-19:24
149 [Bool]
150testdata/loopIssue.lc 19:15-19:16
151 forall a . a -> [a] -> [a]
152testdata/loopIssue.lc 19:17-19:24
153 [Bool]
154testdata/loopIssue.lc 22:1-22:7
155 [Bool]
156testdata/loopIssue.lc 22:10-22:17
157 [Bool]
158testdata/loopIssue.lc 26:8-26:10
159 forall a . [a] -> Int -> a
160testdata/loopIssue.lc 26:15-26:16
161 _e
162testdata/loopIssue.lc 26:15-27:28
163 Bool -> _d | _c
164testdata/loopIssue.lc 27:17-27:19
165 [_h]
166testdata/loopIssue.lc 27:20-27:22
167 _k
168testdata/loopIssue.lc 27:24-27:25
169 _k
170testdata/loopIssue.lc 27:24-27:26
171 Int -> Int
172testdata/loopIssue.lc 27:24-27:27
173 Int
174testdata/loopIssue.lc 27:25-27:26
175 Int -> Int -> Int
176testdata/loopIssue.lc 27:26-27:27
177 _b
178testdata/loopIssue.lc 29:1-29:5
179 Bool
180testdata/loopIssue.lc 30:5-30:11
181 [Bool]
182testdata/loopIssue.lc 30:5-30:14
183 Int -> Bool
184testdata/loopIssue.lc 30:5-30:17
185 Bool
186testdata/loopIssue.lc 30:12-30:14
187 forall a . [a] -> Int -> a
188testdata/loopIssue.lc 30:15-30:17
189 _b
190------------ warnings
191Uncovered pattern(s) at testdata/loopIssue.lc:26:8:
192(x: _) !! 0 = x
193(_ : xs) !! n = xs !! (n-1)
194Missing case(s):
195 [] !! _ \ No newline at end of file
diff --git a/testdata/primes.out b/testdata/primes.out
index b74e882a..b741b012 100644
--- a/testdata/primes.out
+++ b/testdata/primes.out
@@ -1 +1,552 @@
131 \ No newline at end of file 1main :: Int
2main = 31
3------------ desugared source code
4infixr 0 $
5
6($) = _lhs ($) \(a :: _) (b :: _) -> _rhs (a b)
7
8id = _lhs id \(a :: _) -> _rhs a
9
10foldr
11 = primFix
12 \(a :: _) -> _lhs
13 foldr
14 \(b :: _) (c :: _) (d :: _) -> case'List
15 (\(_ :: _) -> _)
16 (_rhs c)
17 (\(e :: _) (f :: _) -> _rhs (b e $ a b c f))
18 d
19
20filter
21 = _lhs
22 filter
23 \(a :: _) -> _rhs
24 (foldr (\(b :: _) (c :: _) -> primIfThenElse (a b) (b : c) c) [])
25
26(&&)
27 = _lhs
28 (&&)
29 \(a :: _) (b :: _) -> case'Bool (\(_ :: _) -> _) (_rhs False) (_rhs b) a
30
31and = _lhs and (_rhs (foldr (&&) True))
32
33map = _lhs map \(a :: _) -> _rhs (foldr (\(b :: _) (c :: _) -> a b : c) [])
34
35mod = _lhs mod (_rhs primModInt)
36
37iSqrt
38 = _lhs iSqrt \(a :: _) -> _rhs (primRound (primSqrtFloat (primIntToFloat a)))
39
40(+) = _lhs (+) (_rhs primAddInt)
41
42(-) = _lhs (-) (_rhs primSubInt)
43
44(<=)
45 = _lhs
46 (<=)
47 \(a :: _) (b :: _) -> _rhs
48 ((\(c :: _) -> case'Ordering (\(_ :: _) -> _) True True False c)
49 (primCompareInt a b))
50
51not
52 = _lhs not \(a :: _) -> case'Bool (\(_ :: _) -> _) (_rhs True) (_rhs False) a
53
54(/=) = _lhs (/=) \(a :: _) (b :: _) -> _rhs (not $ a == b)
55
56takeWhile
57 = primFix
58 \(a :: _) -> _lhs
59 takeWhile
60 \(b :: _) (c :: _) -> case'List
61 (\(_ :: _) -> _)
62 (_rhs [])
63 (\(d :: _) (e :: _) -> case'Bool
64 (\(_ :: _) -> _)
65 (_rhs [])
66 (_rhs (d : a b e))
67 (b d))
68 c
69
70from = primFix \(a :: _) -> _lhs from \(b :: _) -> _rhs (b : a (b + fromInt 1))
71
72primes :: [Int]
73primes
74 = primFix
75 \(a :: [Int]) -> _lhs
76 primes
77 (_rhs
78 (fromInt 2
79 : fromInt 3
80 : filter
81 (\(b :: _) -> and
82 $ map
83 (\(c :: _) -> b `mod` c /= fromInt 0)
84 (takeWhile (\(d :: _) -> d <= iSqrt b) a))
85 (from (fromInt 5))))
86
87(!!)
88 = primFix
89 \(a :: _) -> _lhs
90 (!!)
91 \(b :: _) (c :: _) -> case'List
92 (\(_ :: _) -> _)
93 (_rhs undefined)
94 (\(d :: _) (e :: _) -> case'Bool
95 (\(_ :: _) -> _)
96 (_rhs (a e (c - fromInt 1)))
97 (_rhs d)
98 (fromInt 0 == c))
99 b
100
101main = _lhs main (_rhs (primes !! fromInt 10))
102------------ core code
103!! :: forall a . [a] -> Int -> a
104!!
105 = \a -> primFix
106 _
107 \b c d -> case'List
108 (\_ -> a)
109 (_rhs (undefined a))
110 (\e f -> case'Bool
111 (\_ -> a)
112 (_rhs (b f (primSubInt d 1)))
113 (_rhs e)
114 (isEQ (primCompareInt 0 d)))
115 c
116
117$ :: forall a b . (a -> b) -> a -> b
118$ = \a b c d -> _rhs (c d)
119
120&& :: Bool -> Bool -> Bool
121&& = \a b -> case'Bool (\_ -> 'Bool) (_rhs False) (_rhs b) a
122
123+ :: Int -> Int -> Int
124+ = _rhs \a b -> primAddInt a b
125
126- :: Int -> Int -> Int
127- = _rhs \a b -> primSubInt a b
128
129/= :: forall a . Eq a => a -> a -> Bool
130/= = \a b c d -> _rhs (not ((a == b) c d))
131
132<= :: Int -> Int -> Bool
133<=
134 = \a b -> _rhs
135 (case'Ordering (\_ -> 'Bool) True True False (primCompareInt a b))
136
137and :: [Bool] -> Bool
138and = _rhs (foldr (&&) True)
139
140filter :: forall a . (a -> Bool) -> [a] -> [a]
141filter = \a b -> _rhs (foldr (\c d -> primIfThenElse [a] (b c) (c : d) d) [])
142
143foldr :: forall a b . (b -> a -> a) -> a -> [b] -> a
144foldr
145 = \a b -> primFix
146 _
147 \c d e f -> case'List (\_ -> a) (_rhs e) (\g h -> _rhs (d g (c d e h))) f
148
149from :: Int -> [Int]
150from = primFix _ \a b -> _rhs (b : a (primAddInt b 1))
151
152iSqrt :: Int -> Int
153iSqrt = \a -> _rhs (primRound (primSqrtFloat (primIntToFloat a)))
154
155id :: forall a . a -> a
156id = \a b -> _rhs b
157
158main :: Int
159main = _rhs 31
160
161map :: forall a b . (a -> b) -> [a] -> [b]
162map = \a b c -> _rhs (foldr (\d e -> c d : e) [])
163
164mod :: Int -> Int -> Int
165mod = _rhs \a b -> primModInt a b
166
167not :: Bool -> Bool
168not = \a -> case'Bool (\_ -> 'Bool) (_rhs True) (_rhs False) a
169
170primes :: [Int]
171primes
172 = primFix
173 _
174 \a -> _rhs
175 (2
176 : 3
177 : foldr
178 (\b c -> primIfThenElse
179 ['Int]
180 (and
181 $ foldr (\d e -> primModInt b d /= 0 : e) [] (takeWhile (\f -> f <= iSqrt b) a))
182 (b : c)
183 c)
184 []
185 (from 5))
186
187takeWhile :: forall a . (a -> Bool) -> [a] -> [a]
188takeWhile
189 = \a -> primFix
190 _
191 \b c d -> case'List
192 (\_ -> [a])
193 (_rhs [])
194 (\e f -> case'Bool (\_ -> [a]) (_rhs []) (_rhs (e : b c f)) (c e))
195 d
196------------ tooltips
197testdata/primes.lc 7:3-7:4
198 forall a b . (a -> b) -> a -> b
199testdata/primes.lc 7:9-7:10
200 _d
201testdata/primes.lc 7:11-7:12
202 _e
203testdata/primes.lc 9:1-9:3
204 forall a . a -> a
205testdata/primes.lc 9:8-9:9
206 _b
207testdata/primes.lc 11:1-11:6
208 forall a b . (b -> a -> a) -> a -> [b] -> a
209testdata/primes.lc 11:16-11:17
210 _f
211testdata/primes.lc 11:16-12:39
212 [_b] -> _f
213testdata/primes.lc 12:21-12:22
214 _k
215testdata/primes.lc 12:21-12:26
216 _b -> _a
217testdata/primes.lc 12:21-12:39
218 _h
219testdata/primes.lc 12:23-12:24
220 _h
221testdata/primes.lc 12:25-12:26
222 forall a b . (a -> b) -> a -> b
223testdata/primes.lc 12:27-12:32
224 _k
225testdata/primes.lc 12:33-12:34
226 _g -> _d -> _k
227testdata/primes.lc 12:35-12:36
228 _l
229testdata/primes.lc 12:37-12:39
230 [_h]
231testdata/primes.lc 19:1-19:7
232 forall a . (a -> Bool) -> [a] -> [a]
233testdata/primes.lc 19:12-19:17
234 forall a b . (b -> a -> a) -> a -> [b] -> a
235testdata/primes.lc 19:12-19:54
236 [_a] -> [_a] -> [_a]
237testdata/primes.lc 19:12-19:57
238 [_a] -> [_a]
239testdata/primes.lc 19:28-19:53
240 [_c]
241testdata/primes.lc 19:31-19:32
242 _g
243testdata/primes.lc 19:31-19:45
244 [_c] -> [_c]
245testdata/primes.lc 19:33-19:34
246 _g
247testdata/primes.lc 19:40-19:41
248 _e
249testdata/primes.lc 19:40-19:42
250 [_d] -> [_d]
251testdata/primes.lc 19:40-19:45
252 [_c]
253testdata/primes.lc 19:41-19:42
254 forall a . a -> [a] -> [a]
255testdata/primes.lc 19:43-19:45
256 _d
257testdata/primes.lc 19:51-19:53
258 [_c]
259testdata/primes.lc 19:55-19:57
260 forall a . [a]
261testdata/primes.lc 21:6-21:8
262 Bool -> Bool -> Bool
263testdata/primes.lc 21:13-21:14
264 _b
265testdata/primes.lc 21:13-22:19
266 Bool -> Bool
267testdata/primes.lc 22:14-22:19
268 Bool
269testdata/primes.lc 24:1-24:4
270 [Bool] -> Bool
271testdata/primes.lc 24:7-24:12
272 forall a b . (b -> a -> a) -> a -> [b] -> a
273testdata/primes.lc 24:7-24:17
274 Bool -> [Bool] -> Bool
275testdata/primes.lc 24:7-24:22
276 [Bool] -> Bool
277testdata/primes.lc 24:13-24:17
278 Bool -> Bool -> Bool
279testdata/primes.lc 24:18-24:22
280 Bool
281testdata/primes.lc 26:1-26:4
282 forall a b . (a -> b) -> [a] -> [b]
283testdata/primes.lc 26:9-26:14
284 forall a b . (b -> a -> a) -> a -> [b] -> a
285testdata/primes.lc 26:9-26:33
286 [_a] -> [_b] -> [_a]
287testdata/primes.lc 26:9-26:36
288 [_b] -> [_a]
289testdata/primes.lc 26:25-26:26
290 _g
291testdata/primes.lc 26:25-26:29
292 [_a] -> [_a]
293testdata/primes.lc 26:25-26:32
294 [_a]
295testdata/primes.lc 26:27-26:28
296 _g
297testdata/primes.lc 26:28-26:29
298 forall a . a -> [a] -> [a]
299testdata/primes.lc 26:30-26:32
300 [_a]
301testdata/primes.lc 26:34-26:36
302 forall a . [a]
303testdata/primes.lc 28:1-28:4
304 Int -> Int -> Int
305testdata/primes.lc 28:7-28:17
306 Int -> Int -> Int
307testdata/primes.lc 29:1-29:6
308 Int -> Int
309testdata/primes.lc 29:11-29:20
310 Float -> Int
311testdata/primes.lc 29:11-29:55
312 Int
313testdata/primes.lc 29:22-29:35
314 Float -> Float
315testdata/primes.lc 29:22-29:54
316 Float
317testdata/primes.lc 29:37-29:51
318 Int -> Float
319testdata/primes.lc 29:37-29:53
320 Float
321testdata/primes.lc 29:52-29:53
322 _b
323testdata/primes.lc 30:2-30:3
324 Int -> Int -> Int
325testdata/primes.lc 30:7-30:17
326 Int -> Int -> Int
327testdata/primes.lc 31:2-31:3
328 Int -> Int -> Int
329testdata/primes.lc 31:7-31:17
330 Int -> Int -> Int
331testdata/primes.lc 33:3-33:5
332 Int -> Int -> Bool
333testdata/primes.lc 33:10-35:14
334 Bool
335testdata/primes.lc 33:15-33:29
336 Int -> Int -> Ordering
337testdata/primes.lc 33:15-33:31
338 Int -> Ordering
339testdata/primes.lc 33:15-33:33
340 Ordering
341testdata/primes.lc 33:30-33:31
342 _d
343testdata/primes.lc 33:32-33:33
344 _b
345testdata/primes.lc 34:11-34:16
346 Bool
347testdata/primes.lc 34:11-35:14
348 Ordering -> Bool
349testdata/primes.lc 35:10-35:14
350 Bool | Bool
351testdata/primes.lc 37:1-37:4
352 Bool -> Bool
353testdata/primes.lc 37:13-37:17
354 Bool
355testdata/primes.lc 37:13-38:17
356 Bool -> Bool
357testdata/primes.lc 38:12-38:17
358 Bool
359testdata/primes.lc 40:3-40:5
360 forall a . Eq a => a -> a -> Bool
361testdata/primes.lc 40:10-40:13
362 Bool -> Bool
363testdata/primes.lc 40:10-40:15
364 Bool -> Bool
365testdata/primes.lc 40:10-40:22
366 Bool
367testdata/primes.lc 40:14-40:15
368 forall a b . (a -> b) -> a -> b
369testdata/primes.lc 40:16-40:17
370 _f
371testdata/primes.lc 40:16-40:20
372 _e -> Bool
373testdata/primes.lc 40:16-40:22
374 Bool
375testdata/primes.lc 40:18-40:20
376 forall a . Eq a => a -> a -> Bool
377testdata/primes.lc 40:21-40:22
378 _c
379testdata/primes.lc 42:1-42:10
380 forall a . (a -> Bool) -> [a] -> [a]
381testdata/primes.lc 42:23-42:24
382 _g
383testdata/primes.lc 42:23-43:19
384 [_c]
385testdata/primes.lc 42:25-42:26
386 _f
387testdata/primes.lc 42:29-42:30
388 _f
389testdata/primes.lc 42:29-42:31
390 [_e] -> [_e]
391testdata/primes.lc 42:29-42:46
392 [_d]
393testdata/primes.lc 42:29-43:19
394 Bool -> [_d]
395testdata/primes.lc 42:30-42:31
396 forall a . a -> [a] -> [a]
397testdata/primes.lc 42:32-42:41
398 _j
399testdata/primes.lc 42:42-42:43
400 _k
401testdata/primes.lc 42:44-42:46
402 [_h]
403testdata/primes.lc 43:17-43:19
404 forall a . [a] | forall a . [a]
405testdata/primes.lc 45:1-45:5
406 Int -> [Int]
407testdata/primes.lc 45:10-45:11
408 _c
409testdata/primes.lc 45:10-45:12
410 [_b] -> [_b]
411testdata/primes.lc 45:10-45:25
412 [Int]
413testdata/primes.lc 45:11-45:12
414 forall a . a -> [a] -> [a]
415testdata/primes.lc 45:13-45:17
416 _d
417testdata/primes.lc 45:19-45:20
418 _e
419testdata/primes.lc 45:19-45:22
420 Int -> Int
421testdata/primes.lc 45:19-45:24
422 Int
423testdata/primes.lc 45:21-45:22
424 Int -> Int -> Int
425testdata/primes.lc 45:23-45:24
426 _b
427testdata/primes.lc 47:11-47:16
428 Type
429testdata/primes.lc 47:12-47:15
430 Type
431testdata/primes.lc 48:1-48:7
432 [Int]
433testdata/primes.lc 48:10-48:11
434 _b
435testdata/primes.lc 48:10-48:12
436 [_b] -> [_b]
437testdata/primes.lc 48:10-48:111
438 [Int]
439testdata/primes.lc 48:11-48:12
440 forall a . a -> [a] -> [a]
441testdata/primes.lc 48:12-48:13
442 _b
443testdata/primes.lc 48:12-48:14
444 [_b] -> [_b]
445testdata/primes.lc 48:12-48:111
446 [Int]
447testdata/primes.lc 48:13-48:14
448 forall a . a -> [a] -> [a]
449testdata/primes.lc 48:15-48:21
450 forall a . (a -> Bool) -> [a] -> [a]
451testdata/primes.lc 48:15-48:102
452 [Int] -> [Int]
453testdata/primes.lc 48:15-48:111
454 [Int]
455testdata/primes.lc 48:29-48:32
456 [Bool] -> Bool
457testdata/primes.lc 48:29-48:34
458 [Bool] -> Bool
459testdata/primes.lc 48:29-48:101
460 Bool
461testdata/primes.lc 48:33-48:34
462 forall a b . (a -> b) -> a -> b
463testdata/primes.lc 48:35-48:38
464 forall a b . (a -> b) -> [a] -> [b]
465testdata/primes.lc 48:35-48:61
466 [Int] -> [Bool]
467testdata/primes.lc 48:35-48:101
468 [Bool]
469testdata/primes.lc 48:46-48:47
470 _g
471testdata/primes.lc 48:46-48:53
472 Int -> Int
473testdata/primes.lc 48:46-48:55
474 Int
475testdata/primes.lc 48:46-48:58
476 Int -> Bool
477testdata/primes.lc 48:46-48:60
478 Bool
479testdata/primes.lc 48:48-48:53
480 Int -> Int -> Int
481testdata/primes.lc 48:54-48:55
482 _d
483testdata/primes.lc 48:56-48:58
484 forall a . Eq a => a -> a -> Bool
485testdata/primes.lc 48:59-48:60
486 _b
487testdata/primes.lc 48:63-48:72
488 forall a . (a -> Bool) -> [a] -> [a]
489testdata/primes.lc 48:63-48:93
490 [Int] -> [Int]
491testdata/primes.lc 48:63-48:100
492 [Int]
493testdata/primes.lc 48:80-48:81
494 _b
495testdata/primes.lc 48:80-48:84
496 Int -> Bool
497testdata/primes.lc 48:80-48:92
498 Bool
499testdata/primes.lc 48:82-48:84
500 Int -> Int -> Bool
501testdata/primes.lc 48:85-48:90
502 Int -> Int
503testdata/primes.lc 48:85-48:92
504 Int
505testdata/primes.lc 48:91-48:92
506 Int
507testdata/primes.lc 48:94-48:100
508 [Int]
509testdata/primes.lc 48:104-48:108
510 Int -> [Int]
511testdata/primes.lc 48:104-48:110
512 [Int]
513testdata/primes.lc 48:109-48:110
514 _b
515testdata/primes.lc 50:8-50:10
516 forall a . [a] -> Int -> a
517testdata/primes.lc 50:15-50:16
518 _e
519testdata/primes.lc 50:15-51:28
520 Bool -> _d | _c
521testdata/primes.lc 51:17-51:19
522 [_h]
523testdata/primes.lc 51:20-51:22
524 _k
525testdata/primes.lc 51:24-51:25
526 _k
527testdata/primes.lc 51:24-51:26
528 Int -> Int
529testdata/primes.lc 51:24-51:27
530 Int
531testdata/primes.lc 51:25-51:26
532 Int -> Int -> Int
533testdata/primes.lc 51:26-51:27
534 _b
535testdata/primes.lc 53:1-53:5
536 Int
537testdata/primes.lc 53:8-53:14
538 [Int]
539testdata/primes.lc 53:8-53:17
540 Int -> Int
541testdata/primes.lc 53:8-53:20
542 Int
543testdata/primes.lc 53:15-53:17
544 forall a . [a] -> Int -> a
545testdata/primes.lc 53:18-53:20
546 _b
547------------ warnings
548Uncovered pattern(s) at testdata/primes.lc:50:8:
549(x: _) !! 0 = x
550(_ : xs) !! n = xs !! (n-1)
551Missing case(s):
552 [] !! _ \ No newline at end of file
diff --git a/testdata/record01.reject.out b/testdata/record01.reject.out
index 2eb0b0eb..33eb370a 100644
--- a/testdata/record01.reject.out
+++ b/testdata/record01.reject.out
@@ -159,16 +159,11 @@ testdata/record01.reject.lc 7:29-7:32
159testdata/record01.reject.lc 8:23-8:34 159testdata/record01.reject.lc 8:23-8:34
160 forall (a :: [Type]) 160 forall (a :: [Type])
161 . sameLayerCounts a 161 . sameLayerCounts a
162 => HList a 162 => HList a -> FrameBuffer (ImageLC (head a)) (map GetImageKind a)
163 -> FrameBuffer (ImageLC (head Type a)) (map Type ImageKind GetImageKind a)
164testdata/record01.reject.lc 8:23-8:75 163testdata/record01.reject.lc 8:23-8:75
165 FrameBuffer 164 FrameBuffer
166 1 165 1
167 (map 166 (map GetImageKind ' [Image 1 'Depth, Image 1 ('Color (VecScalar 4 Float))])
168 Type
169 ImageKind
170 GetImageKind
171 ' [Image 1 'Depth, Image 1 ('Color (VecScalar 4 Float))])
172testdata/record01.reject.lc 8:35-8:75 167testdata/record01.reject.lc 8:35-8:75
173 (Image 1 'Depth, Image 1 ('Color (VecScalar 4 Float))) 168 (Image 1 'Depth, Image 1 ('Color (VecScalar 4 Float)))
174testdata/record01.reject.lc 8:36-8:47 169testdata/record01.reject.lc 8:36-8:47
@@ -347,11 +342,11 @@ testdata/record01.reject.lc 19:50-19:62
347testdata/record01.reject.lc 20:23-20:42 342testdata/record01.reject.lc 20:23-20:42
348 forall (a :: [Type]) (b :: PrimitiveType) 343 forall (a :: [Type]) (b :: PrimitiveType)
349 . RasterContext (HList (Vec 4 Float : a)) b 344 . RasterContext (HList (Vec 4 Float : a)) b
350 -> HList (map Type Type Interpolated a) 345 -> HList (map Interpolated a)
351 -> [Primitive (HList (Vec 4 Float : a)) b] 346 -> [Primitive (HList (Vec 4 Float : a)) b]
352 -> [Vector 1 (Maybe (SimpleFragment (HList a)))] 347 -> [Vector 1 (Maybe (SimpleFragment (HList a)))]
353testdata/record01.reject.lc 20:23-20:52 348testdata/record01.reject.lc 20:23-20:52
354 HList (map Type Type Interpolated _a) 349 HList (map Interpolated _a)
355 -> [Primitive (HList (Vec 4 Float : _a)) 'Triangle] 350 -> [Primitive (HList (Vec 4 Float : _a)) 'Triangle]
356 -> [Vector 1 (Maybe (SimpleFragment (HList _a)))] 351 -> [Vector 1 (Maybe (SimpleFragment (HList _a)))]
357testdata/record01.reject.lc 20:23-20:63 352testdata/record01.reject.lc 20:23-20:63
@@ -418,32 +413,26 @@ testdata/record01.reject.lc 22:61-22:64
418testdata/record01.reject.lc 23:23-23:33 413testdata/record01.reject.lc 23:23-23:33
419 forall (a :: Nat) (b :: [Type]) c 414 forall (a :: Nat) (b :: [Type]) c
420 . HList b 415 . HList b
421 -> (c -> HList (imageType' (map Type ImageKind FragmentOperationKind b))) 416 -> (c -> HList (imageType' (map FragmentOperationKind b)))
422 -> [Vector a (Maybe (SimpleFragment c))] 417 -> [Vector a (Maybe (SimpleFragment c))]
423 -> FrameBuffer a (map Type ImageKind FragmentOperationKind b) 418 -> FrameBuffer a (map FragmentOperationKind b)
424 -> FrameBuffer a (map Type ImageKind FragmentOperationKind b) 419 -> FrameBuffer a (map FragmentOperationKind b)
425testdata/record01.reject.lc 23:23-23:45 420testdata/record01.reject.lc 23:23-23:45
426 (_a 421 (_a
427 -> HList 422 -> HList
428 (imageType' 423 (imageType'
429 (map 424 (map
430 Type
431 ImageKind
432 FragmentOperationKind 425 FragmentOperationKind
433 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))]))) 426 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))])))
434 -> [Vector _b (Maybe (SimpleFragment _a))] 427 -> [Vector _b (Maybe (SimpleFragment _a))]
435 -> FrameBuffer 428 -> FrameBuffer
436 _b 429 _b
437 (map 430 (map
438 Type
439 ImageKind
440 FragmentOperationKind 431 FragmentOperationKind
441 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))]) 432 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))])
442 -> FrameBuffer 433 -> FrameBuffer
443 _b 434 _b
444 (map 435 (map
445 Type
446 ImageKind
447 FragmentOperationKind 436 FragmentOperationKind
448 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))]) 437 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))])
449testdata/record01.reject.lc 23:23-23:60 438testdata/record01.reject.lc 23:23-23:60
@@ -451,38 +440,28 @@ testdata/record01.reject.lc 23:23-23:60
451 -> FrameBuffer 440 -> FrameBuffer
452 _a 441 _a
453 (map 442 (map
454 Type
455 ImageKind
456 FragmentOperationKind 443 FragmentOperationKind
457 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))]) 444 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))])
458 -> FrameBuffer 445 -> FrameBuffer
459 _a 446 _a
460 (map 447 (map
461 Type
462 ImageKind
463 FragmentOperationKind 448 FragmentOperationKind
464 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))]) 449 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))])
465testdata/record01.reject.lc 23:23-23:75 450testdata/record01.reject.lc 23:23-23:75
466 FrameBuffer 451 FrameBuffer
467 1 452 1
468 (map 453 (map
469 Type
470 ImageKind
471 FragmentOperationKind 454 FragmentOperationKind
472 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))]) 455 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))])
473 -> FrameBuffer 456 -> FrameBuffer
474 1 457 1
475 (map 458 (map
476 Type
477 ImageKind
478 FragmentOperationKind 459 FragmentOperationKind
479 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))]) 460 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))])
480testdata/record01.reject.lc 23:23-23:83 461testdata/record01.reject.lc 23:23-23:83
481 FrameBuffer 462 FrameBuffer
482 1 463 1
483 (map 464 (map
484 Type
485 ImageKind
486 FragmentOperationKind 465 FragmentOperationKind
487 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))]) 466 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))])
488testdata/record01.reject.lc 23:34-23:45 467testdata/record01.reject.lc 23:34-23:45
@@ -494,11 +473,7 @@ testdata/record01.reject.lc 23:61-23:75
494testdata/record01.reject.lc 23:76-23:83 473testdata/record01.reject.lc 23:76-23:83
495 FrameBuffer 474 FrameBuffer
496 1 475 1
497 (map 476 (map GetImageKind ' [Image 1 'Depth, Image 1 ('Color (VecScalar 4 Float))])
498 Type
499 ImageKind
500 GetImageKind
501 ' [Image 1 'Depth, Image 1 ('Color (VecScalar 4 Float))])
502testdata/record01.reject.lc 24:12-24:58 477testdata/record01.reject.lc 24:12-24:58
503 RecordC 478 RecordC
504 ' ['RecItem "fieldA" Float 479 ' ['RecItem "fieldA" Float
@@ -507,8 +482,6 @@ testdata/record01.reject.lc 24:12-24:58
507 (FrameBuffer 482 (FrameBuffer
508 1 483 1
509 (map 484 (map
510 Type
511 ImageKind
512 FragmentOperationKind 485 FragmentOperationKind
513 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))])) 486 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))]))
514 , 'RecItem "fieldC" ((BlendEquation, BlendEquation) -> Blending Float)] 487 , 'RecItem "fieldC" ((BlendEquation, BlendEquation) -> Blending Float)]
@@ -527,13 +500,9 @@ testdata/record01.reject.lc 24:21-24:57
527 (FrameBuffer 500 (FrameBuffer
528 1 501 1
529 (map 502 (map
530 Type
531 ImageKind
532 FragmentOperationKind 503 FragmentOperationKind
533 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))]))) 504 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))])))
534 : map 505 : map
535 RecItem
536 Type
537 recItemType 506 recItemType
538 ' ['RecItem "fieldC" ((BlendEquation, BlendEquation) -> Blending Float)]) 507 ' ['RecItem "fieldC" ((BlendEquation, BlendEquation) -> Blending Float)])
539testdata/record01.reject.lc 24:26-24:32 508testdata/record01.reject.lc 24:26-24:32
@@ -544,8 +513,6 @@ testdata/record01.reject.lc 24:34-24:39
544 FrameBuffer 513 FrameBuffer
545 1 514 1
546 (map 515 (map
547 Type
548 ImageKind
549 FragmentOperationKind 516 FragmentOperationKind
550 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))]) 517 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))])
551testdata/record01.reject.lc 24:34-24:57 518testdata/record01.reject.lc 24:34-24:57
@@ -553,13 +520,11 @@ testdata/record01.reject.lc 24:34-24:57
553 (FrameBuffer 520 (FrameBuffer
554 1 521 1
555 (map 522 (map
556 Type
557 ImageKind
558 FragmentOperationKind 523 FragmentOperationKind
559 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))]) 524 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))])
560 : recItemType 525 : recItemType
561 ('RecItem "fieldC" ((BlendEquation, BlendEquation) -> Blending Float)) 526 ('RecItem "fieldC" ((BlendEquation, BlendEquation) -> Blending Float))
562 : map RecItem Type recItemType ' []) 527 : map recItemType ' [])
563testdata/record01.reject.lc 24:41-24:47 528testdata/record01.reject.lc 24:41-24:47
564 String | RecItem | [RecItem] 529 String | RecItem | [RecItem]
565testdata/record01.reject.lc 24:49-24:57 530testdata/record01.reject.lc 24:49-24:57
@@ -574,8 +539,6 @@ testdata/record01.reject.lc 25:11-25:17
574 (FrameBuffer 539 (FrameBuffer
575 1 540 1
576 (map 541 (map
577 Type
578 ImageKind
579 FragmentOperationKind 542 FragmentOperationKind
580 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))])) 543 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))]))
581 , 'RecItem "fieldC" ((BlendEquation, BlendEquation) -> Blending Float)] 544 , 'RecItem "fieldC" ((BlendEquation, BlendEquation) -> Blending Float)]
@@ -593,8 +556,6 @@ testdata/record01.reject.lc 26:15-26:21
593 (FrameBuffer 556 (FrameBuffer
594 1 557 1
595 (map 558 (map
596 Type
597 ImageKind
598 FragmentOperationKind 559 FragmentOperationKind
599 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))])) 560 ' [FragmentOperation 'Depth, FragmentOperation ('Color (VecScalar 4 Float))]))
600 , 'RecItem "fieldC" ((BlendEquation, BlendEquation) -> Blending Float)] 561 , 'RecItem "fieldC" ((BlendEquation, BlendEquation) -> Blending Float)]
diff --git a/testdata/record02.out b/testdata/record02.out
index ce80a224..7ae0ead7 100644
--- a/testdata/record02.out
+++ b/testdata/record02.out
@@ -79,7 +79,7 @@ v3
79 , 'RecItem 79 , 'RecItem
80 "v2" 80 "v2"
81 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])] 81 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])]
82v3 = _rhs (RecordCons (RecordCons (1.0, 0.0), RecordCons (1.0, 0.0, 10.0))) 82v3 = _rhs (RecordCons (v1, v2))
83 83
84x 84x
85 :: forall a (b :: [RecItem]) 85 :: forall a (b :: [RecItem])
@@ -91,14 +91,7 @@ x
91 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])] 91 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])]
92 -> RecordC b) 92 -> RecordC b)
93 -> a 93 -> a
94x 94x = \a b c d -> _rhs (project a b "x" c (d v3))
95 = \a b c d -> _rhs
96 (project
97 a
98 b
99 "x"
100 c
101 (d (RecordCons (RecordCons (1.0, 0.0), RecordCons (1.0, 0.0, 10.0)))))
102 95
103z 96z
104 :: forall a (b :: [RecItem]) 97 :: forall a (b :: [RecItem])
@@ -121,17 +114,7 @@ z
121 b 114 b
122 "v" 115 "v"
123 c 116 c
124 (project 117 (project ('RecordC b) d "c" e (project ('RecordC d) f "x" g (h v3))))
125 ('RecordC b)
126 d
127 "c"
128 e
129 (project
130 ('RecordC d)
131 f
132 "x"
133 g
134 (h (RecordCons (RecordCons (1.0, 0.0), RecordCons (1.0, 0.0, 10.0)))))))
135------------ tooltips 118------------ tooltips
136testdata/record02.lc 1:1-1:3 119testdata/record02.lc 1:1-1:3
137 RecordC ' ['RecItem "x" Float, 'RecItem "y" Float] 120 RecordC ' ['RecItem "x" Float, 'RecItem "y" Float]
@@ -144,8 +127,7 @@ testdata/record02.lc 1:7-1:14
144testdata/record02.lc 1:9-1:12 127testdata/record02.lc 1:9-1:12
145 Float 128 Float
146testdata/record02.lc 1:9-1:18 129testdata/record02.lc 1:9-1:18
147 HList 130 HList (Float : recItemType ('RecItem "y" Float) : map recItemType ' [])
148 (Float : recItemType ('RecItem "y" Float) : map RecItem Type recItemType ' [])
149testdata/record02.lc 1:13-1:14 131testdata/record02.lc 1:13-1:14
150 String | RecItem | [RecItem] 132 String | RecItem | [RecItem]
151testdata/record02.lc 1:15-1:18 133testdata/record02.lc 1:15-1:18
@@ -163,8 +145,7 @@ testdata/record02.lc 2:9-2:12
163testdata/record02.lc 2:9-2:25 145testdata/record02.lc 2:9-2:25
164 HList 146 HList
165 (Float 147 (Float
166 : recItemType ('RecItem "y" Float) 148 : recItemType ('RecItem "y" Float) : map recItemType ' ['RecItem "z" Float])
167 : map RecItem Type recItemType ' ['RecItem "z" Float])
168testdata/record02.lc 2:13-2:14 149testdata/record02.lc 2:13-2:14
169 String | RecItem 150 String | RecItem
170testdata/record02.lc 2:13-2:20 151testdata/record02.lc 2:13-2:20
@@ -172,8 +153,7 @@ testdata/record02.lc 2:13-2:20
172testdata/record02.lc 2:15-2:18 153testdata/record02.lc 2:15-2:18
173 Float 154 Float
174testdata/record02.lc 2:15-2:25 155testdata/record02.lc 2:15-2:25
175 HList 156 HList (Float : recItemType ('RecItem "z" Float) : map recItemType ' [])
176 (Float : recItemType ('RecItem "z" Float) : map RecItem Type recItemType ' [])
177testdata/record02.lc 2:19-2:20 157testdata/record02.lc 2:19-2:20
178 String | RecItem | [RecItem] 158 String | RecItem | [RecItem]
179testdata/record02.lc 2:21-2:25 159testdata/record02.lc 2:21-2:25
@@ -203,7 +183,7 @@ testdata/record02.lc 3:10-3:19
203 ('RecItem 183 ('RecItem
204 "v2" 184 "v2"
205 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float])) 185 (RecordC ' ['RecItem "x" Float, 'RecItem "y" Float, 'RecItem "z" Float]))
206 : map RecItem Type recItemType ' []) 186 : map recItemType ' [])
207testdata/record02.lc 3:14-3:16 187testdata/record02.lc 3:14-3:16
208 String | RecItem | [RecItem] 188 String | RecItem | [RecItem]
209testdata/record02.lc 3:17-3:19 189testdata/record02.lc 3:17-3:19
diff --git a/testdata/reduce06.out b/testdata/reduce06.out
index 2ddd9a75..f9da2c5d 100644
--- a/testdata/reduce06.out
+++ b/testdata/reduce06.out
@@ -6,7 +6,7 @@ constf = _lhs constf (_rhs \(a :: _) (_ :: _) -> a)
6main = _lhs main (_rhs ((\(a :: _) -> constf a False) True)) 6main = _lhs main (_rhs ((\(a :: _) -> constf a False) True))
7------------ core code 7------------ core code
8constf :: forall a b . a -> b -> a 8constf :: forall a b . a -> b -> a
9constf = \_ _ -> _rhs \a _ -> a 9constf = \a b -> _rhs \c _ -> c
10 10
11main :: Bool 11main :: Bool
12main = _rhs True 12main = _rhs True
diff --git a/testdata/swizzling.out b/testdata/swizzling.out
index 295c8736..22c5d02a 100644
--- a/testdata/swizzling.out
+++ b/testdata/swizzling.out
@@ -34,7 +34,7 @@ v :: VecS Float 3
34v = _rhs (V3 1.0 2.0 3.0) 34v = _rhs (V3 1.0 2.0 3.0)
35 35
36v2 :: VecS Float 2 36v2 :: VecS Float 2
37v2 = _rhs (V2 1.0 1.0) 37v2 = _rhs (V2 (swizzscalar 'Float 3 v Sx) (swizzscalar 'Float 3 v Sx))
38 38
39v3 :: Float 39v3 :: Float
40v3 = _rhs 1.0 40v3 = _rhs 1.0
diff --git a/testdata/traceTest.out b/testdata/traceTest.out
index 9c5545d5..215f950a 100644
--- a/testdata/traceTest.out
+++ b/testdata/traceTest.out
@@ -15,7 +15,7 @@ case'X :: forall a (b :: a) . forall (c :: X a b -> Type) (d :: X a b) -> c d
15case'X = \_ _ a b -> <<case function of a type with 2 parameters>> 15case'X = \_ _ a b -> <<case function of a type with 2 parameters>>
16 16
17id :: forall a . a -> a 17id :: forall a . a -> a
18id = \_ a -> _rhs a 18id = \a b -> _rhs b
19 19
20match'X 20match'X
21 :: forall (a :: Type -> Type) 21 :: forall (a :: Type -> Type)
diff --git a/testdata/typeclass.out b/testdata/typeclass.out
index 0280bed1..03702cd7 100644
--- a/testdata/typeclass.out
+++ b/testdata/typeclass.out
@@ -52,17 +52,18 @@ not
52(/=) = _lhs (/=) \(a :: _) (b :: _) -> _rhs (not (a == b)) 52(/=) = _lhs (/=) \(a :: _) (b :: _) -> _rhs (not (a == b))
53 53
54(==.) 54(==.)
55 = _lhs 55 = primFix
56 (==.) 56 \(a :: _) -> _lhs
57 \(a :: _) (b :: _) -> case'List 57 (==.)
58 (\(_ :: _) -> _) 58 \(b :: _) (c :: _) -> case'List
59 (case'List (\(_ :: _) -> _) (_rhs True) (\(_ :: _) (_ :: _) -> _rhs False) b)
60 (\(_ :: _) (c :: _) -> case'List
61 (\(_ :: _) -> _) 59 (\(_ :: _) -> _)
62 (_rhs False) 60 (case'List (\(_ :: _) -> _) (_rhs True) (\(_ :: _) (_ :: _) -> _rhs False) c)
63 (\(_ :: _) (d :: _) -> _rhs (c ==. d)) 61 (\(_ :: _) (d :: _) -> case'List
64 b) 62 (\(_ :: _) -> _)
65 a 63 (_rhs False)
64 (\(_ :: _) (e :: _) -> _rhs (a d e))
65 c)
66 b
66------------ core code 67------------ core code
67&& :: Bool -> Bool -> Bool 68&& :: Bool -> Bool -> Bool
68&& = \a b -> case'Bool (\_ -> 'Bool) (_rhs False) (_rhs b) a 69&& = \a b -> case'Bool (\_ -> 'Bool) (_rhs False) (_rhs b) a
@@ -89,7 +90,7 @@ not
89==. :: forall a b . [a] -> [b] -> Bool 90==. :: forall a b . [a] -> [b] -> Bool
90==. 91==.
91 = \a b -> primFix 92 = \a b -> primFix
92 ([a] -> [b] -> 'Bool) 93 _
93 \c d e -> case'List 94 \c d e -> case'List
94 (\_ -> 'Bool) 95 (\_ -> 'Bool)
95 (case'List (\_ -> 'Bool) (_rhs True) (\_ _ -> _rhs False) e) 96 (case'List (\_ -> 'Bool) (_rhs True) (\_ _ -> _rhs False) e)
diff --git a/testdata/typesig.reject.out b/testdata/typesig.reject.out
index 60f0c6c8..f6e2660e 100644
--- a/testdata/typesig.reject.out
+++ b/testdata/typesig.reject.out
@@ -1,28 +1,18 @@
1focus checkMetas: 1can't find: x in testdata/typesig.reject.lc:6:6:
2\(a :: Type) -> ((\b -> primFix a b) :: (a -> a) -> a) 2x :: x
3 let a = Type in \(c :: Type) -> <<HERE>> 3 ^
4---
5\(a :: CW (Type ~ _a)) (b :: CW (_a ~ X)) -> typeAnn _a (_rhs X) :: _a
6------------ trace 4------------ trace
7'X :: Type 5'X :: Type
8X :: X 6X :: X
9case'X :: forall (a :: X -> Type) -> a 'X -> forall (b :: X) -> a b 7case'X :: forall (a :: X -> Type) -> a 'X -> forall (b :: X) -> a b
10match'X :: forall (a :: Type -> Type) -> a X -> forall b -> a b -> a b 8match'X :: forall (a :: Type -> Type) -> a X -> forall b -> a b -> a b
11!focus checkMetas: 9!can't find: x in testdata/typesig.reject.lc:6:6:
12\(a :: Type) -> ((\b -> primFix a b) :: (a -> a) -> a) 10x :: x
13 let a = Type in \(c :: Type) -> <<HERE>> 11 ^
14---
15\(a :: CW (Type ~ _a)) (b :: CW (_a ~ X)) -> typeAnn _a (_rhs X) :: _a
16------------ tooltips 12------------ tooltips
17testdata/typesig.reject.lc 4:6-4:7 13testdata/typesig.reject.lc 4:6-4:7
18 Type | Type | Type | Type | Type 14 Type | Type | Type | Type | Type
19testdata/typesig.reject.lc 4:6-4:11 15testdata/typesig.reject.lc 4:6-4:11
20 Type 16 Type
21testdata/typesig.reject.lc 4:10-4:11 17testdata/typesig.reject.lc 4:10-4:11
22 X
23testdata/typesig.reject.lc 6:6-6:7
24 _b
25testdata/typesig.reject.lc 6:6-7:6
26 _c
27testdata/typesig.reject.lc 7:5-7:6
28 X \ No newline at end of file 18 X \ No newline at end of file
diff --git a/testdata/where.out b/testdata/where.out
index eb30398d..4160f7af 100644
--- a/testdata/where.out
+++ b/testdata/where.out
@@ -1,12 +1,6 @@
1main is not found 1main is not found
2------------ desugared source code 2------------ desugared source code
3f 3f = _lhs f (_rhs let a = let c = 1.0 in c; b = 1.0 in b)
4 = _lhs
5 f
6 (_rhs
7 let
8 a = _lhs z (_rhs let c = _lhs y (_rhs 1.0) in c); b = _lhs x (_rhs 1.0)
9 in b)
10------------ core code 4------------ core code
11f :: Float 5f :: Float
12f = _rhs 1.0 6f = _rhs 1.0
diff --git a/testdata/zip01.out b/testdata/zip01.out
index b34b81e2..3a14fa8a 100644
--- a/testdata/zip01.out
+++ b/testdata/zip01.out
@@ -2,38 +2,37 @@ main is not found
2------------ desugared source code 2------------ desugared source code
3zip2 :: forall (a :: _) (b :: _) . [a] -> [b] -> [(a, b)] 3zip2 :: forall (a :: _) (b :: _) . [a] -> [b] -> [(a, b)]
4zip2 4zip2
5 = _lhs 5 = primFix
6 zip2 6 \(a :: forall (b :: _) (c :: _) . [b] -> [c] -> [(b, c)]) -> _lhs
7 \(a :: _) (b :: _) -> case'List 7 zip2
8 (\(_ :: _) -> _) 8 \(d :: _) (e :: _) -> case'List
9 (_rhs [])
10 (\(c :: _) (d :: _) -> case'List
11 (\(_ :: _) -> _) 9 (\(_ :: _) -> _)
12 (_rhs []) 10 (_rhs [])
13 (\(e :: _) (f :: _) -> _rhs ((c, e) : zip2 d f)) 11 (\(f :: _) (g :: _) -> case'List
14 b) 12 (\(_ :: _) -> _)
15 a 13 (_rhs [])
14 (\(h :: _) (i :: _) -> _rhs ((f, h) : a g i))
15 e)
16 d
16------------ core code 17------------ core code
17zip2 :: forall a b . [a] -> [b] -> [(a, b)] 18zip2 :: forall a b . [a] -> [b] -> [(a, b)]
18zip2 19zip2
19 = primFix 20 = primFix
20 (forall a b . [a] -> [b] -> [' (a, b)]) 21 _
21 \c d e f g -> case'List 22 \a b c d e -> case'List
22 (\_ -> [' (d, e)]) 23 (\_ -> [' (b, c)])
23 (_rhs []) 24 (_rhs [])
24 (\h i -> case'List 25 (\f g -> case'List
25 (\_ -> [' (d, e)]) 26 (\_ -> [' (b, c)])
26 (_rhs []) 27 (_rhs [])
27 (\j k -> _rhs ((h, j) : c d e i k)) 28 (\h i -> _rhs ((f, h) : a b c g i))
28 g) 29 e)
29 f 30 d
30------------ tooltips 31------------ tooltips
31testdata/zip01.lc 1:9-1:12 32testdata/zip01.lc 1:9-1:12
32 Type 33 Type
33testdata/zip01.lc 1:9-1:30 34testdata/zip01.lc 1:9-1:30
34 Type | Type 35 Type | Type
35testdata/zip01.lc 1:9-4:40
36 forall a b . [a] -> [b] -> [(a, b)]
37testdata/zip01.lc 1:10-1:11 36testdata/zip01.lc 1:10-1:11
38 _d 37 _d
39testdata/zip01.lc 1:16-1:19 38testdata/zip01.lc 1:16-1:19