X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTSN%2FXML%2FInjuries.hs;h=a93d788dd60f8cda40244f9b1574976211b0c9a4;hb=71e4436c45b1694fbc550d5cfc2a0cde216610f6;hp=8b3f8d1ffc65ebbdfe244246050fb3fb46568036;hpb=3056bdb243254f0302703588213fd3d68d6115c9;p=dead%2Fhtsn-import.git diff --git a/src/TSN/XML/Injuries.hs b/src/TSN/XML/Injuries.hs index 8b3f8d1..a93d788 100644 --- a/src/TSN/XML/Injuries.hs +++ b/src/TSN/XML/Injuries.hs @@ -2,7 +2,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} @@ -15,8 +14,8 @@ -- automatically. The root message is not retained. -- module TSN.XML.Injuries ( - Message, - injuries_tests ) + injuries_tests, + pickle_message ) where import Data.Data ( Data ) @@ -32,7 +31,6 @@ import Test.Tasty ( TestTree, testGroup ) import Test.Tasty.HUnit ( (@?=), testCase ) import Text.XML.HXT.Core ( PU, - XmlPickler(..), xp4Tuple, xp6Tuple, xpAttr, @@ -111,8 +109,6 @@ pickle_injuries_team = from_tuple = uncurryN InjuriesTeam to_tuple m = (team_name m, team_league m) -instance XmlPickler InjuriesTeam where - xpickle = pickle_injuries_team pickle_listing :: PU Listing pickle_listing = @@ -126,9 +122,6 @@ pickle_listing = from_tuple = uncurryN Listing to_tuple l = (team l, teamno l, injuries l, updated l) -instance XmlPickler Listing where - xpickle = pickle_listing - pickle_message :: PU Message pickle_message = @@ -149,9 +142,6 @@ pickle_message = listings m, time_stamp m) -instance XmlPickler Message where - xpickle = pickle_message - -- * Tasty Tests @@ -169,7 +159,7 @@ test_pickle_of_unpickle_is_identity :: TestTree test_pickle_of_unpickle_is_identity = testCase "pickle composed with unpickle is the identity" $ do let path = "test/xml/injuriesxml.xml" - (expected :: [Message], actual) <- pickle_unpickle "message" path + (expected, actual) <- pickle_unpickle pickle_message path actual @?= expected