1{-# LANGUAGE TemplateHaskell #-}
3module Language.PureScript.Kinds where
7import qualified Data.Aeson.TH as A
10-- The data type of kinds
14 -- Unification variable of type Kind
22 -- The kind of effects
26 -- Kinds for labelled, unordered rows without duplicates
33 deriving (Show, Read, Eq, Ord)
35$(A.deriveJSON A.defaultOptions ''Kind)
37everywhereOnKinds :: (Kind -> Kind) -> Kind -> Kind
38everywhereOnKinds f = go
40 go (Row k1) = f (Row (go k1))
41 go (FunKind k1 k2) = f (FunKind (go k1) (go k2))
44everywhereOnKindsM :: Monad m => (Kind -> m Kind) -> Kind -> m Kind
45everywhereOnKindsM f = go
47 go (Row k1) = (Row <$> go k1) >>= f
48 go (FunKind k1 k2) = (FunKind <$> go k1 <*> go k2) >>= f
51everythingOnKinds :: (r -> r -> r) -> (Kind -> r) -> Kind -> r
52everythingOnKinds (<>) f = go
54 go k@(Row k1) = f k <> go k1
55 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