This file contains 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 RecursiveDo #-} | |
import Control.Concurrent (ThreadId, throwTo, yield, forkIO) | |
import Control.Exception (Exception, catch) | |
import Control.Monad (forever) | |
wait :: IO () | |
wait = forever yield | |
data Ball = Ball deriving Show |
This file contains 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
Loaded dictionary with 82222 words | |
Looping over 484 sets of matches | |
Set number 1 | |
a | |
b | |
c | |
d | |
e | |
f | |
g |
This file contains 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
Loaded dictionary with 82222 words | |
Longest match has length: 7 | |
Looping over 1 sets of matches | |
Set number 1 | |
abjurer | |
nowhere |
This file contains 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
import Poly (Field, inverse, Poly, x, polyDivModW) | |
import Control.Monad.Trans.Writer (execWriter) | |
newtype F2 = F2 Int | |
deriving (Eq) | |
instance Show F2 where | |
show (F2 x) = show x | |
instance Num F2 where |
This file contains 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 RankNTypes #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
module ModArith | |
( WithMod | |
, IntMod | |
, doMod | |
) where | |
import Control.Applicative (liftA2) |
This file contains 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
import Control.Monad.Tardis | |
import Data.Function (on) | |
import Control.Monad (replicateM, zipWithM, liftM, ap) | |
import Data.Foldable (toList) | |
import System.IO (openFile, IOMode(ReadMode), hGetLine) | |
import Control.Monad.Fix (MonadFix(..)) | |
import Control.Monad.Trans (MonadTrans(..)) | |
import Data.Functor.Identity (Identity(runIdentity)) | |
import Data.List (uncons) |
This file contains 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 DataKinds #-} | |
import Prelude hiding (iterate) | |
import Control.Monad.State (StateT, execStateT, get, gets, modify) | |
import Control.Arrow ((>>>)) | |
import Data.Functor.Compose (Compose(Compose)) | |
import Data.List (sort, nub) | |
import Control.Monad (when, guard) | |
import Control.Monad.Trans (lift) |
This file contains 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 TypeOperators #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE NoStarIsType #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE AllowAmbiguousTypes #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} |
This file contains 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
\documentclass[a4paper]{article} | |
\def \error{\def\error1{}\error2} | |
\def \S#1#2#3{#1#3{#2#3}} | |
\def \K#1#2{#1} | |
\def \i#1{#1\S\K} | |
\begin{document} | |
\i{\i{\i\i}}1\error % Does not error |
This file contains 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 DataKinds #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
import Data.Type.Set (AsSet) | |
class GoodType t | |
data Type1 |
NewerOlder