This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ann "milletDiagnosticsIgnore all" in | |
| ./mltonlib/com/ssh/extended-basis/unstable/basis.mlb | |
| ./mltonlib/com/ssh/generic/unstable/lib.mlb | |
| ./mltonlib/com/ssh/generic/unstable/with/generic.sml | |
| ./mltonlib/com/ssh/generic/unstable/with/eq.sml | |
| ./mltonlib/com/ssh/generic/unstable/with/type-hash.sml | |
| ./mltonlib/com/ssh/generic/unstable/with/type-info.sml | |
| ./mltonlib/com/ssh/generic/unstable/with/hash.sml | |
| ./mltonlib/com/ssh/generic/unstable/with/uniplate.sml | |
| ./mltonlib/com/ssh/generic/unstable/with/ord.sml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| structure Fold = | |
| struct | |
| fun fold (a, f) g = g (a, f) | |
| fun post (w, g) s = | |
| w (fn (a, h) => s (a, g o h)) | |
| fun step0 h (a, f) = | |
| fold (h a, f) | |
| fun step1 h (a, f) b = | |
| fold (h (b, a), f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(SML_LIB)/basis/basis.mlb | |
| $(SML_LIB)/basis/mlton.mlb | |
| $(SML_LIB)/smlnj-lib/INet/inet-lib.mlb | |
| $(SML_LIB)/cml/cml.mlb | |
| server.sml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE OverloadedStrings #-} | |
| import Colog | |
| import Control.Monad.IO.Class (MonadIO) | |
| import Data.Text (Text) | |
| foo :: (WithLog env Message m, MonadIO m) => m () | |
| foo = do | |
| logWarning "Hello" | |
| logWarning "World" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE ImplicitParams #-} | |
| {-# LANGUAGE LambdaCase #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| module SoundEager where | |
| import Control.Monad (unless) | |
| import Control.Monad.Primitive (PrimMonad, PrimState) | |
| import Control.Monad.ST (runST) | |
| import Data.Char (chr, ord) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// An example of cyclical mutable references in Rust using GhostCell. | |
| /// Struct A contains mutable references to B and C and B has a | |
| /// mutable reference to C and C has a mutable reference to B. | |
| /// | |
| /// Unfortunately, doing it this way means forgoing dot syntax for B and C, since | |
| /// only Rc, Arc, and Pin can be used for self, not &'arena GhostCell<'id, Self>. | |
| use bumpalo::Bump; | |
| use ghost_cell::{GhostCell, GhostToken}; | |
| struct A<'arena, 'id> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE ExistentialQuantification #-} | |
| import Control.Concurrent.STM (STM, TBQueue, atomically, isEmptyTBQueue, isFullTBQueue, newTBQueueIO, readTBQueue, retry, writeTBQueue) | |
| import Control.Monad (filterM, replicateM_) | |
| import System.Random (StdGen, newStdGen, uniformR) | |
| data Handler a | |
| = forall b. Recv (TBQueue b) (b -> IO a) | |
| | forall b. Send (TBQueue b) b (IO a) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " | |
| I rename all classes in my package to have a prefix of ""DM"". | |
| " | |
| Class { | |
| #name : #PrefixRenamer, | |
| #superclass : #Object, | |
| #category : #Lambcalc | |
| } | |
| { #category : #'menu - change set' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (eval-when (:compile-toplevel :load-toplevel :execute) | |
| (ql:quickload :cl-async) | |
| (ql:quickload :iterate) | |
| (ql:quickload :bordeaux-threads) | |
| (ql:quickload :cl-speedy-queue) | |
| (ql:quickload :access) | |
| (use-package :iterate)) | |
| (access:enable-dot-syntax) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module ConduitTest where | |
| import Data.Conduit.Internal (sourceToPipe, unconsM) | |
| import Data.Foldable (for_) | |
| import Control.Monad (forever, void) | |
| import Control.Monad.Trans.Maybe (MaybeT (MaybeT, runMaybeT)) | |
| import Conduit | |
| lotsOfInts :: Monad m => ConduitT () Int m () | |
| lotsOfInts = for_ [0..5] $ \i -> yield i |