On 18 August 2012 20:57, Bertram Felgenhauer <bertram.felgenha...@googlemail.com> wrote: > 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. _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users