]> gitweb.michael.orlitzky.com - dead/htsn-import.git/blobdiff - src/TSN/XML/Injuries.hs
Fixing compiler warnings by exporting stuff that shouldn't be exported (woo).
[dead/htsn-import.git] / src / TSN / XML / Injuries.hs
index b1b7b2225b04524bf4952abec61d151039c0d19e..8002799c62e0e26f4bb7217740ac4651aaa0235f 100644 (file)
@@ -2,7 +2,6 @@
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE GADTs #-}
 {-# LANGUAGE QuasiQuotes #-}
-{-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE TypeFamilies #-}
 --   automatically. The root message is not retained.
 --
 module TSN.XML.Injuries (
-  Message,
-  injuries_tests )
+  injuries_tests,
+  pickle_message,
+  -- * WARNING: these are private but exported to silence warnings
+  ListingConstructor(..) )
 where
 
 import Data.Data ( Data )
@@ -32,7 +33,6 @@ import Test.Tasty ( TestTree, testGroup )
 import Test.Tasty.HUnit ( (@?=), testCase )
 import Text.XML.HXT.Core (
   PU,
-  XmlPickler(..),
   xp4Tuple,
   xp6Tuple,
   xpAttr,
@@ -87,7 +87,7 @@ instance DbImport Message where
 
 mkPersist defaultCodegenConfig [groundhog|
 - entity: Listing
-  dbName: injuries
+  dbName: injuries_listings
   constructors:
     - name: Listing
       fields:
@@ -111,8 +111,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 +124,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 +144,6 @@ pickle_message =
                   listings m,
                   time_stamp m)
 
-instance XmlPickler Message where
-  xpickle = pickle_message
-
 
 
 -- * Tasty Tests
@@ -169,7 +161,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