
18 Aug
2012
18 Aug
'12
7:23 p.m.
On 18 August 2012 20:57, Bertram Felgenhauer
The natural encoding as a GADT would be as follows:
data Command result where GetFoo :: Double -> Command Foo PutFoo :: String -> Command Double
Right, that's exactly what I wrote at the end of my email. And then indeed dispatch would be `dispatch :: Command a -> Snap a`. But how do you derive an instance of Typeable and Read for this data type? The Foo and the Double conflict and give a type error.