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 MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, FunctionalDependencies #-} | |
import Control.Monad.Reader | |
class Method o m a f | f -> o m a where | |
on :: (o -> m a) -> f | |
instance Method o m a (o -> m a) where | |
on = 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 TypeFamilies, KindSignatures, DataKinds, TypeOperators, GADTs, MultiParamTypeClasses, FlexibleInstances, GeneralizedNewtypeDeriving, OverlappingInstances, ScopedTypeVariables, FlexibleContexts #-} | |
import Control.Applicative | |
import Control.DeepSeq | |
import qualified Control.Exception as E | |
-- Closed type family, needs GHC HEAD. | |
type family Minus (e :: *) (es :: [*]) :: [*] where | |
Minus e '[] = '[] | |
Minus e (e ': es) = Minus e es |
NewerOlder