Skip to content

Instantly share code, notes, and snippets.

View frenchy64's full-sized avatar

Ambrose Bonnaire-Sergeant frenchy64

  • Madison, Wisconsin
View GitHub Profile
(ns clojure.core.typed.test.mapping-test-file
(:require [clojure.core.typed :as t]))
(let [a (+ 1 2)]
a)
(let [{:keys [a b c]} {:a 2 :b 3}]
(+ a b))
(ns typed-demo.protocol
(:require [clojure.core.typed :as tc])
(:import (java.util Random)))
(tc/defprotocol IRandom
(-next-int
[this limit :- Integer] :- Integer))
(tc/ann-record SeededRandom [seed :- tc/AnyInteger
rng :- java.util.Random])
user=> (clojure.core.typed/cf 1)
Initializing core.typed ...
IllegalStateException Attempting to call unbound fn: #'clojure.core.typed/tc-ignore-forms* clojure.lang.Var$Unbound.throwArity (Var.java:43)
user=> (clojure.repl/pst)
IllegalStateException Attempting to call unbound fn: #'clojure.core.typed/tc-ignore-forms*
clojure.lang.Var$Unbound.throwArity (Var.java:43)
clojure.core.typed.utils__init.load (:18)
clojure.core.typed.utils__init.<clinit> (:-1)
java.lang.Class.forName0 (Class.java:-2)
ambrose@ambrose-VirtualBox:~/Projects/Idris-dev$ make
cabal install
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: idris-0.9.12 (user goal)
next goal: trifecta (dependency of idris-0.9.12)
rejecting: trifecta-1.4.2, 1.4.1, 1.4 (conflict: unordered-containers =>
hashable==1.2.0.2/installed-d02..., trifecta => hashable>=1.2.1 && <1.3)
trying: trifecta-1.2.1.1
trying: reducers-3.10.2.1 (dependency of trifecta-1.2.1.1)
ambrose@ambrose-VirtualBox:/usr/local/cabal/idris$ sudo ~/.cabal/bin/cabal install idris --constraint=parsers==0.11.0.1
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: idris-0.9.12 (user goal)
trying: trifecta-1.4.2 (dependency of idris-0.9.12)
trying: reducers-3.10.2.1 (dependency of trifecta-1.4.2)
trying: keys-3.10.1 (dependency of reducers-3.10.2.1)
trying: free-4.8 (dependency of keys-3.10.1)
next goal: template-haskell (dependency of free-4.8)
rejecting: template-haskell-2.7.0.0/installed-fea... (conflict:
ambrose@ambrose-VirtualBox:/usr/local/cabal/idris$ sudo ~/.cabal/bin/cabal install idris --constraint=parsers-0.11.0.1
cabal: expected a package name followed by a constraint, which is either a version range, 'installed', 'source' or flags
ambrose@ambrose-VirtualBox:/usr/local/cabal/idris$ cabal install idris --constraint=parsers==0.11.0.1
Resolving dependencies...
Downloading libffi-0.1...
Configuring libffi-0.1...
Building libffi-0.1...
Preprocessing library libffi-0.1...
[1 of 5] Compiling Foreign.LibFFI.Internal ( dist/dist-sandbox-5d2b205f/build/Foreign/LibFFI/Internal.hs, dist/dist-sandbox-5d2b205f/build/Foreign/LibFFI/Internal.o )
[2 of 5] Compiling Foreign.LibFFI.FFITypes ( Foreign/LibFFI/FFITypes.hs, dist/dist-sandbox-5d2b205f/build/Foreign/LibFFI/FFITypes.o )
[3 of 5] Compiling Foreign.LibFFI.Base ( Foreign/LibFFI/Base.hs, dist/dist-sandbox-5d2b205f/build/Foreign/LibFFI/Base.o )
[4 of 5] Compiling Foreign.LibFFI.Types ( Foreign/LibFFI/Types.hs, dist/dist-sandbox-5d2b205f/build/Foreign/LibFFI/Types.o )
ambrosebs
what is the "Specifically" part of this error saying? https://gist.github.com/frenchy64/5f9780e15acf8b564bcc
ambrosebs
where is List a and a being unified?
ziman
> the (List Nat = (Bool -> Float)) refl
idris-bot
(input):1:5:When elaborating argument x to function Prelude.Basics.the:
idris-bot
Can't unify
(deftest
(is-tc-e
(do
(defalias Statement (HVec [Str Any *]))
(fn [stmt :- Statement] :- Any
(when (string? (first stmt))
(ann-form stmt Statement))))))
"Error evaluating:" (set! cljs.core.PersistentQueue.EMPTY (PersistentQueue. nil 0 nil [] 0)) :as "cljs.core.PersistentQueue.EMPTY = (new cljs.core.PersistentQueue(null,0,null,cljs.core.with_meta(cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,\"file\",\"file\",1017047278),\"cljs/core.cljs\"], null)),0));\n"
org.mozilla.javascript.EcmaError: TypeError: org.mozilla.javascript.Undefined@d11151a is not a function, it is undefined. (cljs/core.cljs#3979)
at cljs/core.cljs:3979