footnote 1.
Footnotes
-
aaa
↩
module List where | |
type List : Type -> Type | |
data List where | |
Nil : List a | |
Cons : a -> List a -> List a | |
type String : Type | |
type String = List Char |
module Main where | |
dict Integral a = Integral { | |
fromInteger: Integer -> a, | |
+: a -> a -> a, | |
-: a -> a -> a, | |
iszero: a -> Bool, | |
} | |
impl integralForInteger: Integral Integer |
module BitSeq where | |
merge :: Int -> [a] -> [a] -> [a] | |
merge n xs ys = goXs n xs | |
where | |
goXs 0 zs = goYs n ys zs | |
goXs m (z:zs) = z:goXs (m - 1) zs | |
goXs _ [] = error "unreachable" | |
goYs 0 zs r = merge (n + 1) r zs |
{-# LANGUAGE GADTs #-} | |
module Control.ExceptionUtil where | |
import Control.Exception | |
data TrySelection a where | |
TrySelection :: Exception e => (e -> a) -> TrySelection a | |
trySelectionBuilder :: [TrySelection a] -> SomeException -> Maybe a |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE DerivingVia #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
module MayBreakDerivingVia where | |
import Control.Monad.Trans.Reader | |
newtype T m a = T (Int -> m a) |
{-# LANGUAGE MagicHash #-} | |
module Main where | |
import Unsafe.Coerce | |
import GHC.Exts | |
data CompactD = CA | CB | CC | |
deriving (Show) |
module TestSpace.NotSpaceAsciiString where | |
import Test.QuickCheck.Arbitrary | |
import Test.QuickCheck.Gen | |
import Data.Coerce | |
import Data.Char (isSpace) | |
newtype NotSpace = NotSpace Char | |
deriving (Eq, Ord, Show) |
{-# LANGUAGE BangPatterns #-} | |
module Main where | |
import Criterion.Main | |
import Control.DeepSeq | |
import Data.Foldable | |
{- | |
Result: |
{-# LANGUAGE LambdaCase #-} | |
module Bench.StateVSIORef where | |
import Data.IORef | |
import Data.IORef.Unboxed | |
import Control.Monad.State.Strict | |
n :: Int |