git.iko.soy/rowtype-yoga/purescript-native
on f96c9a1 help sign in
41 lines 841 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 DeriveDataTypeable #-}
17module PureScript.Types (
18 Type (..),
19 Row(..)
20) where
22import Data.Data
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
35 | ForAll [String] Type deriving (Show, Data, Typeable)
37data Row
38 = RUnknown Int
39 | RowVar String
40 | REmpty
41 | RCons String Type Row deriving (Show, Data, Typeable)