Skip to content

Instantly share code, notes, and snippets.

@gergoerdi

gergoerdi/liftTypeRep

Last active Dec 7, 2020
Embed
What would you like to do?
liftTypeRep :: TypeRep a -> TH.Type
liftTypeRep ty = L.foldl AppT t0 [liftTypeRep ty' | SomeTypeRep ty' <- args]
where
(con, args) = splitApps ty
t0 = ConT $ mkName (tyConModule con <> "." <> tyConName con)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment