Skip to content

Instantly share code, notes, and snippets.

@xenophobia
Created May 8, 2014 09:03
Show Gist options
  • Save xenophobia/46ef13fac4402f80a6a0 to your computer and use it in GitHub Desktop.
Save xenophobia/46ef13fac4402f80a6a0 to your computer and use it in GitHub Desktop.
{-# Language TypeFamilies, KindSignatures, UndecidableInstances, DataKinds #-}
module TypeLevelIf where
import Data.Singletons.Types
type family Loop n :: *
type instance Loop a = Loop a
main :: IO ()
main = do
let a = undefined :: If 'True Int (Loop Int)
print "Hello"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment