Skip to content

Instantly share code, notes, and snippets.

@konn
Created October 1, 2019 10:40
Show Gist options
  • Save konn/d6e88cd21a41813544d89e5005f846de to your computer and use it in GitHub Desktop.
Save konn/d6e88cd21a41813544d89e5005f846de to your computer and use it in GitHub Desktop.
{-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, GADTs, DeriveDataTypeable, TypeApplications #-}
data Foo (a :: Maybe b) where { Any :: Foo a; Bang :: Foo (Just t) }
newtype F a (t :: Maybe s) (u :: Foo t)
= F { runF :: a} deriving (Show, Eq, Ord, Typeable)
main :: IO ()
main = print $ typeRep $ Proxy @(F Int ('Just ()) Any)
-- ~> No instance for (Typeable (F2 Int ('Just ())))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment