1-----------------------------------------------------------------------------
3-- Module : Language.PureScript.Kinds
4-- Copyright : (c) Phil Freeman 2013
7-- Maintainer : Phil Freeman <paf31@cantab.net>
8-- Stability : experimental
13-----------------------------------------------------------------------------
15{-# LANGUAGE DeriveDataTypeable #-}
17module Language.PureScript.Kinds where
21import Control.Applicative
22import Control.Monad.Unify (Unknown)
25-- The data type of kinds
29 -- Unification variable of type Kind
37 -- The kind of effects
41 -- Kinds for labelled, unordered rows without duplicates
47 | FunKind Kind Kind deriving (Show, Eq, Data, Typeable)
49everywhereOnKinds :: (Kind -> Kind) -> Kind -> Kind
50everywhereOnKinds f = go
52 go (Row k1) = f (Row (go k1))
53 go (FunKind k1 k2) = f (FunKind (go k1) (go k2))
56everywhereOnKindsM :: (Functor m, Applicative m, Monad m) => (Kind -> m Kind) -> Kind -> m Kind
57everywhereOnKindsM f = go
59 go (Row k1) = (Row <$> go k1) >>= f
60 go (FunKind k1 k2) = (FunKind <$> go k1 <*> go k2) >>= f
63everythingOnKinds :: (r -> r -> r) -> (Kind -> r) -> Kind -> r
64everythingOnKinds (<>) f = go
66 go k@(Row k1) = f k <> go k1
67 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