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
| -- These coercions could probably be generated automatically with a | |
| -- type class and this plugin: | |
| -- https://github.com/noughtmare/transitive-constraint-plugin | |
| {-# LANGUAGE UnboxedTuples, UnliftedNewtypes, ExplicitNamespaces #-} | |
| {-# LANGUAGE RoleAnnotations, DataKinds, QuantifiedConstraints #-} | |
| module Coercible ( | |
| Coercible(..), |
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 GHC2021, BlockArguments #-} | |
| module Yoneda where | |
| import Prelude hiding (id, (.), map) | |
| import Control.Category | |
| -- Preliminaries | |
| class (Category c, Category d) => ExoFunctor c d f where |
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 LambdaCase #-} | |
| module Collapse where | |
| -- base | |
| import Data.Functor ((<&>)) | |
| import Data.Functor.Classes (Show1) | |
| import Data.Foldable (toList) | |
| import Control.Monad (ap) |
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 DataKinds, TypeFamilies, UndecidableInstances, RoleAnnotations | |
| , QuantifiedConstraints, RebindableSyntax, BlockArguments | |
| , RequiredTypeArguments | |
| #-} | |
| module Graded ( | |
| GradedAppl(..), (<*>), (<*), (*>), | |
| GradedAlt(..), | |
| GradedMonad(..), (>>), |
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 BlockArguments #-} | |
| module InlineFix ( | |
| Rec, | |
| inlineFix, | |
| Church, (|&), _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, | |
| ) where | |
| import GHC.Exts (inline) | |
| import Data.Function (fix) |
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 QuantifiedConstraints | |
| , UndecidableInstances | |
| , AllowAmbiguousTypes | |
| #-} | |
| {-# OPTIONS_GHC -Wno-simplifiable-class-constraints #-} | |
| module LeibnizC where | |
| import Leibniz |
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 GADTs, RankNTypes, LambdaCase, BlockArguments #-} | |
| module WorkQueue ( | |
| Progress(..), | |
| WorkQueue, | |
| newWorkQueue, | |
| newWorkQueueIO, | |
| spawnWorker, | |
| schedule, | |
| terminate, |
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 LambdaCase, GADTs #-} | |
| module Sum where | |
| import Data.Type.Equality ((:~:)(..)) | |
| import Data.Functor ((<&>)) | |
| type f ~> g = forall x. f x -> g x | |
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 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 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 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) |