git.iko.soy/rowtype-yoga/purescript-native
on 73a773e help sign in
37 lines 1.0 kB history raw
1-----------------------------------------------------------------------------
2--
3-- Module : PureScript.Declarations
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.Declarations where
19import PureScript.Values
20import PureScript.Types
21import PureScript.Names
23import qualified Data.Data as D
25type Precedence = Integer
27data Associativity = Infixl | Infixr deriving (Show, D.Data, D.Typeable)
29data Fixity = Fixity Associativity Precedence deriving (Show, D.Data, D.Typeable)
31data Declaration
32 = DataDeclaration String [String] [(String, Maybe Type)]
33 | TypeSynonymDeclaration String [String] Type
34 | TypeDeclaration Ident PolyType
35 | ValueDeclaration Ident Value
36 | ExternDeclaration Ident PolyType
37 | FixityDeclaration Fixity String deriving (Show, D.Data, D.Typeable)