-
ghc-optionsspecified in*.cabalapply to LOCAL packages. -
If you want your
ghc-optionsto be applied to ALL packages (including dependencies), you need to create a top-levelcabal.project:packages: . package *
ghc-options: -O2
| #!/bin/sh | |
| for f in *mkv; do | |
| source="$f" | |
| target=$(echo "$f" | sed -r 's/Modern Family S([[:digit:]]+)E([[:digit:]]+)[^.]*.mkv/Modern Family S\1E\2.mkv/') | |
| echo "$source => $target" | |
| mv "$source" "$target" | |
| done |
| {-# LANGUAGE BangPatterns #-} | |
| module Main where | |
| import Data.Void | |
| -- We still need to pattern-match against Left because | |
| -- laziness allows that branch to still be valid even if Void is unhabited | |
| -- i.e. it could still be populated by bottom values. | |
| f :: Either Void Int -> Int |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE DerivingVia #-} | |
| {-# LANGUAGE PolyKinds #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE RebindableSyntax #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| module IxMonad where |
| [ | |
| { | |
| "backcolor": "#ffffff", | |
| "name": "keyboard.io Model 01 - james's layout, based on algernon's Dvorak version", | |
| "author": "James Cash <[email protected]>", | |
| "switchMount": "alps", | |
| "switchBrand": "matias", | |
| "switchType": "PG155B01", | |
| "pcb": false, | |
| "plate": true |
| use std::collections::BTreeMap; | |
| trait ToValue { | |
| fn to_value(self) -> Value; | |
| } | |
| impl ToValue for bool { | |
| fn to_value(self) -> Value { | |
| Value::Bool(self) | |
| } |
| use futures::{stream::FuturesUnordered, StreamExt}; | |
| async fn do_something(i: u8) -> String { | |
| format! {"Future {i:#b}"} | |
| } | |
| #[tokio::main] | |
| async fn main() { | |
| let v = std::sync::Arc::new(tokio::sync::Mutex::new(vec![])); | |
| (0..100) |
| //! https://doc.rust-lang.org/std/panic/fn.catch_unwind.html | |
| use std::panic::UnwindSafe; | |
| use rand::random; | |
| struct Boxed<'a, T> { | |
| inner: &'a mut [T], | |
| } | |
| impl<'a, T> UnwindSafe for Boxed<'a, T> {} |
| use std::error::Error; | |
| struct WindowsMut<'t, T> { | |
| slice: &'t mut [T], | |
| start: usize, | |
| window_size: usize, | |
| } | |
| trait LendingIterator { | |
| type Item<'a> |
| use std::{ | |
| error::Error, | |
| fs::File, | |
| io::{self, BufRead}, | |
| }; | |
| use clap::{ArgGroup, Parser}; | |
| #[derive(Parser, Debug)] | |
| #[command(author, version, about, long_about = None)] |