Link
LinkMethod: Static
GenerateRelocations: False
- GenerateSymbolTable: False
GenerateLinkMap: False
LinkResources: False
ResourceSource:
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
- Module
- Name: System.OS
- Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Linux-64
- Compiler
- NeverMemoryProfile: False
- NeverTimeProfile: False
- StrictnessAnalysis: True
- ListTypes: StrictExportTypes
- ListAttributes: True
- Warnings: True
- Verbose: True
- ReadableABC: False
- ReuseUniqueNodes: True
- Fusion: False
- Module
- Name: System.OS
- Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Linux-64
- Compiler
- NeverMemoryProfile: False
- NeverTimeProfile: False
- StrictnessAnalysis: True
- ListTypes: StrictExportTypes
- ListAttributes: True
- Warnings: True
- Verbose: True
- ReadableABC: False
- ReuseUniqueNodes: True
- Fusion: False
Module
Name: Control.Applicative
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Control.Monad
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Data.Either
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Data.Foldable
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Data.Func
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Data.Functor
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Data.List
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Data.Map
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Data.Maybe
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Data.Monoid
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Data.Set
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Data.Traversable
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Data.Void
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: System.CommandLine
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: System.IO
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: System._Pointer
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Text
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Text.JSON
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
Fusion: False
Module
Name: Text.PPrint
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Independent
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReuseUniqueNodes: True
Fusion: False
Module
- Name: StdMaybe
- Dir: {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent/Deprecated/StdLib
+ Name: System.OS
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Linux-64
+ Compiler
+ NeverMemoryProfile: False
+ NeverTimeProfile: False
+ StrictnessAnalysis: True
+ ListTypes: StrictExportTypes
+ ListAttributes: True
+ Warnings: True
+ Verbose: True
+ ReadableABC: False
+ ReuseUniqueNodes: True
+ Fusion: False
+ Module
+ Name: System.OS
+ Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Linux-64
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
+ Module
+ Name: StdMaybe
+ Dir: {Application}/lib/iTasks-SDK/Server/lib
+ Compiler
+ NeverMemoryProfile: False
+ NeverTimeProfile: False
+ StrictnessAnalysis: True
+ ListTypes: StrictExportTypes
+ ListAttributes: True
+ Warnings: True
+ Verbose: True
+ ReadableABC: False
+ ReuseUniqueNodes: True
+ Fusion: False
(Left e, _) = Left $ toString e
parseProgram :: Parser Token AST
-parseProgram = liftM2 AST (many parseVarDecl) (some parseFunDecl)
+parseProgram = liftM2 AST (many parseVarDecl) (some parseFunDecl)
+ <* satTok EndOfFileToken
parseFunDecl :: Parser Token FunDecl
parseFunDecl = liftM5 FunDecl
(parseIdent <* satTok BraceOpenToken)
(parseSepList CommaToken parseIdent <* satTok BraceCloseToken)
- (parseFunType <* satTok CBraceOpenToken)
+ (optional parseFunType <* satTok CBraceOpenToken)
(many parseVarDecl)
(many parseStmt <* satTok CBraceCloseToken)
parseOneLine = liftM pure parseStmt
parseFunType :: Parser Token FunType
-parseFunType = satTok DoubleColonToken *>
+parseFunType = satTok DoubleColonToken *>
(parseInOutType <|> (liftM (FunType []) parseVoidOrType))
where
parseInOutType :: Parser Token FunType
parseVoidOrType :: Parser Token (Maybe Type)
parseVoidOrType = (satTok VoidToken *> pure Nothing) <|>
- (liftM Just parseType)
+ (liftM Just parseType) <|> pure Nothing
parseVarDecl :: Parser Token VarDecl
parseVarDecl = liftM3 VarDecl
instance print FunDecl where
print (FunDecl i as t vs ss) =
["\n", i, " (":printersperse "," as] ++
- [") :: ":print t] ++
+ [")"] ++ maybe [] (\tt->[" :: ":print tt]) t ++
["{\n\t":printersperse "\n\t" vs] ++
["\n":printStatements ss 1] ++ ["}\n"]