From: Mart Lubbers Date: Mon, 29 Feb 2016 12:59:57 +0000 (+0100) Subject: print update, alles liftm X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=8c3da7a503f87783e3614254649ed8c04eb0d519;p=cc1516.git print update, alles liftm --- diff --git a/src/main.prj b/src/main.prj index 7ba18dc..db2b7d3 100644 --- a/src/main.prj +++ b/src/main.prj @@ -686,8 +686,8 @@ OtherModules 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 @@ -700,8 +700,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: System.OS - Dir: {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Linux-64 + Name: _SystemDynamic + Dir: {Application}/lib/iTasks-SDK/Patches/Dynamics Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -714,8 +714,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: _SystemDynamic - Dir: {Application}/lib/iTasks-SDK/Patches/Dynamics + Name: GenEq + Dir: {Application}/lib/iTasks-SDK/Patches/Generics Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -728,7 +728,7 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: GenEq + Name: GenPrint Dir: {Application}/lib/iTasks-SDK/Patches/Generics Compiler NeverMemoryProfile: False @@ -742,8 +742,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: GenPrint - Dir: {Application}/lib/iTasks-SDK/Patches/Generics + Name: StdGeneric + Dir: {Application}/lib/iTasks-SDK/Patches/StdEnv Compiler NeverMemoryProfile: False NeverTimeProfile: False @@ -756,8 +756,8 @@ OtherModules ReuseUniqueNodes: True Fusion: False Module - Name: StdGeneric - Dir: {Application}/lib/iTasks-SDK/Patches/StdEnv + Name: StdMaybe + Dir: {Application}/lib/iTasks-SDK/Server/lib Compiler NeverMemoryProfile: False NeverTimeProfile: False diff --git a/src/parse.icl b/src/parse.icl index 0860819..c28fb4c 100644 --- a/src/parse.icl +++ b/src/parse.icl @@ -184,7 +184,7 @@ satTok t = top >>= \tok=:(pos, tv) -> if (eq t tok) (return tok) (fail (prin parseSepList :: TokenValue (Parser Token a) -> Parser Token [a] parseSepList sep p = - (some (p <* satTok sep) >>= \es->p >>= \e.pure $ reverse [e:es]) <|> + (liftM2 (\es->(\e->reverse [e:es])) (some (p <* satTok sep)) p) <|> (liftM pure p) <|> pure empty parseIdent :: Parser Token String @@ -204,8 +204,8 @@ instance print FunDecl where print (FunDecl i as t vs ss) = ["\n", i, " (":printersperse "," as] ++ [") :: ":print t] ++ - ["{":printersperse "\n\t" vs] ++ - ["\n":printStatements ss 1] ++ ["}"] + ["{\n\t":printersperse "\n\t" vs] ++ + ["\n":printStatements ss 1] ++ ["}\n"] printStatements :: [Stmt] Int -> [String] printStatements [] i = []