git.iko.soy/rowtype-yoga/purescript-native
on fb48912 help sign in
40 lines 789 B history raw
1-----------------------------------------------------------------------------
2--
3-- Module : Purescript.Types
4-- Copyright : (c) Phil Freeman 2013
5-- License : MIT
6--
7-- Maintainer : Phil Freeman <paf31@cantab.net>
8-- Stability : experimental
9-- Portability :
10--
11-- |
12--
13-----------------------------------------------------------------------------
15{-# LANGUAGE DeriveFunctor #-}
17module PureScript.Types (
18 Type (..),
19 Row(..)
20) where
22import Data.List (intercalate)
24data Type
25 = TUnknown Int
26 | Number
27 | String
28 | Boolean
29 | Array Type
30 | Object Row
31 | Function [Type] Type
32 | TypeVar String
33 | TypeConstructor String
34 | TypeApp Type Type deriving Show
36data Row
37 = RUnknown Int
38 | RowVar String
39 | REmpty
40 | RCons String Type Row deriving Show