Created
December 23, 2014 07:21
-
-
Save k-bx/d0319a4bc0054516ab17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE GADTs #-} | |
data Req = A | B | |
data ReqData :: Req -> * where | |
ReqDataA :: ReqData A | |
ReqDataB :: ReqData B | |
data Resp = Ra | Rb | Rc | |
data RespData :: Resp -> * where | |
RespDataA :: RespData Ra | |
RespDataB :: RespData Rb | |
RespDataC :: RespData Rc | |
sendA :: ReqData A -> RespData Ra | |
sendA = undefined | |
unSendA :: RespData Ra -> ReqData A | |
unSendA = undefined | |
main :: IO () | |
main = do | |
let a = (unSendA (sendA ReqDataA)) :: ReqData A | |
putStrLn "hello" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment