Error: [4014]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:141:7 ]
     │
 141 │       Failure::Failure(msg) => raise DecodeError::InvalidHeader(msg)
     │       ──────────┬──────────  
     │                 ╰──────────── Constr Type Mismatch(constructor Failure)
        has type : Failure
        wanted   : DecodeError
─────╯
Error: [4014]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:154:3 ]
     │
 154 │ ╭─▶   let result : Image = match format {
     ┆ ┆   
 161 │ ├─▶   } catch {
     │ │                 
     │ ╰───────────────── Expr Type Mismatch
        has type : Unit
        wanted   : Image
─────╯
Warning: [0002]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:154:7 ]
     │
 154 │   let result : Image = match format {
     │       ───┬──  
     │          ╰──── Warning (unused_value): Unused variable 'result'
─────╯
Error: [4118]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:155:25 ]
     │
 155 │     ImageFormat::BMP => decode_bmp(data)
     │                         ────────┬───────  
     │                                 ╰───────── The error type is mismatched:
    wanted: DecodeError
    has   : Failure.
─────╯
Error: [4118]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:156:25 ]
     │
 156 │     ImageFormat::QOI => decode_qoi(data)
     │                         ────────┬───────  
     │                                 ╰───────── The error type is mismatched:
    wanted: DecodeError
    has   : Failure.
─────╯
Error: [4118]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:157:25 ]
     │
 157 │     ImageFormat::TGA => decode_tga(data)
     │                         ────────┬───────  
     │                                 ╰───────── The error type is mismatched:
    wanted: DecodeError
    has   : Failure.
─────╯
Error: [4118]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:158:25 ]
     │
 158 │     ImageFormat::PNG => decode_png(data)
     │                         ────────┬───────  
     │                                 ╰───────── The error type is mismatched:
    wanted: DecodeError
    has   : Failure.
─────╯
Error: [4118]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:159:25 ]
     │
 159 │     ImageFormat::GIF => decode_gif(data)
     │                         ────────┬───────  
     │                                 ╰───────── The error type is mismatched:
    wanted: DecodeError
    has   : Failure.
─────╯
Error: [4118]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:160:26 ]
     │
 160 │     ImageFormat::JPEG => decode_jpeg(data)
     │                          ────────┬────────  
     │                                  ╰────────── The error type is mismatched:
    wanted: DecodeError
    has   : Failure.
─────╯
Error: [3002]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:161:5 ]
     │
 161 │   } catch {
     │     ──┬──  
     │       ╰──── Parse error, unexpected token `catch`, you may expect a statement or expression on a new line, or `}` to close the block.
─────╯
Error: [3002]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:164:3 ]
     │
 164 │   result
     │   ───┬──  
     │      ╰──── Parse error, unexpected token id (lowercase start), you may expect `pub`, `priv`, `type`, `suberror`, `extenum`, `typealias`, `async`, `fn`, `fnalias`, `struct`, `enum`, `let`, `const`, `extern`, `test`, `impl`, `trait`, `traitalias`, `enumview`, `#attribute`, `using` or `extend`.
─────╯
Error: [4118]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:179:29 ]
     │
 179 │         ImageFormat::BMP => bmp_dimensions(data)
     │                             ──────────┬─────────  
     │                                       ╰─────────── The error type is mismatched:
    wanted: DecodeError
    has   : Failure.
─────╯
Error: [4118]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:180:29 ]
     │
 180 │         ImageFormat::QOI => qoi_dimensions(data)
     │                             ──────────┬─────────  
     │                                       ╰─────────── The error type is mismatched:
    wanted: DecodeError
    has   : Failure.
─────╯
Error: [4118]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:181:29 ]
     │
 181 │         ImageFormat::TGA => tga_dimensions(data)
     │                             ──────────┬─────────  
     │                                       ╰─────────── The error type is mismatched:
    wanted: DecodeError
    has   : Failure.
─────╯
Error: [4118]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:182:29 ]
     │
 182 │         ImageFormat::PNG => png_dimensions(data)
     │                             ──────────┬─────────  
     │                                       ╰─────────── The error type is mismatched:
    wanted: DecodeError
    has   : Failure.
─────╯
Error: [4118]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:183:29 ]
     │
 183 │         ImageFormat::GIF => gif_dimensions(data)
     │                             ──────────┬─────────  
     │                                       ╰─────────── The error type is mismatched:
    wanted: DecodeError
    has   : Failure.
─────╯
Error: [4118]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:185:24 ]
     │
 185 │           let (w, h) = jpeg_dimensions(data)
     │                        ──────────┬──────────  
     │                                  ╰──────────── The error type is mismatched:
    wanted: DecodeError
    has   : Failure.
─────╯
Error: [3002]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:188:9 ]
     │
 188 │       } catch {
     │         ──┬──  
     │           ╰──── Parse error, unexpected token `catch`, you may expect `;` or `}`.
─────╯
Error: [3002]
     ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\lib.mbt:192:2 ]
     │
 192 │ }
     │  │ 
     │  ╰─ Parse error, unexpected token `}`, you may expect `pub`, `priv`, `type`, `suberror`, `extenum`, `typealias`, `async`, `fn`, `fnalias`, `struct`, `enum`, `let`, `const`, `extern`, `test`, `impl`, `trait`, `traitalias`, `enumview`, `#attribute`, `using` or `extend`.
─────╯
Warning: [0006]
    ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\types.mbt:84:3 ]
    │
 84 │   TruncatedData(String)
    │   ──────┬──────  
    │         ╰──────── Warning (unused_constructor): Variant 'TruncatedData' is never constructed
────╯
Warning: [0006]
    ╭─[ D:\src\MiniMax\Projects\MoonBit\moonbit-labeler\staging-moonbit-image\types.mbt:86:3 ]
    │
 86 │   InvalidValue(String)
    │   ──────┬─────  
    │         ╰─────── Warning (unused_constructor): Variant 'InvalidValue' is never constructed
────╯
Failed with 3 warnings, 18 errors.
Error: failed to run check for target Native

Caused by:
    failed when checking project
