From 5a1defbaf01a67be0c9220a7b0e3eef6cbd9b9fd Mon Sep 17 00:00:00 2001 From: Artyom Date: Tue, 31 Jan 2017 00:49:18 +0300 Subject: [PATCH] Get rid of old 'Uid' Nobody is going to do any migrations anyway --- src/Guide/Utils.hs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Guide/Utils.hs b/src/Guide/Utils.hs index 5d7359f..52b12c3 100644 --- a/src/Guide/Utils.hs +++ b/src/Guide/Utils.hs @@ -186,17 +186,7 @@ newtype Uid a = Uid {uidToText :: Text} deriving (Eq, Ord, Show, PathPiece, T.Buildable, Hashable, A.ToJSON) -- See Note [acid-state] -deriveSafeCopySimple 2 'extension ''Uid - -newtype Uid_v1 a = Uid_v1 {uidToText_v1 :: Text} - --- TODO: at the next migration change this to deriveSafeCopySimple! -deriveSafeCopy 1 'base ''Uid_v1 - -instance SafeCopy a => Migrate (Uid a) where - type MigrateFrom (Uid a) = Uid_v1 a - migrate Uid_v1{..} = Uid { - uidToText = uidToText_v1 } +deriveSafeCopySimple 2 'base ''Uid instance IsString (Uid a) where fromString = Uid . T.pack