From a480f7ca6ed7eb3997a8618c8f174b97e4aaba71 Mon Sep 17 00:00:00 2001
From: Vincent Hanquez <vincent@typed.io>
Date: Sat, 26 Jan 2019 11:40:03 +0000
Subject: [PATCH] remove byteable

---
 Data/Git/Storage/Object.hs | 2 +-
 Data/Git/Types.hs          | 6 ++----
 git.cabal                  | 1 -
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/Data/Git/Storage/Object.hs b/Data/Git/Storage/Object.hs
index 42b77eb..90cad8d 100644
--- a/Data/Git/Storage/Object.hs
+++ b/Data/Git/Storage/Object.hs
@@ -265,7 +265,7 @@ treeWrite (Tree ents) = toLazyByteString $ mconcat $ concatMap writeTreeEnt ents
     where writeTreeEnt (ModePerm perm,name,ref) =
                 [ string7 (printf "%o" perm)
                 , string7 " "
-                , byteString $ toBytes name
+                , byteString $ getEntNameBytes name
                 , string7 "\0"
                 , byteString $ toBinary ref
                 ]
diff --git a/Data/Git/Types.hs b/Data/Git/Types.hs
index db0b94f..dd2afe6 100644
--- a/Data/Git/Types.hs
+++ b/Data/Git/Types.hs
@@ -19,6 +19,7 @@ module Data.Git.Types
     , Person(..)
     , EntName
     , entName
+    , getEntNameBytes
     , EntPath
     , entPathAppend
     -- * modeperm type
@@ -40,7 +41,6 @@ module Data.Git.Types
 
 import Data.Word
 import Data.Bits
-import Data.Byteable
 import Data.String
 import Data.ByteString (ByteString)
 import qualified Data.ByteString as B
@@ -147,14 +147,12 @@ data FilePermissions = FilePermissions
 type Perm = Word8
 
 -- | Entity name
-newtype EntName = EntName ByteString
+newtype EntName = EntName { getEntNameBytes :: ByteString }
     deriving (Eq,Ord)
 instance Show EntName where
     show (EntName e) = UTF8.toString e
 instance IsString EntName where
     fromString s = entName $ UTF8.fromString s
-instance Byteable EntName where
-    toBytes (EntName n) = n
 
 entName :: ByteString -> EntName
 entName bs
diff --git a/git.cabal b/git.cabal
index f0ee161..bb0466e 100644
--- a/git.cabal
+++ b/git.cabal
@@ -29,7 +29,6 @@ Library
   Build-Depends:     base >= 4 && < 5
                    , basement
                    , bytestring >= 0.9
-                   , byteable
                    , containers
                    , memory >= 0.13
                    , cryptonite >= 0.22
-- 
GitLab