hyperfiddle / hyperfiddle/rcf

idea: richer support for pattern matching Exceptions

Open
#39 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
301
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Should be able to do something cool with unification, so that this "documentation of proof of bug" is fully semantic

(tests
  (p/run2 (p/vars hash-map true?) (! ~#'(when (true? true) :ok)))
  % := :ok ; pass
​
  (p/run2 (p/vars hash-map true?) (! ~#'(when (true? ~@ true) :ok)))
  % := :ok
  ;; FAIL
  ;; java.lang.ClassCastException: class hfdl.impl.runtime.Failure cannot be cast to class clojure.lang.IFn
  ;; at hfdl.impl.util$bind_flow$fn__50103.invoke(util.cljc:128)
  ;; at hfdl.impl.switch$transfer_BANG_$fn__50158.invoke(switch.cljc:89)
  ;; at hfdl.impl.switch$transfer_BANG_.invokeStatic(switch.cljc:89)
  ;; at hfdl.impl.switch$transfer_BANG_.invoke(switch.cljc:50)
  ;; at hfdl.impl.switch$switch$fn__50162.invoke(switch.cljc:114)
  ;; at missionary.impl.Reactor.publish(Reactor.java:390)
  )

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the failing p/run2 example and its stack trace. Read the referenced bind_flow code in util.cljc around line 128 and transfer_BANG_ in switch.cljc around lines 50 and 89. The issue does not define the intended semantic behavior or a concrete done condition, so clarify those before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.