1{-# LANGUAGE TemplateHaskell #-}
3module Language.PureScript.Kinds where
7import qualified Data.Aeson.TH as A
9-- | The data type of kinds
11 -- | Unification variable of type Kind
13 -- | The kind of types
15 -- | The kind of effects
17 -- | Kinds for labelled, unordered rows without duplicates
21 -- | Type-level strings
23 deriving (Show, Read, Eq, Ord)
25$(A.deriveJSON A.defaultOptions ''Kind)
27everywhereOnKinds :: (Kind -> Kind) -> Kind -> Kind
28everywhereOnKinds f = go
30 go (Row k1) = f (Row (go k1))
31 go (FunKind k1 k2) = f (FunKind (go k1) (go k2))
34everywhereOnKindsM :: Monad m => (Kind -> m Kind) -> Kind -> m Kind
35everywhereOnKindsM f = go
37 go (Row k1) = (Row <$> go k1) >>= f
38 go (FunKind k1 k2) = (FunKind <$> go k1 <*> go k2) >>= f
41everythingOnKinds :: (r -> r -> r) -> (Kind -> r) -> Kind -> r
42everythingOnKinds (<>) f = go
44 go k@(Row k1) = f k <> go k1
45 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