-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | PureScript Programming Language Compiler -- @package purescript @version 0.2.15 module Language.PureScript.Parser.State data ParseState ParseState :: Column -> ParseState indentationLevel :: ParseState -> Column instance Show ParseState module Language.PureScript.Unknown newtype Unknown t Unknown :: Int -> Unknown t runUnknown :: Unknown t -> Int instance Typeable Unknown instance Show (Unknown t) instance Eq (Unknown t) instance Ord (Unknown t) instance Data t => Data (Unknown t) module Language.PureScript.Options data Options Options :: Bool -> Bool -> Bool -> Bool -> Options optionsTco :: Options -> Bool optionsPerformRuntimeTypeChecks :: Options -> Bool optionsMagicDo :: Options -> Bool optionsRunMain :: Options -> Bool defaultOptions :: Options instance Show Options module Language.PureScript.Names data Ident Ident :: String -> Ident Op :: String -> Ident newtype ProperName ProperName :: String -> ProperName runProperName :: ProperName -> String data ModuleName ModuleName :: ProperName -> ModuleName data Qualified a Qualified :: (Maybe ModuleName) -> a -> Qualified a qualify :: ModuleName -> Qualified a -> (ModuleName, a) instance Typeable Ident instance Typeable ProperName instance Typeable ModuleName instance Typeable Qualified instance Eq Ident instance Ord Ident instance Data Ident instance Eq ProperName instance Ord ProperName instance Data ProperName instance Eq ModuleName instance Ord ModuleName instance Data ModuleName instance Eq a => Eq (Qualified a) instance Ord a => Ord (Qualified a) instance Data a => Data (Qualified a) instance Show a => Show (Qualified a) instance Show ModuleName instance Show ProperName instance Show Ident module Language.PureScript.Pretty.Common identToJs :: Ident -> String newtype Pattern u a b Pattern :: Kleisli (StateT u Maybe) a b -> Pattern u a b runPattern :: Pattern u a b -> Kleisli (StateT u Maybe) a b pattern :: Pattern u a b -> u -> a -> Maybe b mkPattern :: (a -> Maybe b) -> Pattern u a b mkPattern' :: (a -> StateT u Maybe b) -> Pattern u a b parens :: String -> String chainl :: Pattern u a (a, a) -> (r -> r -> r) -> Pattern u a r -> Pattern u a r chainr :: Pattern u a (a, a) -> (r -> r -> r) -> Pattern u a r -> Pattern u a r wrap :: Pattern u a (s, a) -> (s -> r -> r) -> Pattern u a r -> Pattern u a r split :: Pattern u a (s, t) -> (s -> t -> r) -> Pattern u a r data OperatorTable u a r OperatorTable :: [[Operator u a r]] -> OperatorTable u a r runOperatorTable :: OperatorTable u a r -> [[Operator u a r]] data Operator u a r AssocL :: Pattern u a (a, a) -> (r -> r -> r) -> Operator u a r AssocR :: Pattern u a (a, a) -> (r -> r -> r) -> Operator u a r Wrap :: Pattern u a (s, a) -> (s -> r -> r) -> Operator u a r Split :: Pattern u a (s, t) -> (s -> t -> r) -> Operator u a r buildPrettyPrinter :: OperatorTable u a r -> Pattern u a r -> Pattern u a r instance Category (Pattern u) instance Arrow (Pattern u) instance ArrowZero (Pattern u) instance ArrowPlus (Pattern u) instance Functor (Pattern u a) module Language.PureScript.CodeGen.Monad newtype Gen a Gen :: State [Ident] a -> Gen a unGen :: Gen a -> State [Ident] a runGen :: [Ident] -> Gen a -> a fresh :: Gen Ident instance Functor Gen instance Applicative Gen instance Monad Gen instance MonadState [Ident] Gen module Language.PureScript.Parser.Common reservedNames :: [String] builtInOperators :: [String] reservedOpNames :: [String] identStart :: Parsec String u Char properNameStart :: Parsec String u Char identLetter :: Parsec String u Char opStart :: Parsec String u Char opLetter :: Parsec String u Char langDef :: GenLanguageDef String u Identity tokenParser :: GenTokenParser String u Identity lexeme :: Parsec String u a -> Parsec String u a identifier :: Parsec String u String reserved :: String -> Parsec String u () reservedOp :: String -> Parsec String u () operator :: Parsec String u String stringLiteral :: Parsec String u String whiteSpace :: Parsec String u () semi :: Parsec String u String colon :: Parsec String u String dot :: Parsec String u String comma :: Parsec String u String tick :: Parsec String u Char pipe :: Parsec String u Char natural :: Parsec String u Integer squares :: Parsec String ParseState a -> Parsec String ParseState a parens :: Parsec String ParseState a -> Parsec String ParseState a braces :: Parsec String ParseState a -> Parsec String ParseState a angles :: Parsec String ParseState a -> Parsec String ParseState a sepBy :: Parsec String ParseState a -> Parsec String ParseState sep -> Parsec String ParseState [a] sepBy1 :: Parsec String ParseState a -> Parsec String ParseState sep -> Parsec String ParseState [a] semiSep :: Parsec String ParseState a -> Parsec String ParseState [a] semiSep1 :: Parsec String ParseState a -> Parsec String ParseState [a] commaSep :: Parsec String ParseState a -> Parsec String ParseState [a] commaSep1 :: Parsec String ParseState a -> Parsec String ParseState [a] properName :: Parsec String u ProperName parseQualified :: Parsec String ParseState a -> Parsec String ParseState (Qualified a) integerOrFloat :: Parsec String u (Either Integer Double) augment :: Stream s m t => ParsecT s u m a -> ParsecT s u m b -> (a -> b -> a) -> ParsecT s u m a fold :: Stream s m t => ParsecT s u m a -> ParsecT s u m b -> (a -> b -> a) -> ParsecT s u m a buildPostfixParser :: Stream s m t => [a -> ParsecT s u m a] -> ParsecT s u m a -> ParsecT s u m a operatorOrBuiltIn :: Parsec String u String parseIdent :: Parsec String ParseState Ident parseIdentInfix :: Parsec String ParseState (Qualified Ident) mark :: Parsec String ParseState a -> Parsec String ParseState a checkIndentation :: (Column -> Column -> Bool) -> Parsec String ParseState () indented :: Parsec String ParseState () same :: Parsec String ParseState () runIndentParser :: Parsec String ParseState a -> String -> Either ParseError a module Language.PureScript.Kinds data Kind KUnknown :: (Unknown Kind) -> Kind Star :: Kind Bang :: Kind Row :: Kind -> Kind FunKind :: Kind -> Kind -> Kind instance Typeable Kind instance Show Kind instance Eq Kind instance Data Kind module Language.PureScript.Parser.Kinds parseKind :: Parsec String ParseState Kind module Language.PureScript.Pretty.Kinds prettyPrintKind :: Kind -> String module Language.PureScript.Types data Type TUnknown :: (Unknown Type) -> Type Number :: Type String :: Type Boolean :: Type Array :: Type -> Type Object :: Type -> Type Function :: [Type] -> Type -> Type TypeVar :: String -> Type TypeConstructor :: (Qualified ProperName) -> Type TypeApp :: Type -> Type -> Type SaturatedTypeSynonym :: (Qualified ProperName) -> [Type] -> Type ForAll :: String -> Type -> Type ConstrainedType :: [(Qualified ProperName, Type)] -> Type -> Type Skolem :: Int -> Type REmpty :: Type RCons :: String -> Type -> Type -> Type rowToList :: Type -> ([(String, Type)], Type) rowFromList :: ([(String, Type)], Type) -> Type isMonoType :: Type -> Bool isPolyType :: Type -> Bool mkForAll :: [String] -> Type -> Type unit :: Type replaceTypeVars :: Data d => String -> Type -> d -> d instance Typeable Type instance Show Type instance Eq Type instance Data Type module Language.PureScript.Parser.Types parseType :: Parsec String ParseState Type parsePolyType :: Parsec String ParseState Type parseRow :: Parsec String ParseState Type module Language.PureScript.Pretty.Types prettyPrintType :: Type -> String prettyPrintRow :: Type -> String module Language.PureScript.Values type Guard = Value data UnaryOperator Negate :: UnaryOperator Not :: UnaryOperator BitwiseNot :: UnaryOperator Positive :: UnaryOperator data BinaryOperator Add :: BinaryOperator Subtract :: BinaryOperator Multiply :: BinaryOperator Divide :: BinaryOperator Modulus :: BinaryOperator EqualTo :: BinaryOperator NotEqualTo :: BinaryOperator LessThan :: BinaryOperator LessThanOrEqualTo :: BinaryOperator GreaterThan :: BinaryOperator GreaterThanOrEqualTo :: BinaryOperator And :: BinaryOperator Or :: BinaryOperator BitwiseAnd :: BinaryOperator BitwiseOr :: BinaryOperator BitwiseXor :: BinaryOperator ShiftLeft :: BinaryOperator ShiftRight :: BinaryOperator ZeroFillShiftRight :: BinaryOperator Concat :: BinaryOperator data Value NumericLiteral :: (Either Integer Double) -> Value StringLiteral :: String -> Value BooleanLiteral :: Bool -> Value Unary :: UnaryOperator -> Value -> Value Binary :: BinaryOperator -> Value -> Value -> Value BinaryNoParens :: (Qualified Ident) -> Value -> Value -> Value Parens :: Value -> Value ArrayLiteral :: [Value] -> Value Indexer :: Value -> Value -> Value ObjectLiteral :: [(String, Value)] -> Value Accessor :: String -> Value -> Value ObjectUpdate :: Value -> [(String, Value)] -> Value Abs :: [Ident] -> Value -> Value App :: Value -> [Value] -> Value Var :: (Qualified Ident) -> Value IfThenElse :: Value -> Value -> Value -> Value Block :: [Statement] -> Value Constructor :: (Qualified ProperName) -> Value Case :: [Value] -> [([Binder], Maybe Guard, Value)] -> Value TypedValue :: Bool -> Value -> Type -> Value Do :: [DoNotationElement] -> Value TypeClassDictionary :: (Qualified ProperName, Type) -> [TypeClassDictionaryInScope] -> Value data TypeClassDictionaryInScope TypeClassDictionaryInScope :: Ident -> Qualified ProperName -> Type -> Maybe [(Qualified ProperName, Type)] -> TypeClassDictionaryInScope tcdName :: TypeClassDictionaryInScope -> Ident tcdClassName :: TypeClassDictionaryInScope -> Qualified ProperName tcdInstanceType :: TypeClassDictionaryInScope -> Type tcdDependencies :: TypeClassDictionaryInScope -> Maybe [(Qualified ProperName, Type)] data DoNotationElement DoNotationValue :: Value -> DoNotationElement DoNotationBind :: Binder -> Value -> DoNotationElement DoNotationLet :: Binder -> Value -> DoNotationElement data Statement VariableIntroduction :: Ident -> Value -> Statement Assignment :: Ident -> Value -> Statement While :: Value -> [Statement] -> Statement For :: Ident -> Value -> Value -> [Statement] -> Statement If :: IfStatement -> Statement Return :: Value -> Statement data IfStatement IfStatement :: Value -> [Statement] -> (Maybe ElseStatement) -> IfStatement data ElseStatement Else :: [Statement] -> ElseStatement ElseIf :: IfStatement -> ElseStatement data Binder NullBinder :: Binder BooleanBinder :: Bool -> Binder StringBinder :: String -> Binder NumberBinder :: (Either Integer Double) -> Binder VarBinder :: Ident -> Binder NullaryBinder :: (Qualified ProperName) -> Binder UnaryBinder :: (Qualified ProperName) -> Binder -> Binder ObjectBinder :: [(String, Binder)] -> Binder ArrayBinder :: [Binder] -> Binder ConsBinder :: Binder -> Binder -> Binder NamedBinder :: Ident -> Binder -> Binder instance Typeable UnaryOperator instance Typeable BinaryOperator instance Typeable TypeClassDictionaryInScope instance Typeable Binder instance Typeable Value instance Typeable Statement instance Typeable IfStatement instance Typeable ElseStatement instance Typeable DoNotationElement instance Show UnaryOperator instance Eq UnaryOperator instance Data UnaryOperator instance Show BinaryOperator instance Eq BinaryOperator instance Data BinaryOperator instance Show TypeClassDictionaryInScope instance Data TypeClassDictionaryInScope instance Show Binder instance Data Binder instance Show Value instance Data Value instance Show Statement instance Data Statement instance Show IfStatement instance Data IfStatement instance Show ElseStatement instance Data ElseStatement instance Show DoNotationElement instance Data DoNotationElement module Language.PureScript.CodeGen.JS.AST data JS JSNumericLiteral :: (Either Integer Double) -> JS JSStringLiteral :: String -> JS JSBooleanLiteral :: Bool -> JS JSUnary :: UnaryOperator -> JS -> JS JSBinary :: BinaryOperator -> JS -> JS -> JS JSArrayLiteral :: [JS] -> JS JSIndexer :: JS -> JS -> JS JSObjectLiteral :: [(String, JS)] -> JS JSAccessor :: String -> JS -> JS JSFunction :: (Maybe Ident) -> [Ident] -> JS -> JS JSApp :: JS -> [JS] -> JS JSVar :: Ident -> JS JSConditional :: JS -> JS -> JS -> JS JSBlock :: [JS] -> JS JSVariableIntroduction :: Ident -> (Maybe JS) -> JS JSAssignment :: JSAssignment -> JS -> JS JSWhile :: JS -> JS -> JS JSFor :: Ident -> JS -> JS -> JS -> JS JSIfElse :: JS -> JS -> (Maybe JS) -> JS JSReturn :: JS -> JS JSThrow :: JS -> JS JSTypeOf :: JS -> JS JSLabel :: String -> JS -> JS JSBreak :: String -> JS JSContinue :: String -> JS JSRaw :: String -> JS data JSAssignment JSAssignVariable :: Ident -> JSAssignment JSAssignProperty :: String -> JSAssignment -> JSAssignment instance Typeable JSAssignment instance Typeable JS instance Show JSAssignment instance Data JSAssignment instance Show JS instance Data JS module Language.PureScript.Declarations type Precedence = Integer data Associativity Infixl :: Associativity Infixr :: Associativity data Fixity Fixity :: Associativity -> Precedence -> Fixity data Module Module :: ProperName -> [Declaration] -> Module data ForeignImportType ForeignImport :: ForeignImportType TypeClassDictionaryImport :: ForeignImportType TypeClassAccessorImport :: ForeignImportType data Declaration DataDeclaration :: ProperName -> [String] -> [(ProperName, Maybe Type)] -> Declaration DataBindingGroupDeclaration :: [(ProperName, [String], [(ProperName, Maybe Type)])] -> Declaration TypeSynonymDeclaration :: ProperName -> [String] -> Type -> Declaration TypeDeclaration :: Ident -> Type -> Declaration ValueDeclaration :: Ident -> [[Binder]] -> (Maybe Guard) -> Value -> Declaration BindingGroupDeclaration :: [(Ident, Value)] -> Declaration ExternDeclaration :: ForeignImportType -> Ident -> (Maybe JS) -> Type -> Declaration ExternDataDeclaration :: ProperName -> Kind -> Declaration FixityDeclaration :: Fixity -> String -> Declaration ImportDeclaration :: ModuleName -> (Maybe [Either Ident ProperName]) -> Declaration TypeClassDeclaration :: ProperName -> String -> [Declaration] -> Declaration TypeInstanceDeclaration :: [(Qualified ProperName, Type)] -> (Qualified ProperName) -> Type -> [Declaration] -> Declaration instance Typeable Associativity instance Typeable Fixity instance Typeable ForeignImportType instance Typeable Declaration instance Typeable Module instance Show Associativity instance Data Associativity instance Show Fixity instance Data Fixity instance Show ForeignImportType instance Eq ForeignImportType instance Data ForeignImportType instance Show Declaration instance Data Declaration instance Show Module instance Data Module module Language.PureScript.CodeGen.Optimize optimize :: Options -> JS -> JS module Language.PureScript.Scope usedNames :: Data d => d -> [Ident] unusedNames :: Data d => d -> [Ident] module Language.PureScript.Sugar.DoNotation desugarDo :: Data d => d -> Either String d module Language.PureScript.Sugar.CaseDeclarations desugarCases :: [Declaration] -> Either String [Declaration] desugarCasesModule :: [Module] -> Either String [Module] module Language.PureScript.Sugar.TypeDeclarations desugarTypeDeclarations :: [Declaration] -> Either String [Declaration] desugarTypeDeclarationsModule :: [Module] -> Either String [Module] module Language.PureScript.Sugar.BindingGroups createBindingGroups :: [Declaration] -> [Declaration] createBindingGroupsModule :: [Module] -> [Module] collapseBindingGroups :: [Declaration] -> [Declaration] collapseBindingGroupsModule :: [Module] -> [Module] module Language.PureScript.Sugar.TypeClasses desugarTypeClasses :: [Module] -> Either String [Module] mkDictionaryValueName :: ModuleName -> Qualified ProperName -> Type -> Either String Ident mkDictionaryEntryName :: ModuleName -> Qualified ProperName -> Type -> Ident -> Desugar Ident module Language.PureScript.TypeChecker.Monad data NameKind Value :: NameKind Extern :: ForeignImportType -> NameKind Alias :: ModuleName -> Ident -> NameKind LocalVariable :: NameKind DataConstructor :: NameKind data TypeDeclarationKind Data :: TypeDeclarationKind ExternData :: TypeDeclarationKind TypeSynonym :: TypeDeclarationKind DataAlias :: ModuleName -> ProperName -> TypeDeclarationKind LocalTypeVariable :: TypeDeclarationKind data Environment Environment :: Map (ModuleName, Ident) (Type, NameKind) -> Map (ModuleName, ProperName) (Kind, TypeDeclarationKind) -> Map (ModuleName, ProperName) (Type, NameKind) -> Map (ModuleName, ProperName) ([String], Type) -> [TypeClassDictionaryInScope] -> Environment names :: Environment -> Map (ModuleName, Ident) (Type, NameKind) types :: Environment -> Map (ModuleName, ProperName) (Kind, TypeDeclarationKind) dataConstructors :: Environment -> Map (ModuleName, ProperName) (Type, NameKind) typeSynonyms :: Environment -> Map (ModuleName, ProperName) ([String], Type) typeClassDictionaries :: Environment -> [TypeClassDictionaryInScope] emptyEnvironment :: Environment bindNames :: MonadState CheckState m => Map (ModuleName, Ident) (Type, NameKind) -> m a -> m a bindTypes :: MonadState CheckState m => Map (ModuleName, ProperName) (Kind, TypeDeclarationKind) -> m a -> m a withTypeClassDictionaries :: MonadState CheckState m => [TypeClassDictionaryInScope] -> m a -> m a getTypeClassDictionaries :: (Functor m, MonadState CheckState m) => m [TypeClassDictionaryInScope] bindLocalVariables :: (Functor m, MonadState CheckState m) => ModuleName -> [(Ident, Type)] -> m a -> m a bindLocalTypeVariables :: (Functor m, MonadState CheckState m) => ModuleName -> [(ProperName, Kind)] -> m a -> m a lookupVariable :: (Functor m, MonadState CheckState m, MonadError String m) => ModuleName -> Qualified Ident -> m Type lookupTypeVariable :: (Functor m, MonadState CheckState m, MonadError String m) => ModuleName -> Qualified ProperName -> m Kind canonicalize :: ModuleName -> Environment -> Qualified Ident -> (ModuleName, Ident) canonicalizeType :: ModuleName -> Environment -> Qualified ProperName -> (ModuleName, ProperName) data CheckState CheckState :: Environment -> Int -> Int -> CheckState checkEnv :: CheckState -> Environment checkNextVar :: CheckState -> Int checkNextDictName :: CheckState -> Int newtype Check a Check :: StateT CheckState (Either String) a -> Check a unCheck :: Check a -> StateT CheckState (Either String) a getEnv :: (Functor m, MonadState CheckState m) => m Environment putEnv :: MonadState CheckState m => Environment -> m () modifyEnv :: MonadState CheckState m => (Environment -> Environment) -> m () runCheck :: Check a -> Either String (a, Environment) guardWith :: MonadError e m => e -> Bool -> m () rethrow :: MonadError e m => (e -> e) -> m a -> m a freshDictionaryName :: Check Int newtype Substitution Substitution :: (forall t. Unifiable t => Unknown t -> t) -> Substitution runSubstitution :: Substitution -> forall t. Unifiable t => Unknown t -> t data SubstState SubstState :: Substitution -> SubstState substSubst :: SubstState -> Substitution newtype SubstContext SubstContext :: ModuleName -> SubstContext substCurrentModule :: SubstContext -> ModuleName newtype Subst a Subst :: ReaderT SubstContext (StateT SubstState Check) a -> Subst a unSubst :: Subst a -> ReaderT SubstContext (StateT SubstState Check) a liftCheck :: Check a -> Subst a getSubstState :: Subst SubstState runSubst :: SubstContext -> Subst a -> Check (a, Substitution) substituteWith :: Typeable t => (Unknown t -> t) -> Substitution substituteOne :: Unifiable t => Unknown t -> t -> Substitution replace :: Unifiable t => Unknown t -> t -> Subst () class (Typeable t, Data t, Show t) => Unifiable t unknown :: Unifiable t => Unknown t -> t (~~) :: Unifiable t => t -> t -> Subst () isUnknown :: Unifiable t => t -> Maybe (Unknown t) apply :: Unifiable t => Substitution -> t -> t unknowns :: Unifiable t => t -> [Int] occursCheck :: Unifiable t => Unknown s -> t -> Subst () fresh' :: Subst Int fresh :: Unifiable t => Subst t qualifyAllUnqualifiedNames :: Data d => ModuleName -> Environment -> d -> d instance MonadError String Subst instance Show NameKind instance Show TypeDeclarationKind instance Show Environment instance Functor Check instance Monad Check instance Applicative Check instance MonadPlus Check instance MonadState CheckState Check instance MonadError String Check instance Show SubstContext instance Functor Subst instance Monad Subst instance Applicative Subst instance MonadPlus Subst instance MonadReader SubstContext Subst instance Unifiable a => Unifiable [a] instance MonadState CheckState Subst instance Monoid Substitution module Language.PureScript.Parser.Values parseValue :: Parsec String ParseState Value parseGuard :: Parsec String ParseState Guard parseBinder :: Parsec String ParseState Binder parseBinderNoParens :: Parsec String ParseState Binder parseDoNotationElement :: Parsec String ParseState DoNotationElement module Language.PureScript.Parser.JS parseJS :: Parsec String u JS module Language.PureScript.Parser.Declarations parseDeclaration :: Parsec String ParseState Declaration parseModule :: Parsec String ParseState Module parseModules :: Parsec String ParseState [Module] module Language.PureScript.Parser module Language.PureScript.Pretty.Values prettyPrintValue :: Value -> String prettyPrintBinder :: Binder -> String module Language.PureScript.Pretty.JS prettyPrintJS :: [JS] -> String instance Show PrinterState instance Eq PrinterState instance Ord PrinterState module Language.PureScript.Pretty module Language.PureScript.CodeGen.Externs moduleToPs :: Module -> Environment -> String module Language.PureScript.TypeChecker.Kinds kindOf :: ModuleName -> Type -> Check Kind kindsOf :: ModuleName -> ProperName -> [String] -> [Type] -> Check Kind kindsOfAll :: ModuleName -> [(ProperName, [String], [Type])] -> Check [Kind] instance Unifiable Kind module Data.Generics.Extras everywhereM' :: (Monad m, Data d) => (forall d1. Data d1 => d1 -> m d1) -> d -> m d module Language.PureScript.Sugar.Operators rebracket :: [Module] -> Either String [Module] module Language.PureScript.Sugar desugar :: [Module] -> Either String [Module] module Language.PureScript.TypeChecker.Synonyms saturateTypeSynonym :: Data d => Environment -> ModuleName -> (ModuleName, ProperName) -> Int -> d -> Either String d saturateAllTypeSynonyms :: Data d => Environment -> ModuleName -> [((ModuleName, ProperName), Int)] -> d -> Either String d module Language.PureScript.TypeChecker.Types typesOf :: ModuleName -> [(Ident, Value)] -> Check [(Ident, (Value, Type))] instance Unifiable Type module Language.PureScript.TypeChecker typeCheckAll :: ModuleName -> [Declaration] -> Check [Declaration] module Language.PureScript.CodeGen.JS declToJs :: Options -> ModuleName -> Declaration -> Environment -> Maybe [JS] moduleToJs :: Options -> Module -> Environment -> [JS] module Language.PureScript.CodeGen module Language.PureScript compile :: Options -> [Module] -> Either String (String, String, Environment)