[Added a regression test for a bug introduced while replacing Subst by a Data.Map
tobias@goedderz.info**20150213104721
 Ignore-this: 989de578539492fac02cfedf7c6eea8e
] adddir ./regression_tests
addfile ./regression_tests/Examples.hs
hunk ./regression_tests/Examples.hs 1
+module Err where
+
+import qualified Prelude
+
+-- last is used as background knowledge. This is not useful at all, but triggers
+-- the error this test is for.
+last :: [a] -> a
+last [x]    = x
+last (x:xs) = last xs
+
+-- These are IO examples for an automatic bidirectionalization (on lists): given
+-- a function get :: [a] -> a (in this case, get = last), look for
+-- a corresponding put function. These examples are taken from the GetPut law:
+--   put s (get s) = s      (GetPut)
+-- Variables occuring in both s and get s are renamed in the first parameter, to
+-- allow for changes after get-ing to reflect in the result of put.
+put_last :: [a] -> a -> [a]
+put_last [a']           a = [a]
+put_last [a, b']        b = [a, b]
+put_last [a, b, c']     c = [a, b, c]
+put_last [a, b, c, d']  d = [a, b, c, d]
addfile ./regression_tests/put_last.bat
hunk ./regression_tests/put_last.bat 1
+:load regression_tests/Examples.hs
+:set +simplify
+:generalise put_last with last
+:quit
addfile ./regression_tests/put_last.out
hunk ./regression_tests/put_last.out 1
+
+  .___                   ._ ._             
+  |   | ____  ____ ._____| || |  ._       
+  |   |/ __ \/  _ \|  __ \ || | _| |__ 
+  |   / /_/  ) <_> )  | \/ || |/_   _/   
+  |___\___  /\____/|__|  |_||_|  |_|    
+     /_____/                v0.8
+
+Welcome to IgorII. 
+Running IgorII in batch mode with file: regression_tests/put_last.bat
+
+      [1m- - - - START SYNTHESIS WITH - - - -[0m
+
+Targets              'put_last'
+Background           'last'
+Simplified           True
+Greedy rule-splitting False
+Enhanced             False
+Use paramorphisms    False
+Compare rec args     AWise
+DumpLog              False
+Debug                False
+Maximal tiers        0
+Maximal loops        -1
+
+      [1m- - - - - - - FINISHED - - - - - - -[0m
+
+             put_last     in 826     loops
+             
+
+                 [1mHYPOTHESIS 1 of 1[0m
+
+put_last [_] a1 = [a1]
+put_last (a0 : (a1 : a2)) a3 = a0 : put_last (a1 : a2) a3
+
+...batch processing finished.
+Bye.