Skip to content

Instantly share code, notes, and snippets.

View bvssvni's full-sized avatar

Sven Nilsen bvssvni

View GitHub Profile
Main.idr:3:18:When elaborating right hand side of numTuple:
When elaborating an application of constructor __MkPair:
Can't unify
Type
with
b
Specifically:
./Main.idr:2:27: error: not a
terminator, expected: "$", "$>",
"&&", "*", "+", "++", "-", "->",
".", "/", "/=", "::", ";", "<",
"<$", "<$>", "<*>", "<+>",
"<->", "<<", "<=", "<|>", "==",
">", ">=", ">>", ">>=", "`",
"||",
ambiguous use of a left-associative operator,
ambiguous use of a non-associative operator,
NumPair : Type -> Type -> Type
NumPair a b = (Num a, Num b)
numTriple : (NumPair a b, Num c) => a -> b -> c -> (a, b, c)
numTriple x y z = (x, y, z)
data BitVector : Type where
MkBitVector : (bits : Integer) -> (value : Integer) ->
so (pow 2 (fromIntegerNat bits) > value) -> BitVector
test : BitVector
test = MkBitVector 2 3 oh
-- How do I get information out?
-- Does it need more type information, like something after '-> BitVector'?
test: something.rs
# This is run even when 'something.rs' exists.
touch dummy.rs
something.rs:
touch something.rs
src/interpolation.rs:15:5: 15:20 error: binary operation `+` cannot be applied to type `&T`
src/interpolation.rs:15 a + (b - a) * t
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'No triple in crate', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libstd/option.rs:245
stack backtrace:
1: 0x104c1e844 - rt::backtrace::imp::write::h254d0a6dd1fae24biCa::v0.11.pre
2: 0x104b808de - rt::unwind::begin_unwind_inner::h6e474448729455a4oca::v0.11.pre
3: 0x101efdd58 - rt::unwind::begin_unwind::h11500859575803473188::v0.11.pre
4: 0x10264db87 - metadata::decoder::get_crate_triple::h55d8343241d15157rQb::v0.11.pre
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'index out of bounds: the len is 0 but the index is 0', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/lib.rs:1
stack backtrace:
1: 0x104892844 - rt::backtrace::imp::write::h254d0a6dd1fae24biCa::v0.11.pre
2: 0x1047f48de - rt::unwind::begin_unwind_inner::h6e474448729455a4oca::v0.11.pre
3: 0x1047f4068 - rt::unwind::begin_unwind::h7603572080577830236::v0.11.pre
4: 0x104892309 - rt::unwind::begin_unwind_raw::h0893674862f52c69x99::v0.11.pre
@bvssvni
bvssvni / error
Last active August 29, 2015 14:00
make rlib
clear \
&& rustc --target "x86_64-apple-darwin" -O --crate-type=rlib src/lib.rs -L "target/x86_64-apple-darwin/lib" --out-dir "target/x86_64-apple-darwin/lib/" \
&& clear \
&& echo "--- Built rlib" \
&& echo "--- Type 'make test' to test library"
task 'rustc' failed at 'index out of bounds: the len is 0 but the index is 0', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/lib.rs:1
stack backtrace:
1: 0x10cf55844 - rt::backtrace::imp::write::h254d0a6dd1fae24biCa::v0.11.pre
2: 0x10ceb78de - rt::unwind::begin_unwind_inner::h6e474448729455a4oca::v0.11.pre
@bvssvni
bvssvni / error
Created May 16, 2014 17:00
Rust-Snake unconstrained type error
src/snakeapp.rs:256:9: 256:31 error: cannot determine a type for this bounded type parameter: unconstrained type
src/snakeapp.rs:256 self.load(asset_store);
^~~~~~~~~~~~~~~~~~~~~~