1{-# LANGUAGE TemplateHaskell #-}
3module Language.PureScript.Kinds where
8import qualified Data.Aeson.TH as A
11-- The data type of kinds
15 -- Unification variable of type Kind
23 -- The kind of effects
27 -- Kinds for labelled, unordered rows without duplicates
34 deriving (Show, Read, Eq, Ord)
36$(A.deriveJSON A.defaultOptions ''Kind)
38everywhereOnKinds :: (Kind -> Kind) -> Kind -> Kind
39everywhereOnKinds f = go
41 go (Row k1) = f (Row (go k1))
42 go (FunKind k1 k2) = f (FunKind (go k1) (go k2))
45everywhereOnKindsM :: Monad m => (Kind -> m Kind) -> Kind -> m Kind
46everywhereOnKindsM f = go
48 go (Row k1) = (Row <$> go k1) >>= f
49 go (FunKind k1 k2) = (FunKind <$> go k1 <*> go k2) >>= f
52everythingOnKinds :: (r -> r -> r) -> (Kind -> r) -> Kind -> r
53everythingOnKinds (<>) f = go
55 go k@(Row k1) = f k <> go k1
56 go k@(FunKind k1 k2) = f k <> go k1 <> go k2
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list