1-----------------------------------------------------------------------------
3-- Module : Purescript.Types
4-- Copyright : (c) Phil Freeman 2013
7-- Maintainer : Phil Freeman <paf31@cantab.net>
8-- Stability : experimental
13-----------------------------------------------------------------------------
15{-# LANGUAGE DeriveFunctor #-}
17module PureScript.Types (
22import Data.List (intercalate)
31 | Function [Type] Type
33 | TypeConstructor String
40 | RCons String Type Row
42instance Show Type where
43 show (TUnknown _) = "?"
44 show Number = "Number"
45 show String = "String"
46 show Boolean = "Boolean"
47 show (Array t) = "[" ++ show t ++ "]"
48 show (Object row) = "{ " ++ show row ++ " }"
49 show (Function args ret) = "(" ++ intercalate ", " (map show args) ++ ") -> " ++ show ret
51 show (TypeConstructor c) = c
52 show (TypeApp t1 t2) = "(" ++ show t1 ++ ") (" ++ show t2 ++ ")"
54instance Show Row where
55 show (RUnknown _) = "?"
58 show (RCons name ty row) = name ++ " :: " ++ show ty ++ "; " ++ show row
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