unproductive day i fear

This commit is contained in:
crumbtoo
2023-11-16 19:11:01 -07:00
parent c39a843660
commit ac55a1908c
12 changed files with 330 additions and 440 deletions

22
src/Core/Examples.hs Normal file
View File

@@ -0,0 +1,22 @@
{-# LANGUAGE QuasiQuotes #-}
module Core.Examples where
----------------------------------------------------------------------------------
import Core.Syntax
import Core.TH
----------------------------------------------------------------------------------
{-
letrecExample :: Program
letrecExample = [core|
pair x y f = f x y;
fst p = p k;
snd p = p k1;
f x y = letrec
{ a = pair x b;
; b = pair y a
} in fst (snd (snd (snd a)));
main = f 3 4;
|]
-}