The two questions are in: Merge.hs Split.hs Sample test cases are in testMerge.hs testSplit.hs TestLib.hs is support file for the test files.