Permalink
Browse files

Initial work to get snaplet-fay running with fay 0.12. Some FFI decod…

…ing issues in fay-jquery and typechecking problems with Fay that need to be fixed in those packages
  • Loading branch information...
bergmark committed Feb 2, 2013
1 parent 743fdd8 commit 7bfa3f7c1bba9d9a9c261a1ae0fc88be69833be1
View
@@ -15,25 +15,25 @@ Flag development
Default: False
Executable example
- hs-source-dirs: src snaplets/fay/src
+ hs-source-dirs: src, snaplets/fay/src
main-is: Main.hs
Build-depends:
base >= 4 && < 5
- , aeson == 0.6.*
- , bytestring == 0.9.*
- , heist >= 0.8 && < 0.11
- , lens >= 3.7 && < 4
- , MonadCatchIO-transformers >= 0.2.1 && < 0.4
- , mtl == 2.*
- , snap >= 0.9 && < 0.11
- , snap-core == 0.9.*
- , snap-server == 0.9.*
- , snap-loader-static == 0.9.*
+ , aeson >= 0.6
+ , bytestring >= 0.9
+ , heist >= 0.8
+ , lens >= 3.7
+ , MonadCatchIO-transformers >= 0.2.1
+ , mtl >= 2
+ , snap >= 0.9
+ , snap-core >= 0.9
+ , snap-server >= 0.9
+ , snap-loader-static >= 0.9
, snaplet-fay >= 0.3.0.1
, fay
, fay-jquery
- , text == 0.11.*
+ , text >= 0.11
, time >= 1.1 && < 1.5
, xmlhtml >= 0.1
@@ -17,4 +17,9 @@ prettyPrint = on
# Paths are relative to the root of the snap application.
# snaplets/fay/src will always be checked for imports.
# Default is "" meaning no additional directories will be checked.
-includeDirs = "cabal-dev/share/fay-jquery-0.1.0.0/src"
+includeDirs = ""
+# A comma separated list of Fay package names.
+# This gives the same result as using includeDirs,
+# except Fay figures out the paths for you.
+# Default is "" meaning no other Fay packages will be used.
+packages = "fay-jquery"
@@ -1,12 +1,18 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE StandaloneDeriving #-}
+{-# LANGUAGE CPP #-}
module Application.SharedTypes where
+#ifdef FAY
+import FFI
+import Prelude
+#else
import Language.Fay.FFI
-import Language.Fay.Prelude
+#endif
+import Data.Data
+
data Time = Time { time :: String }
deriving (Read,Data,Typeable,Show)
Oops, something went wrong.

0 comments on commit 7bfa3f7

Please sign in to comment.