]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/ShortcutFusion.scl
Merged changes from feature/scl to master.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / ShortcutFusion.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/ShortcutFusion.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/ShortcutFusion.scl
deleted file mode 100644 (file)
index 6423ecb..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-data List a = Nil | Cons a (List a)\r
-\r
-@private\r
-@inline\r
-build :: (forall a. a -> (b -> a -> a) -> a) -> List b\r
-build f = f Nil Cons\r
-\r
-@private\r
-foldr :: (a -> b -> b) -> b -> List a -> b\r
-foldr cons nil Nil = nil\r
-foldr cons nil (Cons h t) = cons h (foldr cons nil t)\r
-\r
-@private\r
-@inline\r
-singleton :: a -> List a\r
-singleton x = build (\nil cons -> cons x nil)\r
-\r
-@private\r
-@inline\r
-last :: List a -> a -> a\r
-last l def = foldr (\x _ -> x) def l\r
-\r
-main = last (singleton "Hello") "Foo"\r
---\r
-Hello
\ No newline at end of file