git.iko.soy/typeable/postgresql-simple
on master help sign in
Use the FromField instance for Char in GenTypeInfo
ba0cd23Leon P Smith
tools/GenTypeInfo.hs+1−3
@@ -66,9 +66,7 @@ data TypeInfo = TypeInfo
66 }
66 }
67
67
68instance FromRow TypeInfo where
68instance FromRow TypeInfo where
69− fromRow = TypeInfo <$> field <*> charF <*> charF <*> field <*> field
69+ fromRow = TypeInfo <$> field <*> field <*> field <*> field <*> field
70− where charF = fieldWith (\_f dat -> return (B.head (unJust dat)))
71− unJust (Just x) = x
72
70
73type NameMap = Map.Map B.ByteString TypeInfo
71type NameMap = Map.Map B.ByteString TypeInfo
74
72