Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {-# LANGUAGE TypeOperators, GADTs, Strict #-}
- module Main where
- data (:+:) f g a = Inl !(f a) | Inr !(g a)
- data A
- data B
- data Foo l where
- Foo :: Foo A
- data Bar l where
- Bar :: Bar B
- type Sig = Foo :+: Bar
- fun :: Sig B -> Int
- fun (Inr Bar) = 1
- main :: IO ()
- main = return ()
Add Comment
Please, Sign In to add comment