1{-# LANGUAGE TemplateHaskell #-}
3module Language.PureScript.Kinds where
7import qualified Data.Aeson.TH as A
9import Language.PureScript.Names
11-- | The data type of kinds
13 -- | Unification variable of type Kind
15 -- | Kinds for labelled, unordered rows without duplicates
20 | NamedKind (Qualified (ProperName 'KindName))
21 deriving (Show, Eq, Ord)
23$(A.deriveJSON A.defaultOptions ''Kind)
25everywhereOnKinds :: (Kind -> Kind) -> Kind -> Kind
26everywhereOnKinds f = go
28 go (Row k1) = f (Row (go k1))
29 go (FunKind k1 k2) = f (FunKind (go k1) (go k2))
32everywhereOnKindsM :: Monad m => (Kind -> m Kind) -> Kind -> m Kind
33everywhereOnKindsM f = go
35 go (Row k1) = (Row <$> go k1) >>= f
36 go (FunKind k1 k2) = (FunKind <$> go k1 <*> go k2) >>= f
39everythingOnKinds :: (r -> r -> r) -> (Kind -> r) -> Kind -> r
40everythingOnKinds (<>) f = go
42 go k@(Row k1) = f k <> go k1
43 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