]> gitweb.michael.orlitzky.com - dead/htsn-import.git/commitdiff
Use real fixed-vector-hetero dependency.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 8 Jan 2015 04:29:51 +0000 (23:29 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 8 Jan 2015 04:29:51 +0000 (23:29 -0500)
htsn-import.cabal
src/TSN/XML/InjuriesDetail.hs

index 205a5c2f9475e0f1c18daf2c0d2084ff0dbf6d15..f4fd26252249e0a98b1737574d6c2847bce400ab 100644 (file)
@@ -253,7 +253,7 @@ executable htsn-import
     configurator                >= 0.2,
     directory                   >= 1.2,
     filepath                    >= 1.3,
-    fixed-vector-hetero         >= 0.2,
+    fixed-vector-hetero         >= 0.3,
     hslogger                    >= 1.2,
     htsn-common                 >= 0.0.1,
     hxt                         >= 9.3,
@@ -345,7 +345,7 @@ test-suite testsuite
     configurator                >= 0.2,
     directory                   >= 1.2,
     filepath                    >= 1.3,
-    fixed-vector-hetero         >= 0.2,
+    fixed-vector-hetero         >= 0.3,
     hslogger                    >= 1.2,
     htsn-common                 >= 0.0.1,
     hxt                         >= 9.3,
@@ -420,7 +420,7 @@ test-suite shelltests
     configurator                >= 0.2,
     directory                   >= 1.2,
     filepath                    >= 1.3,
-    fixed-vector-hetero         >= 0.2,
+    fixed-vector-hetero         >= 0.3,
     hslogger                    >= 1.2,
     htsn-common                 >= 0.0.1,
     hxt                         >= 9.3,
index 4dda8442eca62840a55cc3ed14e51265f6eb48e2..3f1ba167e8d8a2d2c29bc7656063a04f032527e0 100644 (file)
@@ -27,8 +27,12 @@ where
 import Control.Monad ( forM_ )
 import Data.Time ( UTCTime )
 import Data.Tuple.Curry ( uncurryN )
-import qualified Data.Vector.HFixed as H ( HVector, cons, convert, tail )
-import qualified Data.Vector.HFixed.Cont as H (ContVec)
+import qualified Data.Vector.HFixed as H (
+  HVector,
+  asCVec,
+  cons,
+  convert,
+  tail )
 import Database.Groundhog (
   DefaultKey,
   countAll,
@@ -276,13 +280,13 @@ instance Child InjuriesDetailListingPlayerListingXml where
 instance FromXmlFk InjuriesDetailListingPlayerListingXml where
   -- | To construct a 'InjuriesDetailListingPlayerListing' from a
   --   'InjuriesDetailListingPlayerListingXml' we need to supply a
-  --   foreign key to an 'InjuriesDetailListing'.
+  --   foreign key to an 'InjuriesDetailListing' after dropping the
+  --   '_xml_player_team_id'.
   --
-  from_xml_fk fk = (H.cons fk) . asCont . H.tail
-    where
-      -- Should be in the library soon.
-      asCont :: H.ContVec a -> H.ContVec a
-      asCont = id
+  --   The 'H.asCVec' trick allows type inference to proceed in the
+  --   middle of two different magics.
+  --
+  from_xml_fk fk = (H.cons fk) . H.asCVec . H.tail
 
 
 -- | This lets us insert the XML representation