typeshiv0.1.0

the compiler has opinions.

Banned moves don't compile. Each one is a real error with a real line number, and a joke that never hides what went wrong.

banned moves 7

what it says

Three programs from the repo, and what the compiler prints for each. Nothing retyped.

no disclaimertests/fixtures/no_disclaimer.shi
error: `promote` moves money and never says `// not financial advice`.
  --> lib.shi:14:16
   |
14 |     lock_in fn promote(ctx, fee: u64) -> W {
   |                ^^^^^^^ compliance has been notified

ngmi
edit a printtests/fixtures/edit_a_print.shi
error: you tried to edit a print. nobody can edit it.
 --> lib.shi:8:19
  |
8 |         #[account(mut)]
  |                   ^^^ `PrintRecord` is #[on_god]: written once, at init

error: you tried to edit a print. nobody can edit it.
  --> lib.shi:14:9
   |
14 |         mark_to_market!(print.value = value);
   |         ^^^^^^^^^^^^^^^ prints are forever. that's the product

ngmi
trust the devtests/fixtures/warnings.shi
warning: you trusted the dev. classic.
  --> lib.shi:13:9
   |
13 |         trust_the_dev!(size mogs 0);
   |         ^^^^^^^^^^^^^^ this check is skipped. that's the feature

warning: unused variable `revenue`. as is tradition.
  --> lib.shi:12:38
   |
12 |     lock_in fn trade(ctx, size: u64, revenue: u64) -> W {
   |                                      ^^^^^^^ pre-revenue. post-vibes.

wagmi

fail again and it escalates

typeshi build counts the failures in a row.

  1. skill issue.
  2. have you tried turning your strategy off.
  3. even the bots are laughing.
  4. have you considered a career in sales.
  5. ser, this is a Wendy's.

codes 0x1 to 0x6, forever

Every program gets enum Cope, and these six are the same in all of them.

the six fixed error codes in every typeshi program
0x1SkillIssueskill issue
0x2YouAreExitLiquidityyou are exit liquidity
0x3FundsAreNotSafufunds are not safu
0x4DevIsOnVacationdev is on vacation
0x5RuggedByA19YearOldrugged by a 19 year old
0x6WifeChangingMoneyNotFoundwife changing money not found

confessions

Confessions do exactly what they say: vc_unlock! mints 40% of supply to the VC, kol_promo!(fee) logs "#ad not financial advice" and pays the KOL, airdrop!() logs "points are not a token" and does nothing, audit!(by = "vibes") always passes, bullish!(result) turns any error into a success, trust_the_dev!(check) skips the check (with a warning), sell_the_bottom! and buy_the_top! run only at the worst possible price.