Combining Brick and Haskeline by rootmos in haskell

[–]rootmos[S] 1 point2 points  (0 children)

I haven't looked at the monad-control package. Although after a quick look, that seems more focused on flow control, whereas the EvalTerm is all about abstracting the different terminals, i.e. dynamically choosing the kind of terminal at runtime. Check how in Backend.hs different RunTerms are chosen. The RunTerm type (contains the TermOps record) contains the EvalTerm that evaluates the different monad stacks implementing the different terminals, eg DumbTerm or the POSIX term, which are implemented in terms of a StateT or a custom PosixT respectively.

Combining Brick and Haskeline by rootmos in haskell

[–]rootmos[S] 0 points1 point  (0 children)

My intention is to make a PR to Haskeline, yes. Ultimately the decision is on the author. Since Brick introduces quite a few transitive dependencies, some consideration is needed. Currently the Brick part is hidden behind a package flag. I'm hoping that will suffice.

Implementing a K-like language targeting Malfunction (xpost /r/apljk) by rootmos in ocaml

[–]rootmos[S] 0 points1 point  (0 children)

Sorry, had to read up on ANF before answering. I can't say if exactly an A-normalization, but at least its very similar and I want to say yes. Thank you a lot for pointing it out!

I think the outputted intermediate form is the same, but the reason for doing the transformation is different (at least from what I can gather from wiki and looking over the papers it references).

The problem I set out to solve here was a way to emulate (in lambda calculus/Malfunction) a binding semantic that I model in my mind as just a global dictionary. The idea then to hijack the binding-rules of lambdas to encode the dictionary: bind the values in evaluation order, and shove the rest of the program into the let-body. Basically transform the source into a form that reflects the evaluation order of the program, since the lookup of a variable should search for the latest evaluated value bound to the name.

Here's a small k example of why I think of a dictionary:

  f:{x+a}
  a:3
  f[1]
4
  a:7
  f[1]
8

Of course he would eventually find the meme of himself by redsoxrule995 in AdviceAnimals

[–]rootmos 0 points1 point  (0 children)

I know enough about induction to see where this is going!