Skip to content

Instantly share code, notes, and snippets.

@googleson78
Created November 18, 2020 16:55
Show Gist options
  • Save googleson78/33047443af2e6cd3c8ebd6891c6d84ec to your computer and use it in GitHub Desktop.
Save googleson78/33047443af2e6cd3c8ebd6891c6d84ec to your computer and use it in GitHub Desktop.
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
type family Ambiguous (a :: k) :: b where
Ambiguous x = x
toInteger' :: Integral (Ambiguous a) => Ambiguous a -> Integer
toInteger' = toInteger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment