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 DerivingVia, LambdaCase, BlockArguments #-} | |
module Pool ( | |
Pool, | |
runPool, | |
schedule, | |
withRunInIO, | |
) where | |
-- base |
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 LambdaCase, GADTs #-} | |
module Sum where | |
import Data.Type.Equality ((:~:)(..)) | |
import Data.Functor ((<&>)) | |
type f ~> g = forall x. f x -> g x | |
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 DerivingVia, PatternSynonyms #-} | |
{-# LANGUAGE UndecidableInstances, MonoLocalBinds #-} | |
module Transform where | |
import Data.Functor ((<&>)) | |
import Data.Monoid (Sum(..), Product(..), Ap(..)) | |
test1a :: Transformable p s => Transform p s |
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
module Local (local) where | |
import Data.Char (isUpper) | |
import Data.Functor ((<&>)) | |
import Language.Haskell.TH.Syntax | |
( Q, Exp(VarE, ConE), Type(ConT) | |
, Module(..), Name(..), OccName(..), NameFlavour(NameQ) | |
) | |
import Language.Haskell.TH.Lib (thisModule) |
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
module Triangles ((<|), (|>)) where | |
(<|) :: a -> Bool -> Maybe a | |
a <| True = Just a | |
_ <| False = Nothing | |
infix 2 <| | |
(|>) :: Maybe a -> a -> a | |
Just a |> _ = a | |
Nothing |> a = a |
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
module Fresh | |
( Fresh, runFresh, withFresh | |
) where | |
import Data.Typeable | |
import Control.Monad.State (StateT, evalStateT, get, put) | |
import Control.Monad.Trans (MonadTrans) | |
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 #-} | |
module Sub where | |
data Sub = S Sub | |
data Three (s :: Sub) a b c where | |
One :: a -> Three s a b c | |
Two :: b -> Three (S s ) a b c |
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
module Cube where | |
import Data.Functor.Const (Const(..)) | |
import Data.Functor.Product (Product(..)) | |
import Data.Functor.Sum (Sum(..)) | |
type (&&) = Product | |
type (||) = Sum |
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
#! /usr/bin/env sh | |
# Example usage: | |
# $ watchfile Test.idr idris2 --check | |
# $ watchfile test.sh shellcheck | |
# $ watchfile Main.hs -- cabal test | |
file=$1; shift | |
tmp="/tmp/watch.$(basename "$file")" |
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 DerivingVia, BlockArguments, LambdaCase #-} | |
module Control.Concurrent.Incremental ( | |
Adaptive, adaptively, | |
static, dynamic, | |
ICVar, newICVar, newICVarIO, | |
demand, propagate, | |
compute, await, |
NewerOlder