├── .gitignore ├── README.md ├── ch3 ├── .gitignore ├── ChangeLog.md ├── LICENSE ├── README.md ├── Setup.hs ├── action_table_letlang.txt ├── app │ ├── letlang │ │ ├── Env.hs │ │ ├── Expr.hs │ │ ├── Interp.hs │ │ ├── LetLang.lhs │ │ ├── Lexer.hs │ │ ├── Main.lhs │ │ ├── MainUtil.hs │ │ ├── Parser.hs │ │ ├── Token.hs │ │ └── examples │ │ │ ├── check_shadowing_in_body.let │ │ │ ├── check_shadowing_in_rhs.let │ │ │ ├── eval_let_body.let │ │ │ ├── eval_let_rhs.let │ │ │ ├── if_eval_test_false.let │ │ │ ├── if_eval_test_false_2.let │ │ │ ├── if_eval_test_true.let │ │ │ ├── if_eval_test_true_2.let │ │ │ ├── if_false.let │ │ │ ├── if_true.let │ │ │ ├── iszero.let │ │ │ ├── negative_const.let │ │ │ ├── nested_arith_left.let │ │ │ ├── nested_arith_right.let │ │ │ ├── no_bool_to_diff_1.let │ │ │ ├── no_bool_to_diff_2.let │ │ │ ├── no_int_to_if.let │ │ │ ├── positive_const.let │ │ │ ├── simple_arith_1.let │ │ │ ├── simple_arith_var_1.let │ │ │ ├── simple_let_1.let │ │ │ ├── simple_nested_let.let │ │ │ ├── test_unbound_var_1.let │ │ │ ├── test_unbound_var_2.let │ │ │ ├── test_var_1.let │ │ │ ├── test_var_2.let │ │ │ └── test_var_3.let │ ├── letreclang │ │ ├── Env.hs │ │ ├── Expr.hs │ │ ├── Interp.hs │ │ ├── Lexer.hs │ │ ├── Main.lhs │ │ ├── MainUtil.hs │ │ ├── Parser.hs │ │ ├── Token.hs │ │ └── examples │ │ │ ├── apply_proc_in_rator_pos.proc │ │ │ ├── apply_simple_proc.proc │ │ │ ├── check_shadowing_in_body.let │ │ │ ├── check_shadowing_in_rhs.let │ │ │ ├── eval_let_body.let │ │ │ ├── eval_let_rhs.let │ │ │ ├── ho_nested_letrecs.letrec │ │ │ ├── if_eval_test_false.let │ │ │ ├── if_eval_test_false_2.let │ │ │ ├── if_eval_test_true.let │ │ │ ├── if_eval_test_true_2.let │ │ │ ├── if_false.let │ │ │ ├── if_true.let │ │ │ ├── let_to_proc_1.proc │ │ │ ├── negative_const.let │ │ │ ├── nested_arith_left.let │ │ │ ├── nested_arith_right.let │ │ │ ├── nested_procs_1.proc │ │ │ ├── nested_procs_2.proc │ │ │ ├── no_bool_to_diff_1.let │ │ │ ├── no_bool_to_diff_2.let │ │ │ ├── no_int_to_if.let │ │ │ ├── positive_const.let │ │ │ ├── simple_arith_1.let │ │ │ ├── simple_arith_var_1.let │ │ │ ├── simple_let_1.let │ │ │ ├── simple_letrec_1.letrec │ │ │ ├── simple_letrec_2.letrec │ │ │ ├── simple_letrec_3.letrec │ │ │ ├── simple_nested_let.let │ │ │ ├── test_unbound_var_1.let │ │ │ ├── test_unbound_var_2.let │ │ │ ├── test_var_1.let │ │ │ ├── test_var_2.let │ │ │ ├── test_var_3.let │ │ │ └── y_combinator_1.proc │ └── proclang │ │ ├── Env.hs │ │ ├── Expr.hs │ │ ├── Interp.hs │ │ ├── Lexer.hs │ │ ├── Main.lhs │ │ ├── MainUtil.hs │ │ ├── Parser.hs │ │ ├── ProcLang.lhs │ │ ├── Token.hs │ │ └── examples │ │ ├── apply_proc_in_rator_pos.proc │ │ ├── apply_simple_proc.proc │ │ ├── check_shadowing_in_body.let │ │ ├── check_shadowing_in_rhs.let │ │ ├── eval_let_body.let │ │ ├── eval_let_rhs.let │ │ ├── if_eval_test_false.let │ │ ├── if_eval_test_false_2.let │ │ ├── if_eval_test_true.let │ │ ├── if_eval_test_true_2.let │ │ ├── if_false.let │ │ ├── if_true.let │ │ ├── let_to_proc_1.proc │ │ ├── negative_const.let │ │ ├── nested_arith_left.let │ │ ├── nested_arith_right.let │ │ ├── nested_procs_1.proc │ │ ├── nested_procs_2.proc │ │ ├── no_bool_to_diff_1.let │ │ ├── no_bool_to_diff_2.let │ │ ├── no_int_to_if.let │ │ ├── positive_const.let │ │ ├── simple_arith_1.let │ │ ├── simple_arith_var_1.let │ │ ├── simple_let_1.let │ │ ├── simple_nested_let.let │ │ ├── test_unbound_var_1.let │ │ ├── test_unbound_var_2.let │ │ ├── test_var_1.let │ │ ├── test_var_2.let │ │ ├── test_var_3.let │ │ └── y_combinator_1.proc ├── ch3.cabal ├── goto_table_letlang.txt ├── mygrammar_letlang.grm ├── mygrammar_letlang.grm.hash ├── package.yaml ├── prod_rules_letlang.txt ├── src │ └── Lib.hs ├── stack.yaml ├── stack.yaml.lock └── test │ ├── letlang │ └── Spec.hs │ ├── letreclang │ └── Spec.hs │ └── proclang │ └── Spec.hs ├── ch4 ├── .gitignore ├── ChangeLog.md ├── LICENSE ├── README.md ├── Setup.hs ├── app │ ├── explicitrefslang │ │ ├── Env.hs │ │ ├── Expr.hs │ │ ├── Interp.hs │ │ ├── Lexer.hs │ │ ├── Main.hs │ │ ├── MainUtil.hs │ │ ├── Parser.hs │ │ ├── Ref.hs │ │ ├── Store.hs │ │ ├── Token.hs │ │ └── examples │ │ │ ├── assignment_test_1.expref │ │ │ ├── begin_test_1.expref │ │ │ ├── chains_1.expref │ │ │ ├── check_shadowing_in_body.let │ │ │ ├── check_shadowing_in_rhs.let │ │ │ ├── eval_let_body.let │ │ │ ├── eval_let_rhs.let │ │ │ ├── even_odd_via_set_1.expref │ │ │ ├── gensym_test_1.expref │ │ │ ├── gensym_test_2.expref │ │ │ ├── ho_nested_letrecs.letrec │ │ │ ├── if_eval_test_false.let │ │ │ ├── if_eval_test_false_2.let │ │ │ ├── if_eval_test_true.let │ │ │ ├── if_eval_test_true_2.let │ │ │ ├── if_false.let │ │ │ ├── if_true.let │ │ │ ├── negative_const.let │ │ │ ├── nested_arith_left.let │ │ │ ├── nested_arith_right.let │ │ │ ├── nested_procs_1.proc │ │ │ ├── nested_procs_2.proc │ │ │ ├── no_bool_to_diff_1.let │ │ │ ├── no_bool_to_diff_2.let │ │ │ ├── no_int_to_if.let │ │ │ ├── positive_const.let │ │ │ ├── show_allocation_1.expref │ │ │ ├── simple_app_1.proc │ │ │ ├── simple_app_2.proc │ │ │ ├── simple_app_3.proc │ │ │ ├── simple_arith_1.let │ │ │ ├── simple_let_1.let │ │ │ ├── simple_letrec_1.letrec │ │ │ ├── simple_letrec_2.letrec │ │ │ ├── simple_letrec_3.letrec │ │ │ ├── simple_nested_let.let │ │ │ ├── simple_store_test_1.expref │ │ │ ├── test_unbound_var_1.let │ │ │ ├── test_unbound_var_2.let │ │ │ ├── test_var_1.let │ │ │ ├── test_var_2.let │ │ │ ├── test_var_3.let │ │ │ └── y_combinator_1.proc │ └── implicitrefslang │ │ ├── EnvStore.hs │ │ ├── Expr.hs │ │ ├── Interp.hs │ │ ├── Lexer.hs │ │ ├── Main.hs │ │ ├── MainUtil.hs │ │ ├── Parser.hs │ │ ├── Ref.hs │ │ ├── Token.hs │ │ ├── action_table_implicitrefslang.txt │ │ ├── examples │ │ ├── apply_proc_in_rator_pos.proc │ │ ├── apply_simple_proc.proc │ │ ├── assignment_test_1.impref │ │ ├── begin_test_1.letrec_ext │ │ ├── check_shadowing_in_body.let │ │ ├── check_shadowing_in_rhs.let │ │ ├── eval_let_body.let │ │ ├── eval_let_rhs.let │ │ ├── even_odd_via_set_1.impref │ │ ├── example_for_book_1.impref │ │ ├── gensym_test_1.impref │ │ ├── ho_nested_letrecs.letrec │ │ ├── if_eval_test_false.let │ │ ├── if_eval_test_false_2.let │ │ ├── if_eval_test_true.let │ │ ├── if_eval_test_true_2.let │ │ ├── if_false.let │ │ ├── if_true.let │ │ ├── let_to_proc_1.proc │ │ ├── negative_const.let │ │ ├── nested_arith_left.let │ │ ├── nested_arith_right.let │ │ ├── nested_procs_1.proc │ │ ├── nested_procs_2.proc │ │ ├── no_bool_to_diff_1.let │ │ ├── no_bool_to_diff_2.let │ │ ├── no_int_to_if.let │ │ ├── positive_const.let │ │ ├── simple_app_1.proc │ │ ├── simple_app_2.proc │ │ ├── simple_app_3.proc │ │ ├── simple_arith_1.let │ │ ├── simple_let_1.let │ │ ├── simple_letrec_1.letrec │ │ ├── simple_letrec_2.letrec │ │ ├── simple_letrec_3.letrec │ │ ├── simple_nested_let.let │ │ ├── test_unbound_var_1.let │ │ ├── test_unbound_var_2.let │ │ ├── test_var_1.let │ │ ├── test_var_2.let │ │ ├── test_var_3.let │ │ └── y_combinator_1.proc │ │ ├── goto_table_implicitrefslang.txt │ │ ├── mygrammar_implicitrefslang.grm │ │ ├── mygrammar_implicitrefslang.grm.hash │ │ └── prod_rules_implicitrefslang.txt ├── ch4.cabal ├── package.yaml ├── src │ └── Lib.hs ├── stack.yaml ├── stack.yaml.lock └── test │ ├── explicitrefslang │ └── Spec.hs │ └── implicitrefslang │ └── Spec.hs ├── ch5 ├── .gitignore ├── ChangeLog.md ├── LICENSE ├── README.md ├── Setup.hs ├── app │ ├── exceptions │ │ ├── Env.hs │ │ ├── Expr.hs │ │ ├── Interp.hs │ │ ├── Lexer.hs │ │ ├── Main.hs │ │ ├── MainUtil.hs │ │ ├── Parser.hs │ │ ├── Token.hs │ │ ├── examples │ │ │ ├── apply_proc_in_rator_pos.proc │ │ │ ├── apply_simple_proc.proc │ │ │ ├── car_1.exn │ │ │ ├── cdr_1.exn │ │ │ ├── check_shadowing_in_body.let │ │ │ ├── check_shadowing_in_rhs.let │ │ │ ├── dont_run_handler_til_failure.exn │ │ │ ├── eval_let_body.let │ │ │ ├── eval_let_rhs.let │ │ │ ├── exceptions_have_dynamic_scope_1.exn │ │ │ ├── handler_in_non_tail_recursive_position.exn │ │ │ ├── ho_nested_letrecs.letrec │ │ │ ├── if_eval_test_false.let │ │ │ ├── if_eval_test_false_2.let │ │ │ ├── if_eval_test_true.let │ │ │ ├── if_eval_test_true_2.let │ │ │ ├── if_false.let │ │ │ ├── if_true.let │ │ │ ├── let_to_proc_1.proc │ │ │ ├── lists_1.exn │ │ │ ├── negative_const.let │ │ │ ├── nested_arith_left.let │ │ │ ├── nested_arith_right.let │ │ │ ├── nested_procs_1.proc │ │ │ ├── nested_procs_2.proc │ │ │ ├── no_bool_to_diff_1.let │ │ │ ├── no_bool_to_diff_2.let │ │ │ ├── no_int_to_if.let │ │ │ ├── positive_const.let │ │ │ ├── propagate_error_1.exn │ │ │ ├── propagate_error_2.exn │ │ │ ├── simple_app_1.proc │ │ │ ├── simple_app_2.proc │ │ │ ├── simple_app_3.proc │ │ │ ├── simple_arith_1.let │ │ │ ├── simple_failure.exn │ │ │ ├── simple_let_1.let │ │ │ ├── simple_letrec_1.letrec │ │ │ ├── simple_letrec_2.letrec │ │ │ ├── simple_letrec_3.letrec │ │ │ ├── simple_nested_let.let │ │ │ ├── simple_succeed.exn │ │ │ ├── test_unbound_var_1.let │ │ │ ├── test_unbound_var_2.let │ │ │ ├── test_var_1.let │ │ │ ├── test_var_2.let │ │ │ ├── test_var_3.let │ │ │ ├── text_example_0_1.exn │ │ │ ├── text_example_0_2.exn │ │ │ ├── text_example_1_1.exn │ │ │ ├── text_example_1_2.exn │ │ │ ├── twice.letrec │ │ │ ├── twice.proc │ │ │ ├── uncaught_exception.exn │ │ │ └── y_combinator_1.proc │ │ └── exceptions.cabal │ ├── letreccps │ │ ├── Env.hs │ │ ├── Expr.hs │ │ ├── Interp.hs │ │ ├── Lexer.hs │ │ ├── Main.hs │ │ ├── MainUtil.hs │ │ ├── Parser.hs │ │ ├── Token.hs │ │ └── examples │ │ │ ├── apply_proc_in_rator_pos.proc │ │ │ ├── apply_simple_proc.proc │ │ │ ├── check_shadowing_in_body.let │ │ │ ├── check_shadowing_in_rhs.let │ │ │ ├── eval_let_body.let │ │ │ ├── eval_let_rhs.let │ │ │ ├── ho_nested_letrecs.letrec │ │ │ ├── if_eval_test_false.let │ │ │ ├── if_eval_test_false_2.let │ │ │ ├── if_eval_test_true.let │ │ │ ├── if_eval_test_true_2.let │ │ │ ├── if_false.let │ │ │ ├── if_true.let │ │ │ ├── let_to_proc_1.proc │ │ │ ├── negative_const.let │ │ │ ├── nested_arith_left.let │ │ │ ├── nested_arith_right.let │ │ │ ├── nested_procs_1.proc │ │ │ ├── nested_procs_2.proc │ │ │ ├── no_bool_to_diff_1.let │ │ │ ├── no_bool_to_diff_2.let │ │ │ ├── no_int_to_if.let │ │ │ ├── positive_const.let │ │ │ ├── simple_app_1.proc │ │ │ ├── simple_app_2.proc │ │ │ ├── simple_app_3.proc │ │ │ ├── simple_arith_1.let │ │ │ ├── simple_arith_var_1.let │ │ │ ├── simple_let_1.let │ │ │ ├── simple_letrec_1.letrec │ │ │ ├── simple_letrec_2.letrec │ │ │ ├── simple_letrec_3.letrec │ │ │ ├── simple_nested_let.let │ │ │ ├── test_unbound_var_1.let │ │ │ ├── test_unbound_var_2.let │ │ │ ├── test_var_1.let │ │ │ ├── test_var_2.let │ │ │ ├── test_var_3.let │ │ │ └── y_combinator_1.proc │ └── threads │ │ ├── EnvStore.hs │ │ ├── Expr.hs │ │ ├── Interp.hs │ │ ├── Lexer.hs │ │ ├── Main.hs │ │ ├── MainUtil.hs │ │ ├── Parser.hs │ │ ├── Queue.hs │ │ ├── Scheduler.hs │ │ ├── Semaphores.hs │ │ ├── Token.hs │ │ ├── examples │ │ ├── apply_proc_in_rator_pos.let │ │ ├── apply_simple_proc.let │ │ ├── assignment_test_1.impref │ │ ├── begin_1.impref │ │ ├── begin_2.impref │ │ ├── begin_test_1.letrec_ext │ │ ├── car_1.exn │ │ ├── cdr_1.exn │ │ ├── check_shadowing_in_body.let │ │ ├── check_shadowing_in_rhs.let │ │ ├── dont_run_handler_til_failure.exn │ │ ├── eval_let_body.let │ │ ├── eval_let_rhs.let │ │ ├── even_odd_via_set_1.impref │ │ ├── example_for_book_1.impref │ │ ├── exceptions_have_dynamic_scope_1.exn │ │ ├── gensym_test_1.impref │ │ ├── handler_in_non_tail_recursive_position.exn │ │ ├── ho_nested_letrecs.letrec │ │ ├── if_eval_test_false.let │ │ ├── if_eval_test_false_2.let │ │ ├── if_eval_test_true.let │ │ ├── if_eval_test_true_2.let │ │ ├── if_false.let │ │ ├── if_true.let │ │ ├── insanely_simple_spawn.thr │ │ ├── let_to_proc_1.let │ │ ├── lists_1.exn │ │ ├── negative_const.let │ │ ├── nested_arith_left.let │ │ ├── nested_arith_right.let │ │ ├── nested_procs_1.proc │ │ ├── nested_procs_2.proc │ │ ├── no_bool_to_diff_1.let │ │ ├── no_bool_to_diff_2.let │ │ ├── no_int_to_if.let │ │ ├── positive_const.let │ │ ├── producer_consumer.thr │ │ ├── producer_consumer_with_mutex.thr │ │ ├── propagate_error_1.exn │ │ ├── propagate_error_2.exn │ │ ├── safe_ctr.thr │ │ ├── simple_app_1.proc │ │ ├── simple_app_2.proc │ │ ├── simple_app_3.proc │ │ ├── simple_arith_1.let │ │ ├── simple_failure.exn │ │ ├── simple_let_1.let │ │ ├── simple_letrec_1.letrec │ │ ├── simple_letrec_2.letrec │ │ ├── simple_letrec_3.letrec │ │ ├── simple_nested_let.let │ │ ├── simple_succeed.exn │ │ ├── test_unbound_var_1.let │ │ ├── test_unbound_var_2.let │ │ ├── test_var_1.let │ │ ├── test_var_2.let │ │ ├── test_var_3.let │ │ ├── text_example_0_1.exn │ │ ├── text_example_0_2.exn │ │ ├── text_example_1_1.exn │ │ ├── text_example_1_2.exn │ │ ├── twice.letrec │ │ ├── two_non_cooperating_threads.thr │ │ ├── two_threads.thr │ │ ├── uncaught_exception.exn │ │ ├── unsafe_ctr.thr │ │ ├── unyielding_producer_consumer.thr │ │ └── y_combinator_1.proc │ │ └── exceptions.cabal ├── ch5.cabal ├── package.yaml ├── src │ └── Lib.hs ├── stack.yaml ├── stack.yaml.lock └── test │ ├── exceptions │ └── Spec.hs │ └── letreccps │ └── Spec.hs ├── ch7 ├── CHANGELOG.md ├── LICENSE ├── README.md ├── Setup.hs ├── app │ └── checkedlang │ │ ├── Env.hs │ │ ├── Expr.hs │ │ ├── Interp.hs │ │ ├── Lexer.hs │ │ ├── Main.hs │ │ ├── MainUtil.hs │ │ ├── Parser.hs │ │ ├── Token.hs │ │ └── TypeCheck.hs ├── ch7.cabal ├── dist-newstyle │ └── cache │ │ └── config ├── package.yaml ├── src │ └── Lib.hs ├── stack.yaml ├── stack.yaml.lock └── test │ └── checkedlang │ ├── Spec.hs │ └── TypeCheckerTest.hs └── ch9 ├── CHANGELOG.md ├── LICENSE ├── README.md ├── Setup.hs ├── app └── classes │ ├── EnvStore.hs │ ├── Expr.hs │ ├── Interp.hs │ ├── Lexer.hs │ ├── Main.hs │ ├── Parser.hs │ ├── Ref.hs │ └── Token.hs ├── ch9.cabal ├── dist-newstyle └── cache │ └── config ├── package.yaml ├── src └── Lib.hs ├── stack.yaml ├── stack.yaml.lock └── test └── classes └── Spec.hs /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/README.md -------------------------------------------------------------------------------- /ch3/.gitignore: -------------------------------------------------------------------------------- 1 | .stack-work/ 2 | *~ -------------------------------------------------------------------------------- /ch3/ChangeLog.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/ChangeLog.md -------------------------------------------------------------------------------- /ch3/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/LICENSE -------------------------------------------------------------------------------- /ch3/README.md: -------------------------------------------------------------------------------- 1 | # ch3 2 | -------------------------------------------------------------------------------- /ch3/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /ch3/action_table_letlang.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/action_table_letlang.txt -------------------------------------------------------------------------------- /ch3/app/letlang/Env.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letlang/Env.hs -------------------------------------------------------------------------------- /ch3/app/letlang/Expr.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letlang/Expr.hs -------------------------------------------------------------------------------- /ch3/app/letlang/Interp.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letlang/Interp.hs -------------------------------------------------------------------------------- /ch3/app/letlang/LetLang.lhs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letlang/LetLang.lhs -------------------------------------------------------------------------------- /ch3/app/letlang/Lexer.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letlang/Lexer.hs -------------------------------------------------------------------------------- /ch3/app/letlang/Main.lhs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letlang/Main.lhs -------------------------------------------------------------------------------- /ch3/app/letlang/MainUtil.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letlang/MainUtil.hs -------------------------------------------------------------------------------- /ch3/app/letlang/Parser.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letlang/Parser.hs -------------------------------------------------------------------------------- /ch3/app/letlang/Token.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letlang/Token.hs -------------------------------------------------------------------------------- /ch3/app/letlang/examples/check_shadowing_in_body.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letlang/examples/check_shadowing_in_body.let -------------------------------------------------------------------------------- /ch3/app/letlang/examples/check_shadowing_in_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letlang/examples/check_shadowing_in_rhs.let -------------------------------------------------------------------------------- /ch3/app/letlang/examples/eval_let_body.let: -------------------------------------------------------------------------------- 1 | let x = 3 in -(x,1) -------------------------------------------------------------------------------- /ch3/app/letlang/examples/eval_let_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letlang/examples/eval_let_rhs.let -------------------------------------------------------------------------------- /ch3/app/letlang/examples/if_eval_test_false.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then 3 else 4 -------------------------------------------------------------------------------- /ch3/app/letlang/examples/if_eval_test_false_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then foo else 4 -------------------------------------------------------------------------------- /ch3/app/letlang/examples/if_eval_test_true.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else 4 -------------------------------------------------------------------------------- /ch3/app/letlang/examples/if_eval_test_true_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else foo -------------------------------------------------------------------------------- /ch3/app/letlang/examples/if_false.let: -------------------------------------------------------------------------------- 1 | if zero?(1) then 3 else 4 -------------------------------------------------------------------------------- /ch3/app/letlang/examples/if_true.let: -------------------------------------------------------------------------------- 1 | if zero?(0) then 3 else 4 -------------------------------------------------------------------------------- /ch3/app/letlang/examples/iszero.let: -------------------------------------------------------------------------------- 1 | zero?(x) -------------------------------------------------------------------------------- /ch3/app/letlang/examples/negative_const.let: -------------------------------------------------------------------------------- 1 | -33 -------------------------------------------------------------------------------- /ch3/app/letlang/examples/nested_arith_left.let: -------------------------------------------------------------------------------- 1 | -(-(44,33),22) -------------------------------------------------------------------------------- /ch3/app/letlang/examples/nested_arith_right.let: -------------------------------------------------------------------------------- 1 | -(55,-(22,11)) -------------------------------------------------------------------------------- /ch3/app/letlang/examples/no_bool_to_diff_1.let: -------------------------------------------------------------------------------- 1 | -(zero?(0),1) -------------------------------------------------------------------------------- /ch3/app/letlang/examples/no_bool_to_diff_2.let: -------------------------------------------------------------------------------- 1 | -(1,zero?(0)) -------------------------------------------------------------------------------- /ch3/app/letlang/examples/no_int_to_if.let: -------------------------------------------------------------------------------- 1 | if 1 then 2 else 3 2 | -------------------------------------------------------------------------------- /ch3/app/letlang/examples/positive_const.let: -------------------------------------------------------------------------------- 1 | 11 -------------------------------------------------------------------------------- /ch3/app/letlang/examples/simple_arith_1.let: -------------------------------------------------------------------------------- 1 | -(44,33) 2 | -------------------------------------------------------------------------------- /ch3/app/letlang/examples/simple_arith_var_1.let: -------------------------------------------------------------------------------- 1 | -(44,x) -------------------------------------------------------------------------------- /ch3/app/letlang/examples/simple_let_1.let: -------------------------------------------------------------------------------- 1 | let x = 3 in x -------------------------------------------------------------------------------- /ch3/app/letlang/examples/simple_nested_let.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letlang/examples/simple_nested_let.let -------------------------------------------------------------------------------- /ch3/app/letlang/examples/test_unbound_var_1.let: -------------------------------------------------------------------------------- 1 | foo -------------------------------------------------------------------------------- /ch3/app/letlang/examples/test_unbound_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,foo) -------------------------------------------------------------------------------- /ch3/app/letlang/examples/test_var_1.let: -------------------------------------------------------------------------------- 1 | x -------------------------------------------------------------------------------- /ch3/app/letlang/examples/test_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,1) -------------------------------------------------------------------------------- /ch3/app/letlang/examples/test_var_3.let: -------------------------------------------------------------------------------- 1 | -(1,x) -------------------------------------------------------------------------------- /ch3/app/letreclang/Env.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/Env.hs -------------------------------------------------------------------------------- /ch3/app/letreclang/Expr.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/Expr.hs -------------------------------------------------------------------------------- /ch3/app/letreclang/Interp.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/Interp.hs -------------------------------------------------------------------------------- /ch3/app/letreclang/Lexer.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/Lexer.hs -------------------------------------------------------------------------------- /ch3/app/letreclang/Main.lhs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/Main.lhs -------------------------------------------------------------------------------- /ch3/app/letreclang/MainUtil.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/MainUtil.hs -------------------------------------------------------------------------------- /ch3/app/letreclang/Parser.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/Parser.hs -------------------------------------------------------------------------------- /ch3/app/letreclang/Token.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/Token.hs -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/apply_proc_in_rator_pos.proc: -------------------------------------------------------------------------------- 1 | (proc(x) -(x,1) 30) -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/apply_simple_proc.proc: -------------------------------------------------------------------------------- 1 | let f = proc (x) -(x,1) in (f 30) -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/check_shadowing_in_body.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/examples/check_shadowing_in_body.let -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/check_shadowing_in_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/examples/check_shadowing_in_rhs.let -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/eval_let_body.let: -------------------------------------------------------------------------------- 1 | let x = 3 in -(x,1) -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/eval_let_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/examples/eval_let_rhs.let -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/ho_nested_letrecs.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/examples/ho_nested_letrecs.letrec -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/if_eval_test_false.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then 3 else 4 -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/if_eval_test_false_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then foo else 4 -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/if_eval_test_true.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else 4 -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/if_eval_test_true_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else foo -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/if_false.let: -------------------------------------------------------------------------------- 1 | if zero?(1) then 3 else 4 -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/if_true.let: -------------------------------------------------------------------------------- 1 | if zero?(0) then 3 else 4 -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/let_to_proc_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/examples/let_to_proc_1.proc -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/negative_const.let: -------------------------------------------------------------------------------- 1 | -33 -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/nested_arith_left.let: -------------------------------------------------------------------------------- 1 | -(-(44,33),22) -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/nested_arith_right.let: -------------------------------------------------------------------------------- 1 | -(55,-(22,11)) -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/nested_procs_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/examples/nested_procs_1.proc -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/nested_procs_2.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/examples/nested_procs_2.proc -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/no_bool_to_diff_1.let: -------------------------------------------------------------------------------- 1 | -(zero?(0),1) -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/no_bool_to_diff_2.let: -------------------------------------------------------------------------------- 1 | -(1,zero?(0)) -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/no_int_to_if.let: -------------------------------------------------------------------------------- 1 | if 1 then 2 else 3 2 | -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/positive_const.let: -------------------------------------------------------------------------------- 1 | 11 -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/simple_arith_1.let: -------------------------------------------------------------------------------- 1 | -(44,33) 2 | -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/simple_arith_var_1.let: -------------------------------------------------------------------------------- 1 | -(44,x) -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/simple_let_1.let: -------------------------------------------------------------------------------- 1 | let x = 3 in x -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/simple_letrec_1.letrec: -------------------------------------------------------------------------------- 1 | letrec f(x) = -(x,1) in (f 33) -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/simple_letrec_2.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/examples/simple_letrec_2.letrec -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/simple_letrec_3.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/examples/simple_letrec_3.letrec -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/simple_nested_let.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/examples/simple_nested_let.let -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/test_unbound_var_1.let: -------------------------------------------------------------------------------- 1 | foo -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/test_unbound_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,foo) -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/test_var_1.let: -------------------------------------------------------------------------------- 1 | x -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/test_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,1) -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/test_var_3.let: -------------------------------------------------------------------------------- 1 | -(1,x) -------------------------------------------------------------------------------- /ch3/app/letreclang/examples/y_combinator_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/letreclang/examples/y_combinator_1.proc -------------------------------------------------------------------------------- /ch3/app/proclang/Env.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/Env.hs -------------------------------------------------------------------------------- /ch3/app/proclang/Expr.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/Expr.hs -------------------------------------------------------------------------------- /ch3/app/proclang/Interp.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/Interp.hs -------------------------------------------------------------------------------- /ch3/app/proclang/Lexer.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/Lexer.hs -------------------------------------------------------------------------------- /ch3/app/proclang/Main.lhs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/Main.lhs -------------------------------------------------------------------------------- /ch3/app/proclang/MainUtil.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/MainUtil.hs -------------------------------------------------------------------------------- /ch3/app/proclang/Parser.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/Parser.hs -------------------------------------------------------------------------------- /ch3/app/proclang/ProcLang.lhs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/ProcLang.lhs -------------------------------------------------------------------------------- /ch3/app/proclang/Token.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/Token.hs -------------------------------------------------------------------------------- /ch3/app/proclang/examples/apply_proc_in_rator_pos.proc: -------------------------------------------------------------------------------- 1 | (proc(x) -(x,1) 30) -------------------------------------------------------------------------------- /ch3/app/proclang/examples/apply_simple_proc.proc: -------------------------------------------------------------------------------- 1 | let f = proc (x) -(x,1) in (f 30) -------------------------------------------------------------------------------- /ch3/app/proclang/examples/check_shadowing_in_body.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/examples/check_shadowing_in_body.let -------------------------------------------------------------------------------- /ch3/app/proclang/examples/check_shadowing_in_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/examples/check_shadowing_in_rhs.let -------------------------------------------------------------------------------- /ch3/app/proclang/examples/eval_let_body.let: -------------------------------------------------------------------------------- 1 | let x = 3 in -(x,1) -------------------------------------------------------------------------------- /ch3/app/proclang/examples/eval_let_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/examples/eval_let_rhs.let -------------------------------------------------------------------------------- /ch3/app/proclang/examples/if_eval_test_false.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then 3 else 4 -------------------------------------------------------------------------------- /ch3/app/proclang/examples/if_eval_test_false_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then foo else 4 -------------------------------------------------------------------------------- /ch3/app/proclang/examples/if_eval_test_true.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else 4 -------------------------------------------------------------------------------- /ch3/app/proclang/examples/if_eval_test_true_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else foo -------------------------------------------------------------------------------- /ch3/app/proclang/examples/if_false.let: -------------------------------------------------------------------------------- 1 | if zero?(1) then 3 else 4 -------------------------------------------------------------------------------- /ch3/app/proclang/examples/if_true.let: -------------------------------------------------------------------------------- 1 | if zero?(0) then 3 else 4 -------------------------------------------------------------------------------- /ch3/app/proclang/examples/let_to_proc_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/examples/let_to_proc_1.proc -------------------------------------------------------------------------------- /ch3/app/proclang/examples/negative_const.let: -------------------------------------------------------------------------------- 1 | -33 -------------------------------------------------------------------------------- /ch3/app/proclang/examples/nested_arith_left.let: -------------------------------------------------------------------------------- 1 | -(-(44,33),22) -------------------------------------------------------------------------------- /ch3/app/proclang/examples/nested_arith_right.let: -------------------------------------------------------------------------------- 1 | -(55,-(22,11)) -------------------------------------------------------------------------------- /ch3/app/proclang/examples/nested_procs_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/examples/nested_procs_1.proc -------------------------------------------------------------------------------- /ch3/app/proclang/examples/nested_procs_2.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/examples/nested_procs_2.proc -------------------------------------------------------------------------------- /ch3/app/proclang/examples/no_bool_to_diff_1.let: -------------------------------------------------------------------------------- 1 | -(zero?(0),1) -------------------------------------------------------------------------------- /ch3/app/proclang/examples/no_bool_to_diff_2.let: -------------------------------------------------------------------------------- 1 | -(1,zero?(0)) -------------------------------------------------------------------------------- /ch3/app/proclang/examples/no_int_to_if.let: -------------------------------------------------------------------------------- 1 | if 1 then 2 else 3 2 | -------------------------------------------------------------------------------- /ch3/app/proclang/examples/positive_const.let: -------------------------------------------------------------------------------- 1 | 11 -------------------------------------------------------------------------------- /ch3/app/proclang/examples/simple_arith_1.let: -------------------------------------------------------------------------------- 1 | -(44,33) 2 | -------------------------------------------------------------------------------- /ch3/app/proclang/examples/simple_arith_var_1.let: -------------------------------------------------------------------------------- 1 | -(44,x) -------------------------------------------------------------------------------- /ch3/app/proclang/examples/simple_let_1.let: -------------------------------------------------------------------------------- 1 | let x = 3 in x -------------------------------------------------------------------------------- /ch3/app/proclang/examples/simple_nested_let.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/examples/simple_nested_let.let -------------------------------------------------------------------------------- /ch3/app/proclang/examples/test_unbound_var_1.let: -------------------------------------------------------------------------------- 1 | foo -------------------------------------------------------------------------------- /ch3/app/proclang/examples/test_unbound_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,foo) -------------------------------------------------------------------------------- /ch3/app/proclang/examples/test_var_1.let: -------------------------------------------------------------------------------- 1 | x -------------------------------------------------------------------------------- /ch3/app/proclang/examples/test_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,1) -------------------------------------------------------------------------------- /ch3/app/proclang/examples/test_var_3.let: -------------------------------------------------------------------------------- 1 | -(1,x) -------------------------------------------------------------------------------- /ch3/app/proclang/examples/y_combinator_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/app/proclang/examples/y_combinator_1.proc -------------------------------------------------------------------------------- /ch3/ch3.cabal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/ch3.cabal -------------------------------------------------------------------------------- /ch3/goto_table_letlang.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/goto_table_letlang.txt -------------------------------------------------------------------------------- /ch3/mygrammar_letlang.grm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/mygrammar_letlang.grm -------------------------------------------------------------------------------- /ch3/mygrammar_letlang.grm.hash: -------------------------------------------------------------------------------- 1 | -6741655678793052524 -------------------------------------------------------------------------------- /ch3/package.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/package.yaml -------------------------------------------------------------------------------- /ch3/prod_rules_letlang.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/prod_rules_letlang.txt -------------------------------------------------------------------------------- /ch3/src/Lib.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/src/Lib.hs -------------------------------------------------------------------------------- /ch3/stack.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/stack.yaml -------------------------------------------------------------------------------- /ch3/stack.yaml.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/stack.yaml.lock -------------------------------------------------------------------------------- /ch3/test/letlang/Spec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/test/letlang/Spec.hs -------------------------------------------------------------------------------- /ch3/test/letreclang/Spec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/test/letreclang/Spec.hs -------------------------------------------------------------------------------- /ch3/test/proclang/Spec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch3/test/proclang/Spec.hs -------------------------------------------------------------------------------- /ch4/.gitignore: -------------------------------------------------------------------------------- 1 | .stack-work/ 2 | *~ 3 | *.*~ -------------------------------------------------------------------------------- /ch4/ChangeLog.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/ChangeLog.md -------------------------------------------------------------------------------- /ch4/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/LICENSE -------------------------------------------------------------------------------- /ch4/README.md: -------------------------------------------------------------------------------- 1 | # ch4 2 | -------------------------------------------------------------------------------- /ch4/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/Env.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/Env.hs -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/Expr.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/Expr.hs -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/Interp.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/Interp.hs -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/Lexer.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/Lexer.hs -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/Main.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/Main.hs -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/MainUtil.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/MainUtil.hs -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/Parser.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/Parser.hs -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/Ref.hs: -------------------------------------------------------------------------------- 1 | module Ref where 2 | 3 | type Location = Integer -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/Store.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/Store.hs -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/Token.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/Token.hs -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/assignment_test_1.expref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/assignment_test_1.expref -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/begin_test_1.expref: -------------------------------------------------------------------------------- 1 | begin 1; 2; 3 end -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/chains_1.expref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/chains_1.expref -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/check_shadowing_in_body.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/check_shadowing_in_body.let -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/check_shadowing_in_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/check_shadowing_in_rhs.let -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/eval_let_body.let: -------------------------------------------------------------------------------- 1 | let x = 3 in -(x,1) -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/eval_let_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/eval_let_rhs.let -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/even_odd_via_set_1.expref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/even_odd_via_set_1.expref -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/gensym_test_1.expref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/gensym_test_1.expref -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/gensym_test_2.expref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/gensym_test_2.expref -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/ho_nested_letrecs.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/ho_nested_letrecs.letrec -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/if_eval_test_false.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then 3 else 4 -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/if_eval_test_false_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then foo else 4 -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/if_eval_test_true.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else 4 -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/if_eval_test_true_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else foo -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/if_false.let: -------------------------------------------------------------------------------- 1 | if zero?(1) then 3 else 4 -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/if_true.let: -------------------------------------------------------------------------------- 1 | if zero?(0) then 3 else 4 -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/negative_const.let: -------------------------------------------------------------------------------- 1 | -33 -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/nested_arith_left.let: -------------------------------------------------------------------------------- 1 | -(-(44,33),22) -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/nested_arith_right.let: -------------------------------------------------------------------------------- 1 | -(55,-(22,11)) -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/nested_procs_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/nested_procs_1.proc -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/nested_procs_2.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/nested_procs_2.proc -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/no_bool_to_diff_1.let: -------------------------------------------------------------------------------- 1 | -(zero?(0),1) -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/no_bool_to_diff_2.let: -------------------------------------------------------------------------------- 1 | -(1,zero?(0)) -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/no_int_to_if.let: -------------------------------------------------------------------------------- 1 | if 1 then 2 else 3 2 | -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/positive_const.let: -------------------------------------------------------------------------------- 1 | 11 -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/show_allocation_1.expref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/show_allocation_1.expref -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/simple_app_1.proc: -------------------------------------------------------------------------------- 1 | (proc(x) -(x,1) 30) -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/simple_app_2.proc: -------------------------------------------------------------------------------- 1 | let f = proc (x) -(x,1) in (f 30) -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/simple_app_3.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/simple_app_3.proc -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/simple_arith_1.let: -------------------------------------------------------------------------------- 1 | -(44,33) 2 | -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/simple_let_1.let: -------------------------------------------------------------------------------- 1 | let x = 3 in x -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/simple_letrec_1.letrec: -------------------------------------------------------------------------------- 1 | letrec f(x) = -(x,1) in (f 33) -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/simple_letrec_2.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/simple_letrec_2.letrec -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/simple_letrec_3.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/simple_letrec_3.letrec -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/simple_nested_let.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/simple_nested_let.let -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/simple_store_test_1.expref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/simple_store_test_1.expref -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/test_unbound_var_1.let: -------------------------------------------------------------------------------- 1 | foo -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/test_unbound_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,foo) -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/test_var_1.let: -------------------------------------------------------------------------------- 1 | x -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/test_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,1) -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/test_var_3.let: -------------------------------------------------------------------------------- 1 | -(1,x) -------------------------------------------------------------------------------- /ch4/app/explicitrefslang/examples/y_combinator_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/explicitrefslang/examples/y_combinator_1.proc -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/EnvStore.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/EnvStore.hs -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/Expr.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/Expr.hs -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/Interp.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/Interp.hs -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/Lexer.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/Lexer.hs -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/Main.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/Main.hs -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/MainUtil.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/MainUtil.hs -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/Parser.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/Parser.hs -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/Ref.hs: -------------------------------------------------------------------------------- 1 | module Ref where 2 | 3 | type Location = Integer -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/Token.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/Token.hs -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/action_table_implicitrefslang.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/action_table_implicitrefslang.txt -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/apply_proc_in_rator_pos.proc: -------------------------------------------------------------------------------- 1 | (proc(x) -(x,1) 30) -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/apply_simple_proc.proc: -------------------------------------------------------------------------------- 1 | let f = proc (x) -(x,1) in (f 30) -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/assignment_test_1.impref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/assignment_test_1.impref -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/begin_test_1.letrec_ext: -------------------------------------------------------------------------------- 1 | begin 1; 2; 3 end -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/check_shadowing_in_body.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/check_shadowing_in_body.let -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/check_shadowing_in_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/check_shadowing_in_rhs.let -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/eval_let_body.let: -------------------------------------------------------------------------------- 1 | let x = 3 in -(x,1) -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/eval_let_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/eval_let_rhs.let -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/even_odd_via_set_1.impref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/even_odd_via_set_1.impref -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/example_for_book_1.impref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/example_for_book_1.impref -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/gensym_test_1.impref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/gensym_test_1.impref -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/ho_nested_letrecs.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/ho_nested_letrecs.letrec -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/if_eval_test_false.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then 3 else 4 -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/if_eval_test_false_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then foo else 4 -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/if_eval_test_true.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else 4 -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/if_eval_test_true_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else foo -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/if_false.let: -------------------------------------------------------------------------------- 1 | if zero?(1) then 3 else 4 -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/if_true.let: -------------------------------------------------------------------------------- 1 | if zero?(0) then 3 else 4 -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/let_to_proc_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/let_to_proc_1.proc -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/negative_const.let: -------------------------------------------------------------------------------- 1 | -33 -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/nested_arith_left.let: -------------------------------------------------------------------------------- 1 | -(-(44,33),22) -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/nested_arith_right.let: -------------------------------------------------------------------------------- 1 | -(55,-(22,11)) -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/nested_procs_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/nested_procs_1.proc -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/nested_procs_2.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/nested_procs_2.proc -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/no_bool_to_diff_1.let: -------------------------------------------------------------------------------- 1 | -(zero?(0),1) -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/no_bool_to_diff_2.let: -------------------------------------------------------------------------------- 1 | -(1,zero?(0)) -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/no_int_to_if.let: -------------------------------------------------------------------------------- 1 | if 1 then 2 else 3 2 | -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/positive_const.let: -------------------------------------------------------------------------------- 1 | 11 -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/simple_app_1.proc: -------------------------------------------------------------------------------- 1 | (proc(x) -(x,1) 30) -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/simple_app_2.proc: -------------------------------------------------------------------------------- 1 | let f = proc (x) -(x,1) in (f 30) -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/simple_app_3.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/simple_app_3.proc -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/simple_arith_1.let: -------------------------------------------------------------------------------- 1 | -(44,33) 2 | -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/simple_let_1.let: -------------------------------------------------------------------------------- 1 | let x = 3 in x -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/simple_letrec_1.letrec: -------------------------------------------------------------------------------- 1 | letrec f(x) = -(x,1) in (f 33) -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/simple_letrec_2.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/simple_letrec_2.letrec -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/simple_letrec_3.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/simple_letrec_3.letrec -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/simple_nested_let.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/simple_nested_let.let -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/test_unbound_var_1.let: -------------------------------------------------------------------------------- 1 | foo -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/test_unbound_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,foo) -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/test_var_1.let: -------------------------------------------------------------------------------- 1 | x -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/test_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,1) -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/test_var_3.let: -------------------------------------------------------------------------------- 1 | -(1,x) -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/examples/y_combinator_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/examples/y_combinator_1.proc -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/goto_table_implicitrefslang.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/goto_table_implicitrefslang.txt -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/mygrammar_implicitrefslang.grm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/mygrammar_implicitrefslang.grm -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/mygrammar_implicitrefslang.grm.hash: -------------------------------------------------------------------------------- 1 | -1075125655037129308 -------------------------------------------------------------------------------- /ch4/app/implicitrefslang/prod_rules_implicitrefslang.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/app/implicitrefslang/prod_rules_implicitrefslang.txt -------------------------------------------------------------------------------- /ch4/ch4.cabal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/ch4.cabal -------------------------------------------------------------------------------- /ch4/package.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/package.yaml -------------------------------------------------------------------------------- /ch4/src/Lib.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/src/Lib.hs -------------------------------------------------------------------------------- /ch4/stack.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/stack.yaml -------------------------------------------------------------------------------- /ch4/stack.yaml.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/stack.yaml.lock -------------------------------------------------------------------------------- /ch4/test/explicitrefslang/Spec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/test/explicitrefslang/Spec.hs -------------------------------------------------------------------------------- /ch4/test/implicitrefslang/Spec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch4/test/implicitrefslang/Spec.hs -------------------------------------------------------------------------------- /ch5/.gitignore: -------------------------------------------------------------------------------- 1 | .stack-work/ 2 | *~ -------------------------------------------------------------------------------- /ch5/ChangeLog.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/ChangeLog.md -------------------------------------------------------------------------------- /ch5/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/LICENSE -------------------------------------------------------------------------------- /ch5/README.md: -------------------------------------------------------------------------------- 1 | # ch5 2 | -------------------------------------------------------------------------------- /ch5/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /ch5/app/exceptions/Env.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/Env.hs -------------------------------------------------------------------------------- /ch5/app/exceptions/Expr.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/Expr.hs -------------------------------------------------------------------------------- /ch5/app/exceptions/Interp.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/Interp.hs -------------------------------------------------------------------------------- /ch5/app/exceptions/Lexer.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/Lexer.hs -------------------------------------------------------------------------------- /ch5/app/exceptions/Main.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/Main.hs -------------------------------------------------------------------------------- /ch5/app/exceptions/MainUtil.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/MainUtil.hs -------------------------------------------------------------------------------- /ch5/app/exceptions/Parser.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/Parser.hs -------------------------------------------------------------------------------- /ch5/app/exceptions/Token.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/Token.hs -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/apply_proc_in_rator_pos.proc: -------------------------------------------------------------------------------- 1 | (proc(x) -(x,1) 30) -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/apply_simple_proc.proc: -------------------------------------------------------------------------------- 1 | let f = proc (x) -(x,1) in (f 30) -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/car_1.exn: -------------------------------------------------------------------------------- 1 | car(list(2,3,4)) 2 | 3 | -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/cdr_1.exn: -------------------------------------------------------------------------------- 1 | cdr(list(2,3,4)) 2 | -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/check_shadowing_in_body.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/check_shadowing_in_body.let -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/check_shadowing_in_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/check_shadowing_in_rhs.let -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/dont_run_handler_til_failure.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/dont_run_handler_til_failure.exn -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/eval_let_body.let: -------------------------------------------------------------------------------- 1 | let x = 3 in -(x,1) -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/eval_let_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/eval_let_rhs.let -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/exceptions_have_dynamic_scope_1.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/exceptions_have_dynamic_scope_1.exn -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/handler_in_non_tail_recursive_position.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/handler_in_non_tail_recursive_position.exn -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/ho_nested_letrecs.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/ho_nested_letrecs.letrec -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/if_eval_test_false.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then 3 else 4 -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/if_eval_test_false_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then foo else 4 -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/if_eval_test_true.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else 4 -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/if_eval_test_true_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else foo -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/if_false.let: -------------------------------------------------------------------------------- 1 | if zero?(1) then 3 else 4 -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/if_true.let: -------------------------------------------------------------------------------- 1 | if zero?(0) then 3 else 4 -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/let_to_proc_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/let_to_proc_1.proc -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/lists_1.exn: -------------------------------------------------------------------------------- 1 | list(2, 3, 4) 2 | -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/negative_const.let: -------------------------------------------------------------------------------- 1 | -33 -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/nested_arith_left.let: -------------------------------------------------------------------------------- 1 | -(-(44,33),22) -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/nested_arith_right.let: -------------------------------------------------------------------------------- 1 | -(55,-(22,11)) -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/nested_procs_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/nested_procs_1.proc -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/nested_procs_2.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/nested_procs_2.proc -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/no_bool_to_diff_1.let: -------------------------------------------------------------------------------- 1 | -(zero?(0),1) -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/no_bool_to_diff_2.let: -------------------------------------------------------------------------------- 1 | -(1,zero?(0)) -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/no_int_to_if.let: -------------------------------------------------------------------------------- 1 | if 1 then 2 else 3 2 | -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/positive_const.let: -------------------------------------------------------------------------------- 1 | 11 -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/propagate_error_1.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/propagate_error_1.exn -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/propagate_error_2.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/propagate_error_2.exn -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/simple_app_1.proc: -------------------------------------------------------------------------------- 1 | (proc(x) -(x,1) 30) -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/simple_app_2.proc: -------------------------------------------------------------------------------- 1 | let f = proc (x) -(x,1) in (f 30) -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/simple_app_3.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/simple_app_3.proc -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/simple_arith_1.let: -------------------------------------------------------------------------------- 1 | -(44,33) 2 | -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/simple_failure.exn: -------------------------------------------------------------------------------- 1 | try -(1, raise 44) catch (m) m 2 | -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/simple_let_1.let: -------------------------------------------------------------------------------- 1 | let x = 3 in x -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/simple_letrec_1.letrec: -------------------------------------------------------------------------------- 1 | letrec f(x) = -(x,1) in (f 33) -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/simple_letrec_2.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/simple_letrec_2.letrec -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/simple_letrec_3.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/simple_letrec_3.letrec -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/simple_nested_let.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/simple_nested_let.let -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/simple_succeed.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/simple_succeed.exn -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/test_unbound_var_1.let: -------------------------------------------------------------------------------- 1 | foo -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/test_unbound_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,foo) -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/test_var_1.let: -------------------------------------------------------------------------------- 1 | x -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/test_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,1) -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/test_var_3.let: -------------------------------------------------------------------------------- 1 | -(1,x) -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/text_example_0_1.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/text_example_0_1.exn -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/text_example_0_2.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/text_example_0_2.exn -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/text_example_1_1.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/text_example_1_1.exn -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/text_example_1_2.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/text_example_1_2.exn -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/twice.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/twice.letrec -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/twice.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/twice.proc -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/uncaught_exception.exn: -------------------------------------------------------------------------------- 1 | -(22, raise 13) 2 | -------------------------------------------------------------------------------- /ch5/app/exceptions/examples/y_combinator_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/examples/y_combinator_1.proc -------------------------------------------------------------------------------- /ch5/app/exceptions/exceptions.cabal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/exceptions/exceptions.cabal -------------------------------------------------------------------------------- /ch5/app/letreccps/Env.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/Env.hs -------------------------------------------------------------------------------- /ch5/app/letreccps/Expr.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/Expr.hs -------------------------------------------------------------------------------- /ch5/app/letreccps/Interp.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/Interp.hs -------------------------------------------------------------------------------- /ch5/app/letreccps/Lexer.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/Lexer.hs -------------------------------------------------------------------------------- /ch5/app/letreccps/Main.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/Main.hs -------------------------------------------------------------------------------- /ch5/app/letreccps/MainUtil.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/MainUtil.hs -------------------------------------------------------------------------------- /ch5/app/letreccps/Parser.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/Parser.hs -------------------------------------------------------------------------------- /ch5/app/letreccps/Token.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/Token.hs -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/apply_proc_in_rator_pos.proc: -------------------------------------------------------------------------------- 1 | (proc(x) -(x,1) 30) -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/apply_simple_proc.proc: -------------------------------------------------------------------------------- 1 | let f = proc (x) -(x,1) in (f 30) -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/check_shadowing_in_body.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/examples/check_shadowing_in_body.let -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/check_shadowing_in_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/examples/check_shadowing_in_rhs.let -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/eval_let_body.let: -------------------------------------------------------------------------------- 1 | let x = 3 in -(x,1) -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/eval_let_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/examples/eval_let_rhs.let -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/ho_nested_letrecs.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/examples/ho_nested_letrecs.letrec -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/if_eval_test_false.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then 3 else 4 -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/if_eval_test_false_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then foo else 4 -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/if_eval_test_true.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else 4 -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/if_eval_test_true_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else foo -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/if_false.let: -------------------------------------------------------------------------------- 1 | if zero?(1) then 3 else 4 -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/if_true.let: -------------------------------------------------------------------------------- 1 | if zero?(0) then 3 else 4 -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/let_to_proc_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/examples/let_to_proc_1.proc -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/negative_const.let: -------------------------------------------------------------------------------- 1 | -33 -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/nested_arith_left.let: -------------------------------------------------------------------------------- 1 | -(-(44,33),22) -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/nested_arith_right.let: -------------------------------------------------------------------------------- 1 | -(55,-(22,11)) -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/nested_procs_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/examples/nested_procs_1.proc -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/nested_procs_2.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/examples/nested_procs_2.proc -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/no_bool_to_diff_1.let: -------------------------------------------------------------------------------- 1 | -(zero?(0),1) -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/no_bool_to_diff_2.let: -------------------------------------------------------------------------------- 1 | -(1,zero?(0)) -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/no_int_to_if.let: -------------------------------------------------------------------------------- 1 | if 1 then 2 else 3 2 | -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/positive_const.let: -------------------------------------------------------------------------------- 1 | 11 -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/simple_app_1.proc: -------------------------------------------------------------------------------- 1 | (proc(x) -(x,1) 30) -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/simple_app_2.proc: -------------------------------------------------------------------------------- 1 | let f = proc (x) -(x,1) in (f 30) -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/simple_app_3.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/examples/simple_app_3.proc -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/simple_arith_1.let: -------------------------------------------------------------------------------- 1 | -(44,33) 2 | -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/simple_arith_var_1.let: -------------------------------------------------------------------------------- 1 | -(44,x) -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/simple_let_1.let: -------------------------------------------------------------------------------- 1 | let x = 3 in x -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/simple_letrec_1.letrec: -------------------------------------------------------------------------------- 1 | letrec f(x) = -(x,1) in (f 33) -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/simple_letrec_2.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/examples/simple_letrec_2.letrec -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/simple_letrec_3.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/examples/simple_letrec_3.letrec -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/simple_nested_let.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/examples/simple_nested_let.let -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/test_unbound_var_1.let: -------------------------------------------------------------------------------- 1 | foo -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/test_unbound_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,foo) -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/test_var_1.let: -------------------------------------------------------------------------------- 1 | x -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/test_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,1) -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/test_var_3.let: -------------------------------------------------------------------------------- 1 | -(1,x) -------------------------------------------------------------------------------- /ch5/app/letreccps/examples/y_combinator_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/letreccps/examples/y_combinator_1.proc -------------------------------------------------------------------------------- /ch5/app/threads/EnvStore.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/EnvStore.hs -------------------------------------------------------------------------------- /ch5/app/threads/Expr.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/Expr.hs -------------------------------------------------------------------------------- /ch5/app/threads/Interp.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/Interp.hs -------------------------------------------------------------------------------- /ch5/app/threads/Lexer.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/Lexer.hs -------------------------------------------------------------------------------- /ch5/app/threads/Main.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/Main.hs -------------------------------------------------------------------------------- /ch5/app/threads/MainUtil.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/MainUtil.hs -------------------------------------------------------------------------------- /ch5/app/threads/Parser.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/Parser.hs -------------------------------------------------------------------------------- /ch5/app/threads/Queue.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/Queue.hs -------------------------------------------------------------------------------- /ch5/app/threads/Scheduler.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/Scheduler.hs -------------------------------------------------------------------------------- /ch5/app/threads/Semaphores.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/Semaphores.hs -------------------------------------------------------------------------------- /ch5/app/threads/Token.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/Token.hs -------------------------------------------------------------------------------- /ch5/app/threads/examples/apply_proc_in_rator_pos.let: -------------------------------------------------------------------------------- 1 | (proc(x) -(x,1) 30) -------------------------------------------------------------------------------- /ch5/app/threads/examples/apply_simple_proc.let: -------------------------------------------------------------------------------- 1 | let f = proc (x) -(x,1) in (f 30) -------------------------------------------------------------------------------- /ch5/app/threads/examples/assignment_test_1.impref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/assignment_test_1.impref -------------------------------------------------------------------------------- /ch5/app/threads/examples/begin_1.impref: -------------------------------------------------------------------------------- 1 | begin 33 end -------------------------------------------------------------------------------- /ch5/app/threads/examples/begin_2.impref: -------------------------------------------------------------------------------- 1 | begin 33; 44 end -------------------------------------------------------------------------------- /ch5/app/threads/examples/begin_test_1.letrec_ext: -------------------------------------------------------------------------------- 1 | begin 1; 2; 3 end -------------------------------------------------------------------------------- /ch5/app/threads/examples/car_1.exn: -------------------------------------------------------------------------------- 1 | car(list(2,3,4)) 2 | 3 | -------------------------------------------------------------------------------- /ch5/app/threads/examples/cdr_1.exn: -------------------------------------------------------------------------------- 1 | cdr(list(2,3,4)) 2 | -------------------------------------------------------------------------------- /ch5/app/threads/examples/check_shadowing_in_body.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/check_shadowing_in_body.let -------------------------------------------------------------------------------- /ch5/app/threads/examples/check_shadowing_in_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/check_shadowing_in_rhs.let -------------------------------------------------------------------------------- /ch5/app/threads/examples/dont_run_handler_til_failure.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/dont_run_handler_til_failure.exn -------------------------------------------------------------------------------- /ch5/app/threads/examples/eval_let_body.let: -------------------------------------------------------------------------------- 1 | let x = 3 in -(x,1) -------------------------------------------------------------------------------- /ch5/app/threads/examples/eval_let_rhs.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/eval_let_rhs.let -------------------------------------------------------------------------------- /ch5/app/threads/examples/even_odd_via_set_1.impref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/even_odd_via_set_1.impref -------------------------------------------------------------------------------- /ch5/app/threads/examples/example_for_book_1.impref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/example_for_book_1.impref -------------------------------------------------------------------------------- /ch5/app/threads/examples/exceptions_have_dynamic_scope_1.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/exceptions_have_dynamic_scope_1.exn -------------------------------------------------------------------------------- /ch5/app/threads/examples/gensym_test_1.impref: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/gensym_test_1.impref -------------------------------------------------------------------------------- /ch5/app/threads/examples/handler_in_non_tail_recursive_position.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/handler_in_non_tail_recursive_position.exn -------------------------------------------------------------------------------- /ch5/app/threads/examples/ho_nested_letrecs.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/ho_nested_letrecs.letrec -------------------------------------------------------------------------------- /ch5/app/threads/examples/if_eval_test_false.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then 3 else 4 -------------------------------------------------------------------------------- /ch5/app/threads/examples/if_eval_test_false_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,12)) then foo else 4 -------------------------------------------------------------------------------- /ch5/app/threads/examples/if_eval_test_true.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else 4 -------------------------------------------------------------------------------- /ch5/app/threads/examples/if_eval_test_true_2.let: -------------------------------------------------------------------------------- 1 | if zero?(-(11,11)) then 3 else foo -------------------------------------------------------------------------------- /ch5/app/threads/examples/if_false.let: -------------------------------------------------------------------------------- 1 | if zero?(1) then 3 else 4 -------------------------------------------------------------------------------- /ch5/app/threads/examples/if_true.let: -------------------------------------------------------------------------------- 1 | if zero?(0) then 3 else 4 -------------------------------------------------------------------------------- /ch5/app/threads/examples/insanely_simple_spawn.thr: -------------------------------------------------------------------------------- 1 | begin spawn(proc(d) 3); 44 end 2 | -------------------------------------------------------------------------------- /ch5/app/threads/examples/let_to_proc_1.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/let_to_proc_1.let -------------------------------------------------------------------------------- /ch5/app/threads/examples/lists_1.exn: -------------------------------------------------------------------------------- 1 | list(2, 3, 4) 2 | -------------------------------------------------------------------------------- /ch5/app/threads/examples/negative_const.let: -------------------------------------------------------------------------------- 1 | -33 -------------------------------------------------------------------------------- /ch5/app/threads/examples/nested_arith_left.let: -------------------------------------------------------------------------------- 1 | -(-(44,33),22) -------------------------------------------------------------------------------- /ch5/app/threads/examples/nested_arith_right.let: -------------------------------------------------------------------------------- 1 | -(55,-(22,11)) -------------------------------------------------------------------------------- /ch5/app/threads/examples/nested_procs_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/nested_procs_1.proc -------------------------------------------------------------------------------- /ch5/app/threads/examples/nested_procs_2.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/nested_procs_2.proc -------------------------------------------------------------------------------- /ch5/app/threads/examples/no_bool_to_diff_1.let: -------------------------------------------------------------------------------- 1 | -(zero?(0),1) -------------------------------------------------------------------------------- /ch5/app/threads/examples/no_bool_to_diff_2.let: -------------------------------------------------------------------------------- 1 | -(1,zero?(0)) -------------------------------------------------------------------------------- /ch5/app/threads/examples/no_int_to_if.let: -------------------------------------------------------------------------------- 1 | if 1 then 2 else 3 2 | -------------------------------------------------------------------------------- /ch5/app/threads/examples/positive_const.let: -------------------------------------------------------------------------------- 1 | 11 -------------------------------------------------------------------------------- /ch5/app/threads/examples/producer_consumer.thr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/producer_consumer.thr -------------------------------------------------------------------------------- /ch5/app/threads/examples/producer_consumer_with_mutex.thr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/producer_consumer_with_mutex.thr -------------------------------------------------------------------------------- /ch5/app/threads/examples/propagate_error_1.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/propagate_error_1.exn -------------------------------------------------------------------------------- /ch5/app/threads/examples/propagate_error_2.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/propagate_error_2.exn -------------------------------------------------------------------------------- /ch5/app/threads/examples/safe_ctr.thr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/safe_ctr.thr -------------------------------------------------------------------------------- /ch5/app/threads/examples/simple_app_1.proc: -------------------------------------------------------------------------------- 1 | (proc(x) -(x,1) 30) -------------------------------------------------------------------------------- /ch5/app/threads/examples/simple_app_2.proc: -------------------------------------------------------------------------------- 1 | let f = proc (x) -(x,1) in (f 30) -------------------------------------------------------------------------------- /ch5/app/threads/examples/simple_app_3.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/simple_app_3.proc -------------------------------------------------------------------------------- /ch5/app/threads/examples/simple_arith_1.let: -------------------------------------------------------------------------------- 1 | -(44,33) 2 | -------------------------------------------------------------------------------- /ch5/app/threads/examples/simple_failure.exn: -------------------------------------------------------------------------------- 1 | try -(1, raise 44) catch (m) m 2 | -------------------------------------------------------------------------------- /ch5/app/threads/examples/simple_let_1.let: -------------------------------------------------------------------------------- 1 | let x = 3 in x -------------------------------------------------------------------------------- /ch5/app/threads/examples/simple_letrec_1.letrec: -------------------------------------------------------------------------------- 1 | letrec f(x) = -(x,1) in (f 33) -------------------------------------------------------------------------------- /ch5/app/threads/examples/simple_letrec_2.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/simple_letrec_2.letrec -------------------------------------------------------------------------------- /ch5/app/threads/examples/simple_letrec_3.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/simple_letrec_3.letrec -------------------------------------------------------------------------------- /ch5/app/threads/examples/simple_nested_let.let: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/simple_nested_let.let -------------------------------------------------------------------------------- /ch5/app/threads/examples/simple_succeed.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/simple_succeed.exn -------------------------------------------------------------------------------- /ch5/app/threads/examples/test_unbound_var_1.let: -------------------------------------------------------------------------------- 1 | foo -------------------------------------------------------------------------------- /ch5/app/threads/examples/test_unbound_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,foo) -------------------------------------------------------------------------------- /ch5/app/threads/examples/test_var_1.let: -------------------------------------------------------------------------------- 1 | x -------------------------------------------------------------------------------- /ch5/app/threads/examples/test_var_2.let: -------------------------------------------------------------------------------- 1 | -(x,1) -------------------------------------------------------------------------------- /ch5/app/threads/examples/test_var_3.let: -------------------------------------------------------------------------------- 1 | -(1,x) -------------------------------------------------------------------------------- /ch5/app/threads/examples/text_example_0_1.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/text_example_0_1.exn -------------------------------------------------------------------------------- /ch5/app/threads/examples/text_example_0_2.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/text_example_0_2.exn -------------------------------------------------------------------------------- /ch5/app/threads/examples/text_example_1_1.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/text_example_1_1.exn -------------------------------------------------------------------------------- /ch5/app/threads/examples/text_example_1_2.exn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/text_example_1_2.exn -------------------------------------------------------------------------------- /ch5/app/threads/examples/twice.letrec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/twice.letrec -------------------------------------------------------------------------------- /ch5/app/threads/examples/two_non_cooperating_threads.thr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/two_non_cooperating_threads.thr -------------------------------------------------------------------------------- /ch5/app/threads/examples/two_threads.thr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/two_threads.thr -------------------------------------------------------------------------------- /ch5/app/threads/examples/uncaught_exception.exn: -------------------------------------------------------------------------------- 1 | -(22, raise 13) 2 | -------------------------------------------------------------------------------- /ch5/app/threads/examples/unsafe_ctr.thr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/unsafe_ctr.thr -------------------------------------------------------------------------------- /ch5/app/threads/examples/unyielding_producer_consumer.thr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/unyielding_producer_consumer.thr -------------------------------------------------------------------------------- /ch5/app/threads/examples/y_combinator_1.proc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/examples/y_combinator_1.proc -------------------------------------------------------------------------------- /ch5/app/threads/exceptions.cabal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/app/threads/exceptions.cabal -------------------------------------------------------------------------------- /ch5/ch5.cabal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/ch5.cabal -------------------------------------------------------------------------------- /ch5/package.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/package.yaml -------------------------------------------------------------------------------- /ch5/src/Lib.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/src/Lib.hs -------------------------------------------------------------------------------- /ch5/stack.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/stack.yaml -------------------------------------------------------------------------------- /ch5/stack.yaml.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/stack.yaml.lock -------------------------------------------------------------------------------- /ch5/test/exceptions/Spec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/test/exceptions/Spec.hs -------------------------------------------------------------------------------- /ch5/test/letreccps/Spec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch5/test/letreccps/Spec.hs -------------------------------------------------------------------------------- /ch7/CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/CHANGELOG.md -------------------------------------------------------------------------------- /ch7/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/LICENSE -------------------------------------------------------------------------------- /ch7/README.md: -------------------------------------------------------------------------------- 1 | # ch7 2 | -------------------------------------------------------------------------------- /ch7/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /ch7/app/checkedlang/Env.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/app/checkedlang/Env.hs -------------------------------------------------------------------------------- /ch7/app/checkedlang/Expr.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/app/checkedlang/Expr.hs -------------------------------------------------------------------------------- /ch7/app/checkedlang/Interp.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/app/checkedlang/Interp.hs -------------------------------------------------------------------------------- /ch7/app/checkedlang/Lexer.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/app/checkedlang/Lexer.hs -------------------------------------------------------------------------------- /ch7/app/checkedlang/Main.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/app/checkedlang/Main.hs -------------------------------------------------------------------------------- /ch7/app/checkedlang/MainUtil.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/app/checkedlang/MainUtil.hs -------------------------------------------------------------------------------- /ch7/app/checkedlang/Parser.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/app/checkedlang/Parser.hs -------------------------------------------------------------------------------- /ch7/app/checkedlang/Token.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/app/checkedlang/Token.hs -------------------------------------------------------------------------------- /ch7/app/checkedlang/TypeCheck.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/app/checkedlang/TypeCheck.hs -------------------------------------------------------------------------------- /ch7/ch7.cabal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/ch7.cabal -------------------------------------------------------------------------------- /ch7/dist-newstyle/cache/config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/dist-newstyle/cache/config -------------------------------------------------------------------------------- /ch7/package.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/package.yaml -------------------------------------------------------------------------------- /ch7/src/Lib.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/src/Lib.hs -------------------------------------------------------------------------------- /ch7/stack.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/stack.yaml -------------------------------------------------------------------------------- /ch7/stack.yaml.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/stack.yaml.lock -------------------------------------------------------------------------------- /ch7/test/checkedlang/Spec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/test/checkedlang/Spec.hs -------------------------------------------------------------------------------- /ch7/test/checkedlang/TypeCheckerTest.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch7/test/checkedlang/TypeCheckerTest.hs -------------------------------------------------------------------------------- /ch9/CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/CHANGELOG.md -------------------------------------------------------------------------------- /ch9/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/LICENSE -------------------------------------------------------------------------------- /ch9/README.md: -------------------------------------------------------------------------------- 1 | # ch9 2 | -------------------------------------------------------------------------------- /ch9/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /ch9/app/classes/EnvStore.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/app/classes/EnvStore.hs -------------------------------------------------------------------------------- /ch9/app/classes/Expr.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/app/classes/Expr.hs -------------------------------------------------------------------------------- /ch9/app/classes/Interp.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/app/classes/Interp.hs -------------------------------------------------------------------------------- /ch9/app/classes/Lexer.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/app/classes/Lexer.hs -------------------------------------------------------------------------------- /ch9/app/classes/Main.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/app/classes/Main.hs -------------------------------------------------------------------------------- /ch9/app/classes/Parser.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/app/classes/Parser.hs -------------------------------------------------------------------------------- /ch9/app/classes/Ref.hs: -------------------------------------------------------------------------------- 1 | module Ref where 2 | 3 | type Location = Integer -------------------------------------------------------------------------------- /ch9/app/classes/Token.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/app/classes/Token.hs -------------------------------------------------------------------------------- /ch9/ch9.cabal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/ch9.cabal -------------------------------------------------------------------------------- /ch9/dist-newstyle/cache/config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/dist-newstyle/cache/config -------------------------------------------------------------------------------- /ch9/package.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/package.yaml -------------------------------------------------------------------------------- /ch9/src/Lib.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/src/Lib.hs -------------------------------------------------------------------------------- /ch9/stack.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/stack.yaml -------------------------------------------------------------------------------- /ch9/stack.yaml.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/stack.yaml.lock -------------------------------------------------------------------------------- /ch9/test/classes/Spec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kwanghoon/Lecture_EOPL_Exercise/HEAD/ch9/test/classes/Spec.hs --------------------------------------------------------------------------------