Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ instance Hashable TypeFingerprint where
hashWithSalt s (CustomFingerprint x) = hashWithSalt s (3 :: Int, x)

typeableTypename :: (Typeable a) => f a -> TypeName
typeableTypename = packName . intercalate "" . fmap (pack . tyConName . replacePairCon) . getTypeConstructors
typeableTypename = packName . intercalate "" . fmap (pack . dropLeadingTick . tyConName . replacePairCon) . getTypeConstructors

toCategory :: CatType c a -> TypeCategory
toCategory InputType = IN
Expand All @@ -92,6 +92,10 @@ typeableFingerprint p =
getTypeConstructors :: (Typeable a) => f a -> [TyCon]
getTypeConstructors = ignoreResolver . splitTyConApp . typeRep

-- Filter out ticks from promoted constructors
dropLeadingTick :: String -> String
dropLeadingTick = Prelude.dropWhile (== '\'')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alleksandrgall whycould you please describe problem? and add tests?


rep :: forall k (a :: k) f. (Typeable a) => f a -> TyCon
rep = typeRepTyCon . typeRep

Expand Down