type family Or

Run Settings
LanguageHaskell
Language Version
Run Command
{-# LANGUAGE AllowAmbiguousTypes, TypeApplications, ScopedTypeVariables, TypeFamilies, DataKinds #-} import Data.Typeable typeName :: forall a. Typeable a => String typeName = show . typeRep $ Proxy @a type family Or (x :: Bool) (y:: Bool) :: Bool where Or 'True y = 'True Or 'False y = y type family And (x :: Bool) (y:: Bool) :: Bool where And 'True y = y And 'False y = 'False type T = Or 'True 'False domeSomething :: Proxy 'True -> IO () domeSomething p = putStrLn $ show p main = domeSomething (Proxy :: Proxy (Or 'False (And 'True 'True))) >> putStrLn "..." five :: (a ~ Int) => a five = 5
Editor Settings
Theme
Key bindings
Full width
Lines