Skip to content

Instantly share code, notes, and snippets.

@ryantrinkle
Created November 28, 2020 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryantrinkle/0e28bc1e458f71fd69462c7581d4ec60 to your computer and use it in GitHub Desktop.
Save ryantrinkle/0e28bc1e458f71fd69462c7581d4ec60 to your computer and use it in GitHub Desktop.
data Numtype a = Numtype a
type family GetNumtype (n :: Numtype a) :: a where
GetNumtype ('Numtype a) = a
numtype :: forall (a :: Numtype *) (r :: *). (Num (GetNumtype a) => r) -> r
numtype = undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment