Merged branch master
authorpimjager <pim@pimjager.nl>
Mon, 29 Feb 2016 12:45:20 +0000 (13:45 +0100)
committerpimjager <pim@pimjager.nl>
Mon, 29 Feb 2016 12:45:20 +0000 (13:45 +0100)
1  2 
src/main.prj
src/parse.icl

diff --cc src/main.prj
@@@ -686,23 -685,9 +685,23 @@@ OtherModule
                        ReadableABC:    False
                        ReuseUniqueNodes:       True
                        Fusion: False
 +      Module
 +              Name:   StdMaybe
 +              Dir:    {Application}/lib/iTasks-SDK/Dependencies/clean-platform/src/libraries/OS-Independent/Deprecated/StdLib
 +              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/clean-platform/src/libraries/OS-Mac
+               Dir:    {Application}/lib/iTasks-SDK/Dependencies/Platform/OS-Linux-64
                Compiler
                        NeverMemoryProfile:     False
                        NeverTimeProfile:       False
diff --cc src/parse.icl
@@@ -173,9 -172,14 +173,15 @@@ trans2 t f = satTok t >>= \(_, r).pure 
  trans1 :: TokenValue a -> Parser Token a
  trans1 t r = trans2 t $ const r
  
 +derive gPrint TokenValue
+ derive gEq TokenValue
  satTok :: TokenValue -> Parser Token Token
- satTok t = top >>= \tok=:(pos, tv) -> if (t === tok) (return tok) (fail <?> (printToString t, pos))
 -satTok t = satisfy $ eq t
++satTok t = top >>= \tok=:(pos, tv) -> if (eq t tok) (return tok) (fail <?> (printToString t, pos))
+       where
+               eq (IdentToken _) (_, IdentToken _) = True
+               eq (NumberToken _) (_, NumberToken _) = True
+               eq (CharToken _) (_, CharToken _) = True
+               eq x (_, y) = gEq {|*|} x y
  
  parseSepList :: TokenValue (Parser Token a) -> Parser Token [a]
  parseSepList sep p =