blob: e013383f22760aeda9fd32932a5dfab5beb63bf9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeInType #-}
module T11732c where
import Data.Kind
class Cat k (cat :: k -> k -> *) where
catId :: cat a a
catComp :: cat b c -> cat a b -> cat a c
instance Cat * (->) where
catId = id
catComp = (.)
newtype Fun1 a b = Fun1 (a -> b) deriving (Cat k)
newtype Fun2 a b = Fun2 (a -> b) deriving (Cat *)
|