Code Monkey home page Code Monkey logo

mir-core's People

Contributors

9il avatar bioinfornatics avatar danielzuncke avatar drug007 avatar fabienmica avatar geod24 avatar hatf0 avatar jmh530 avatar john-colvin avatar kinke avatar maxhaton avatar moonlightsentinel avatar n8sh avatar nordlow avatar panke avatar razvann7 avatar ssvb avatar thaven avatar thewilsonator avatar webfreak001 avatar ximion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mir-core's Issues

Incompatible with all recent versions of GDC

 ../../../.dub/packages/mir-core-1.1.76/mir-core/source/mir/functional.d:48:15: error: module lifetime is in file 'core/lifetime.d' which cannot be read
   48 | public import core.lifetime : forward;

This is because GDC 10/11 is stuck on a version freeze to v2.076 (according to ibuclaw), whereas this move was introduced in v2.085 (where std.functional.forward was moved to core.lifetime).

[Feature request] install include D file into /usr/include/d/mir-core

Dear,

At least from the meson process, D include file are installed into /usr/include/d/mir-core/mir.
This can be a bit annoying as by default, compilers look into /usr/include/d and do not find mir module.

Can we move to /usr/include/d/mir/core/ ?
the module have to be rename source/mir/core and to use a namespace as mir.core
and the to remove into the meson build le statement + meson.project_name() at line 91

Thanks

`LightScopeOf` Doesn't See Through Layers of Templates

I have a referenced-counted stairs object that I want to pass to another function. It requires calling lightScope on it to strip the RC context. I think the way to do that is to make sure that LightScopeOf works for it, but it looks like when the iterator is a StairsIterator, then LightScopeOf just returns the same type. Ideally it should just be a simple fix to adjust how LightScopeOf works to get working.

unittest {
    import mir.ndslice.iterator: StairsIterator;
    import mir.qualifier: LightScopeOf;
    import mir.rc: RCI;

    static assert(is(LightScopeOf!(StairsIterator!(RCI!double, "+")) == StairsIterator!(RCI!double, "+"))); //passes but shouldn't (ideally)
    static assert(is(LightScopeOf!(StairsIterator!(RCI!double, "+")) == StairsIterator!(double, "+"))); //fails, but should pass (ideally)
}

Documentation for fastmath/optmath out of date

It looks like the documentation for fastmath and optmath make reference to 'unsafe-fp-math', but that is not part of the code.

The documentation for fastmath says

Functions attribute, an alias for `ldc.attributes.fastmath = AliasSeq!(llvmAttr("unsafe-fp-math", "true"), llvmFastMathFlag("fast"))` .

but the code is actually

alias fastmath = ldc.attributes.fastmath;

The documentation for optmath says

Functions attribute, an alias for `AliasSeq!(llvmAttr("unsafe-fp-math", "false"), llvmFastMathFlag("fast"))`

but the code is actually

alias optmath = AliasSeq!(ldc.attributes.llvmFastMathFlag("fast"));

Detecting mir.math.common built-in use

Is there any way to detect if the built-ins for mir.math.common are being used?

I noticed this when trying to check if exp and log10 are functions and only one of them was on DMD and neither were on LDC. The versions in phobos both pass these. See below.

/+dub.sdl:
dependency "mir-core" version="*"
+/

void main()
{
    import std.stdio: writeln;
    import std.traits: isFunction;
    import mir.math.common: exp, log10;

    writeln(isFunction!(exp)); //prints true on dmd, false on ldc
    writeln(isFunction!(log10)); //prints false on dmd, false on ldc
}

README says "no runtime dependency" but many core modules are imported

In the current master branch the following core modules are imported:

source/mir/bitmanip.d:595:    import core.exception : AssertError;
source/mir/bitop.d:320:    import core.bitop: popcnt;
source/mir/bitop.d:343:    import core.bitop: bsr;
source/mir/bitop.d:394:    import core.bitop: bsf;
source/mir/checkedint.d:34:    public import core.checkedint : adds, addu, subs, subu, muls, mulu, negs;
source/mir/conv.d:9:public import core.lifetime: emplace;
source/mir/conv.d:116:            import core.stdc.string : memset;
source/mir/conv.d:132:            import core.stdc.string : memset;
source/mir/conv.d:138:            import core.stdc.string : memset;
source/mir/conv.d:215:        import core.internal.lifetime: emplaceRef;
source/mir/conv.d:223:    import core.lifetime: forward;
source/mir/functional.d:52:public import core.lifetime : forward;
source/mir/internal/memory.d:80:            import core.stdc.string : memcpy;
source/mir/internal/memory.d:131:    import core.stdc.errno : ENOMEM, EINVAL;
source/mir/math/common.d:296:    static import core.stdc.math;
source/mir/math/common.d:438:    static import core.stdc.math;
source/mir/math/ieee.d:640:        import core.checkedint: addu;
source/mir/math/ieee.d:944:        import core.math: ldexp;
source/mir/math/ieee.d:954:                import core.math: ldexp;

While obviously these are fairly low-level dependencies (it's not relying on the full runtime), this usage does appear to contradict the README. It might be a good idea to explain this more clearly. Assuming that policy has changed, it might also be a good idea to make clear to developers which core modules are acceptable and which not.

Can't use std.algorithm.zip with Algebraic

Tested with version 1.3.14:

import mir.algebraic : Algebraic;

void main() {
    import std.range : zip;
    Type[] types;
    int[] ints;
    zip(types, ints);
}

alias Type = Algebraic!Type_;

private union Type_ {
    Overloads overloads;
}

struct Overloads {
    Type[] overloads;
}

Fails to compile with:

/usr/include/dlang/dmd/core/internal/hash.d(541,8): Error: expression `canBitwiseHash!(Algebraic!(Type_))` of type `void` does not have a boolean value
/usr/include/dlang/dmd/core/internal/hash.d-mixin-551(662,42): Error: template instance `core.internal.hash.hashOf!(const(Algebraic!(Type_))[])` error instantiating
~/.dub/packages/mir-core-1.3.14/mir-core/source/mir/algebraic.d(1323,42):        instantiated from here: `hashOf!(const(Overloads))`
source/app.d(11,14):        instantiated from here: `Algebraic!(Type_)`
/usr/include/dlang/dmd/std/range/package.d(4937,25): Error: template instance `std.typecons.Tuple!(Algebraic!(Type_), int)` error instantiating
/usr/include/dlang/dmd/std/range/package.d-mixin-4776(4776,1):        instantiated from here: `ZipShortest!(Flag.yes, Algebraic!(Type_)[], int[])`
source/app.d(8,8):        instantiated from here: `zip!(Algebraic!(Type_)[], int[])`
/usr/bin/dmd failed with exit code 1.

Feature request: Variant.trustedGet multiple values

I have a scenario like this:

There are 2 FMU classes version 1 and two FMU classes version 2.
Version 1 supports a method initialize, while this method is not available in version 2.

I want to call trustedGet like this fmu.trustedGet!(FMU1Slave, FMU1Model).initialize();.
At the specific code line, I know fmu is either FMU1Slave or FMU1Model. Both classes
supports method initialize. It should call method initialize independent whether it is now FMU1Slave or FMU1Model.

/+ dub.sdl:
	name "app"
	dependency "mir-core" version="1.1.51"
+/

import mir.algebraic;

class FMU1Slave
{
	void instantiate() {}
	void initialize() {}
}

class FMU1Model
{
	void instantiate() {}
	void initialize() {}
}

class FMU2Slave
{
	void instantiate() {}
	void enterInitializationMode() {}
	void exitInitializationMode() {}
}

class FMU2Model
{
	void instantiate() {}
	void enterInitializationMode() {}
	void exitInitializationMode() {}
}

void main()
{

	Variant!(FMU1Slave, FMU1Model, FMU2Slave, FMU2Model) fmu;
	string fmiVersion;
	bool isCoSimulation;

    if (fmiVersion == "1.0")
    {
        if (isCoSimulation)
            fmu = new FMU1Slave();
        else
            fmu = new FMU1Model();
        fmu.instantiate();
        fmu.trustedGet!(FMU1Slave, FMU1Model).initialize();
    }
    else
    {
        if (isCoSimulation)
            fmu = new FMU2Slave();
        else
            fmu = new FMU2Model();
        fmu.instantiate();
        fmu.enterInitializationMode();
        fmu.exitInitializationMode();
    }
}

Preference of conversion to `bool` over `long` for `int` literals

Because of Walter Bright's strong preference for implicit conversion to bool (over integer) the following currently holds:

import mir.algebraic : Variant;
assert(Variant!(bool, double)(3.14).toString == "3.14");
assert(Variant!(bool, int)(1).toString == "1");
assert(Variant!(bool, long)(1L).toString == "1");
assert(Variant!(bool, long)(1).toString == "true"); // unsound?
assert(Variant!(long, bool)(1).toString == "true"); // unsound?

I believe the last two asserts instead should pass as

assert(Variant!(bool, long)(1).toString == "1");
assert(Variant!(long, bool)(1).toString == "1");

Bugs with visit

Hello, I think I found two bugs

/+ dub.sdl:
    name "app"
    dependency "mir-core" version="1.1.57"
+/

import std.stdio;
import mir.algebraic;

struct AAKey { }
struct AAValue { }
struct ArrayLength { }

alias Ident = TaggedVariant!(
    ["none",     "name",  "index", "aaKey", "aaValue", "length"],
    typeof(null), string,  ulong,   AAKey,   AAValue,  ArrayLength
);

version = one;

void print(Ident id)
{
    version (one)
    {
        id.visit!(
            (typeof(null)) { },
            (string name) { writeln(name); },
            (ulong index) { writefln!"[%d]"(index); },
            (AAKey) { writeln("key"); },
            (AAValue) { writeln("val"); },
            (ArrayLength) { writeln("len"); } // [1]
        );
    }
    else
    {
        id.visit!(
            (typeof(null)) { },
            (string name) { writeln(name); },
            (ulong index) { writefln!"[%d]"(index); },
            (ArrayLength) { writeln("len"); }
        );
    }
}

void main()
{
    auto ids = [
        Ident("okda"),
        Ident(ArrayLength.init),
        Ident(AAKey.init),
        Ident(AAValue.init),
    ];

    foreach (id; ids) print(id);
}

with version = one; compilation errored:

path/to/mir/algebraic.d(2714,33): Error: static assert:  "Algebraic!(TaggedType!(typeof(null), "none"), TaggedType!(ArrayLength, "length"), TaggedType!(AAKey, "aaKey"), TaggedType!(AAValue, "aaValue"), TaggedType!(ulong, "index"), TaggedType!(string, "name")): the visitor cann't be caled with arguments (ArrayLength)"
miralgebr3.d(24,11):        instantiated from here: visitImpl!(Algebraic!(TaggedType!(typeof(null), "none"), TaggedType!(ArrayLength, "length"), TaggedType!(AAKey, "aaKey"), TaggedType!(AAValue, "aaValue"), TaggedType!(ulong, "index"), TaggedType!(string, "name")))

but visitor for ArrayLength exists ([1])

witout version = one; compilation successed and program put output:

okda
len
len
len

but no visitors for AAKey and AAValue (those ids prints as an ArrayLength)

incompatible with Debian 11's stable LDC binaries

Debian 11 ships with LDC 1.24.0 (FE 2.094.1), mir-core breaks because the noreturn type didn't exist back then. It's also not possible to manually alias to typeof(*null) with that version yet.

Currently mir-core uses noreturn in a bunch of places, so not sure if it's worth supporting it.

I would definitely like to have it be supported, it being a "relatively recent" DMD FE and mir-core being used in many projects, also older ones like asdf.

mir.conv: to does not support enum

The UT below fails because mir.conv's to function does not support enums. The line in mir.conv that causes the error is return cast(T) args[0];, which is .

By contrast, this would pass with std.conv's to function, but you have to remove nothrow @nogc.

@safe pure nothrow @nogc
unittest
{
    enum Foo
    {
        A,
        B,
        C
    }

    import mir.conv: to;

    Foo foo = Foo.A;
    auto x = to!Foo("A");
    assert(x == foo);
}

Deprecations in current version

../../.dub/packages/mir-core-1.5.3/mir-core/source/mir/internal/meta.d(18,57): Deprecation: `__traits(getAttributes)` may only be used for individual functions, not overload sets such as: `get`
../../.dub/packages/mir-core-1.5.3/mir-core/source/mir/internal/meta.d(18,57):        the result of `__traits(getOverloads)` may be used to select the desired function to extract attributes from
../../.dub/packages/mir-core-1.5.3/mir-core/source/mir/internal/meta.d(18,57): Deprecation: `__traits(getAttributes)` may only be used for individual functions, not overload sets such as: `_is`
../../.dub/packages/mir-core-1.5.3/mir-core/source/mir/internal/meta.d(18,57):        the result of `__traits(getOverloads)` may be used to select the desired function to extract attributes from

argument void has no protection

import mir.algebraic;
struct Test {
  alias Value = void;
}

alias B = Nullable!Test;
./mir-core-1.1.59/mir-core/source/mir/reflection.d(741,27): Error: argument void has no protection
./dlang/dmd-2.094.2/linux/bin64/../../src/phobos/std/meta.d(1381,45): Error: template instance mir.reflection.Template!(Test2, "Value") error instantiating
./dlang/dmd-2.094.2/linux/bin64/../../src/druntime/import/core/internal/traits.d(199,21):        instantiated from here: F!(Test2)
./dmd-2.094.2/linux/bin64/../../src/phobos/std/meta.d(858,24):        instantiated from here: allSat!(ApplyRight, Test2)
./mir-core-1.1.59/mir-core/source/mir/algebraic.d(1485,20):        instantiated from here: allSatisfy!(ApplyRight, Test2)
./mir-core-1.1.59/mir-core/source/mir/algebraic.d(382,23):        ... (1 instantiations, -v to show) ...
./mir-core-1.1.59/mir-core/source/mir/algebraic.d(595,24):        instantiated from here: Variant!(typeof(null), Test2)

Cannot pass null to Nullable argument

It is not possible to pass null to a Nullable argument. By chance I found the soluationNullable!ulong(null). It would be great if it would be possible to just pass null as the solution is not obvious to new users

/+ dub.sdl:
	name "app"
	dependency "mir-core" version="1.1.51"
+/

import mir.algebraic;

class Dimension
{
	this(Nullable!ulong start){}
}

void main() {
	new Dimension(null); // Does not work 
	new Dimension(Nullable!ulong(null)); // Solution
}

`mir.math.common.round` impure on windows

As strange as it sounds, only on Windows, mir.math.common.round is impure. On Linux and macOS however, it's pure.

Below is a minimal working example:

pure unittest {
    import mir.math.common;
    cast(void) 2.0f.round; // discard result so that the function is pure
}

void main(){}

Running dub test -q gives the following trace on windows.

source\app.d(3,13): Error: `pure` function `app.round` cannot call impure function `mir.math.common.round!float.round`
C:\D\dmd2\windows\bin64\dmd.exe failed with exit code 1.

Still on Windows, If we replace round with ceil, we get 1 modules passed unittests.
Whereas the original code on Linux dub test -q gives us 1 modules passed unittests.

This is undocumented behaviour.

Question about mir.algebraic.visit

Hello! I have this code:

/+ dub.sdl:
    name "app"
    dependency "mir-core" version="1.1.54"
+/

version = short_visit;

import mir.algebraic;
import std.stdio;

enum Bool : bool { false_ = false, true_ = true }

alias Value = TaggedVariant!(
    ["str", "raw", "bit", "i8",  "u8",  "i16", "u16", "i32", "u32", "i64", "u64", "f32", "f64"],
    string, const(void)[], Bool, byte, ubyte, short, ushort, int, uint, long, ulong, float, double,
);

void foo(in Value val)
{
    version (visit)
    {
        val.visit!(
            (string v) { writeln("str: ", v); },
            (const(void)[] v) { writeln("raw: ", v); },
            (Bool v) { writeln("bit: ", cast(bool)v ? "true" : "false"); },
            (float v) { writefln("f32: %.8f", v); },
            (double v) { writefln("f64: %.15f", v); },
            (v) { writeln("int: ", v); }, // int's
        );
    }
    else version(full_visit)
    {
        val.visit!(
            (string v) { writeln("str: ", v); },
            (const(void)[] v) { writeln("raw: ", v); },
            (Bool v) { writeln("bit: ", cast(bool)v ? "true" : "false"); },
            (float v) { writefln("f32: %.8f", v); },
            (double v) { writefln("f64: %.15f", v); },
            (byte v) { writeln("int: ", v); },
            (ubyte v) { writeln("int: ", v); },
            (short v) { writeln("int: ", v); },
            (ushort v) { writeln("int: ", v); },
            (int v) { writeln("int: ", v); },
            (uint v) { writeln("int: ", v); },
            (long v) { writeln("int: ", v); },
            (ulong v) { writeln("int: ", v); },
        );
    }
    else version (short_visit)
    {
        val.visit!(v => writefln("%s: %s", val.kind, v));
    }
    else
    {
        template TypeByKind(T, alias kind) if (isTaggedVariant!T && is(typeof(kind) == T.Kind))
        {
            import std : staticIndexOf, EnumMembers;
            alias TypeByKind = T.AllowedTypes[staticIndexOf!(kind, EnumMembers!(T.Kind))];
        }

        FS: final switch (val.kind) with (Value.Kind)
        {
            case str: writeln("str: ", val.get!string); break;
            case raw: writeln("raw: ", val.get!(const(void)[])); break;
            case bit: writeln("bit: ", cast(bool)(val.get!Bool) ? "true" : "false"); break;
            case f32: writefln("f32: %.8f", val.get!float); break;
            case f64: writefln("f64: %.15f", val.get!double); break;

            static foreach (i, k; [i8, u8, i16, u16, i32, u32, i64, u64])
            {
            case k: writeln("int: ", val.get!(TypeByKind!(Value,k))); break FS;
            }
        }
    }
}

void main() { foo(Value(10)); }

With version = short_visit; or version = full_visit; all works.
With version = visit; it get compile time error:

path/to/mir/algebraic.d(2515,33): Error: static assert:  "const(Algebraic!(...types...)): the visitor cann't be caled with arguments (byte)"

but it have last "default" function without type specification for argument what can be instanced for all int types.

This is a bug or it by design?

Original code is more complex and I found useful variant with switch by now (the desire to have get by kind from here).

MirException multi arg

MirException message only print "A" and not "AB"

import mir.exception;

auto test()
{
     throw new MirException("A", "B");
}

try test();
catch(MirException e) { writeln(e.msg); }

Should `shape` handle multidimensional arrays?

I was surprised that the following UT passes with mir.primitives. Is this the intended behavior or should it also handle multidimensional dynamic arrays?

The current implementation implies that the elementCount of a multidimensional array is equal to its length.

version(mir_test)
@safe pure nothrow
unittest
{
    static assert([[1, 2, 3], [4, 5 ,6]].shape == [2]);
}

linker error in algebraic.d / mir.format

just encountered this, going to look into what I can do against this right now.

raw linker output:

ld: error: undefined symbol: _D3mir6format__T5printTaTSQy8appender__T12ScopedBufferTaVmi4096ZQyTSQCo9algebraic__T9AlgebraicTSQDq15algebraic_alias4json5Json_ZQBsZQEmFNbMKQElMAxSQFpQDb__TQCuTQCnZQDcZv
>>> referenced by algebraic.d:1600 (../../.dub/packages/mir-core-1.3.6/mir-core/source/mir/algebraic.d:1600)
>>>               .dub/build/executable-debug-linux.posix-x86_64-dmd_v2.100.0-B49EBC01F803B8795B0F6CFF5E924D92/serve-d.o:(_D3mir9algebraic__T9AlgebraicTSQBd15algebraic_alias4json5Json_ZQBs__T12toStringImplTASQDgQDf__TQCyTQCrZQDgTSQEc8appender__T12ScopedBufferTaVmi4096ZQyZQDdMxFNaNbNiNlNfMKQCjZ12__dgliteral2MFZv)
>>> did you mean: _D3mir6format__T5printTaTSQy8appender__T12ScopedBufferTaVmi4096ZQyTSQCo9algebraic__T9AlgebraicTSQDq15algebraic_alias4json5Json_ZQBsZQEmFNbMKQElMKxSQFpQDb__TQCuTQCnZQDcZv
>>> defined in: .dub/build/executable-debug-linux.posix-x86_64-dmd_v2.100.0-B49EBC01F803B8795B0F6CFF5E924D92/serve-d.o

ddemangle:

ld: error: undefined symbol: nothrow void mir.format.print!(char, mir.appender.ScopedBuffer!(char, 4096uL).ScopedBuffer, mir.algebraic.Algebraic!(mir.algebraic_alias.json.Json_).Algebraic).print(scope ref mir.appender.ScopedBuffer!(char, 4096uL).ScopedBuffer, scope const(mir.algebraic.Algebraic!(mir.algebraic_alias.json.Json_).Algebraic)[])
>>> referenced by algebraic.d:1600 (../../.dub/packages/mir-core-1.3.6/mir-core/source/mir/algebraic.d:1600)
>>>               .dub/build/executable-debug-linux.posix-x86_64-dmd_v2.100.0-B49EBC01F803B8795B0F6CFF5E924D92/serve-d.o:(void mir.algebraic.Algebraic!(mir.algebraic_alias.json.Json_).Algebraic.toStringImpl!(mir.algebraic.Algebraic!(mir.algebraic_alias.json.Json_).Algebraic[], mir.appender.ScopedBuffer!(char, 4096uL).ScopedBuffer).toStringImpl(scope ref mir.appender.ScopedBuffer!(char, 4096uL).ScopedBuffer).__dgliteral2())
>>> did you mean: nothrow void mir.format.print!(char, mir.appender.ScopedBuffer!(char, 4096uL).ScopedBuffer, mir.algebraic.Algebraic!(mir.algebraic_alias.json.Json_).Algebraic).print(scope ref mir.appender.ScopedBuffer!(char, 4096uL).ScopedBuffer, scope ref const(mir.algebraic.Algebraic!(mir.algebraic_alias.json.Json_).Algebraic))
>>> defined in: .dub/build/executable-debug-linux.posix-x86_64-dmd_v2.100.0-B49EBC01F803B8795B0F6CFF5E924D92/serve-d.o
collect2: error: ld returned 1 exit status

project + commit: https://github.com/Pure-D/serve-d/tree/a757a32e301fd6fa7be5bdbf8b727066cab5b9e0

Improve error messages for mir.math.common functions

The error messages for mir.math.common functions are not good when passing in integer values. This is because mir.internal.utliity.isFloatingPoint is true for integer types. So the integer type is passed to it, but then there is an error that it does not match a phobos function.

Another option is to take the current isFloatingPoint and making them new functions, as in isConvertibleToFloatingPoint and then having the existing isFloatingPoint implemented more as in the phobos implementation.

/+dub.sdl:
dependency "mir-core" version="*"
+/
import std.stdio;
import mir.internal.utility: isFloatingPoint;
import mir.math.common: sqrt;

void main() {
    int x = 9;
    static assert(isFloatingPoint!(typeof(x))); //passes without issue
    auto y = sqrt(x);
}

The error message I get on run.dlang.org is

onlineapp.d(13,18): Error: `mir.math.common.sqrt` called with argument types `(int)` matches both:
/dlang/dmd/linux/bin64/../../src/phobos/std/math.d(2106,7):     `std.math.sqrt(float x)`
and:
/dlang/dmd/linux/bin64/../../src/phobos/std/math.d(2112,6):     `std.math.sqrt(real x)`
dmd failed with exit code 1.

staticArray and string

staticArray does not compile when string with:

mir-core\source\mir\functional.d(57,12): Error: returning a escapes a reference to variadic parameter a

The code below compiles, removing the comment doesn't.

import mir.functional: staticArray;
import mir.ndslice;

auto resuF = mir.ndslice.cartesian([0,1,2], [0,1], [4,5,6]).flattened.map!staticArray;
writeln(resuF);
 
auto resuS = mir.ndslice.cartesian(["A", "B"], ["c","b"]).flattened;//.map!staticArray;
writeln(resuS);

Replacing current staticArray (in mir.functional) with code below works:

T[N] staticArray(T, size_t N)(T[N] a...)
   if (!is(T == string)) {
    return a;
}

T[N] staticArray(T, size_t N)(T[N] a...)
    if (is(T == string)) {        
        T[N] ret;
        static foreach(i; 0..a.length) ret[i] = a[i];
        return ret;
    } 

provide `assertMatch`

In D it is not possible to write:

value.match!((A a) => a, (_) =>assert(false))

instead of using trymatch or a nullable I think it would be useful to have an assertMatch that raises an exception when the type can't be handled. Possibly you can come up with a better name than assertMatch.

Changes are required for the Meson build file

Dependency mir-core from subproject subprojects/mir-core found: YES
subprojects/mir-core/meson.build:40: DEPRECATION: Library mir-core was passed to the "libraries" keyword argument of a previous call to generate() method instead of first positional argument. Adding mir-core to "Requires" field, but this is a deprecated behaviour that will change in a future version of Meson. Please report the issue if this warning cannot be avoided in your case.

log file

Maybe in other Mir libraries too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.