1-----------------------------------------------------------------------------
3-- Module : PureScript.Parser.Kinds
4-- Copyright : (c) Phil Freeman 2013
7-- Maintainer : Phil Freeman <paf31@cantab.net>
8-- Stability : experimental
13-----------------------------------------------------------------------------
15module PureScript.Parser.Kinds (
19import PureScript.Kinds
20import PureScript.Parser.State
21import PureScript.Parser.Common
22import Control.Applicative
23import qualified Text.Parsec as P
24import qualified Text.Parsec.Expr as P
26parseStar :: P.Parsec String ParseState Kind
27parseStar = const Star <$> lexeme (P.char '*')
29parseRow :: P.Parsec String ParseState Kind
30parseRow = const Row <$> lexeme (P.char '#')
32parseTypeAtom :: P.Parsec String ParseState Kind
33parseTypeAtom = indented *> P.choice (map P.try
38parseKind :: P.Parsec String ParseState Kind
39parseKind = P.buildExpressionParser operators parseTypeAtom P.<?> "kind"
41 operators = [ [ P.Infix (lexeme (P.try (P.string "->")) >> return FunKind) P.AssocRight ] ]
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