agocorona / MFlow

(Haskell) Web application server with stateful, type safe user interactions and widget combinators
http://mflowdemo.herokuapp.com
Other
100 stars 12 forks source link

Building with ghc 7.8.2 #28

Closed ghost closed 10 years ago

ghost commented 10 years ago

Building with ghc 7.8.2 doesn't work because custom instances of Typeable aren't allowed, and they are being used in src/MFlow/Forms/Widgets.hs.

After some digging, I found this commit: b22651c167fb25c3aa126024e328c0894074c90e which fixes the problem, however the changes made by this commit seem to have been overwritten?

agocorona commented 10 years ago

Go to offending instance and remove the no ghc-7.8 code. It is commented in preprocessor directives

Leave this:

data Medit view m a = Medit (M.Map B.ByteString [(String,View view m a)]) deriving Typeable

The code is: data Medit view m a = Medit (M.Map B.ByteString [(String,View view m a)]) -- #ifdef GHC77 -- deriving Typeable -- #else instance (Typeable view, Typeable a) => Typeable (Medit view m a) where typeOf= \v -> mkTyConApp (mkTyCon3 "MFlow" "MFlow.Forms.Widgets" "Medit" ) [typeOf (tview v) ,typeOf (ta v)] where tview :: Medit v m a -> v tview= undefined tm :: Medit v m a -> m a tm= undefined ta :: Medit v m a -> a ta= undefined -- #endif

2014-04-25 7:02 GMT+02:00, cyberia- notifications@github.com:

Building with ghc 7.8.2 doesn't work because custom instances of Typeable aren't allowed, and they are being used in src/MFlow/Forms/Widgets.hs.

After some digging, I found this commit: b22651c167fb25c3aa126024e328c0894074c90e which fixes the problem, however the changes made by this commit seem to have been overwritten?


Reply to this email directly or view it on GitHub: https://github.com/agocorona/MFlow/issues/28

Alberto.

agocorona commented 10 years ago

Solved with cpphs and CPP preprocessor directives in Widgets.hs