core.match

large pattern problematic for ClojureScript

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

(ns test
  (:use-macros [clojure.core.match.js :only [match]])
  (:require [clojure.core.match]))

(defn get-meaning
        [paragraph line blank mode theme annotation]
                (match
                        [paragraph  line    (> blank 0) mode    theme   annotation  ]
                        [_          _       true        _       _       _           ] "monaco-enter"
                        [_          _       _           _       true    _           ] "monaco-theme"
                        [_          _       _           _       false   true        ] "monaco-annotation"
                        [_          _       false       :theme  _       false       ] "monaco-note"
                        [0          0       false       _       false   false       ] "monaco-outcome"
                        [0          _       false       _       false   false       ] "monaco-perex"
                        [1          _       false       _       false   false       ] "monaco-next-action"
                        [2          _       false       _       false   false       ] "monaco-following-action"
                        [_          _       false       nil     false   false       ] "monaco-supplemental"
                        :else "monaco-generic"
                        )
        )

Activity

Hide
David Nolen added a comment -

When addressing this patch we should do several things - reorg the namespaces, allow CLJS user to pick their compilation strategy explicitly - if the backtrack solution is chosen we should throw if recur is present.

Show
David Nolen added a comment - When addressing this patch we should do several things - reorg the namespaces, allow CLJS user to pick their compilation strategy explicitly - if the backtrack solution is chosen we should throw if recur is present.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: