begin type interop
This commit is contained in:
parent
6c4557289b
commit
c86f613ccc
6 changed files with 94 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
-- import Lib
|
||||
import Lib
|
||||
import Data.Text.Lazy (Text)
|
||||
import Network.Wai.Handler.Warp (Port)
|
||||
import Network.Wai.Middleware.RequestLogger (logStdoutDev)
|
||||
|
|
|
@ -18,6 +18,8 @@ extra-source-files:
|
|||
CHANGELOG.md
|
||||
|
||||
library
|
||||
exposed-modules:
|
||||
ElmskellTypes
|
||||
other-modules:
|
||||
Paths_hs_server
|
||||
autogen-modules:
|
||||
|
@ -30,6 +32,7 @@ library
|
|||
, blaze-html >=0.9.2 && <0.10
|
||||
, blaze-markup >=0.8.3 && <0.9
|
||||
, directory >=1.3.8 && <1.4
|
||||
, elm-bridge >=0.8.4 && <0.9
|
||||
, http-types >=0.12.4 && <0.13
|
||||
, scotty ==0.22.*
|
||||
, text >=2.1.1 && <2.2
|
||||
|
@ -51,6 +54,7 @@ executable hs-server-exe
|
|||
, blaze-html >=0.9.2 && <0.10
|
||||
, blaze-markup >=0.8.3 && <0.9
|
||||
, directory >=1.3.8 && <1.4
|
||||
, elm-bridge >=0.8.4 && <0.9
|
||||
, hs-server
|
||||
, http-types >=0.12.4 && <0.13
|
||||
, scotty ==0.22.*
|
||||
|
@ -74,6 +78,7 @@ test-suite hs-server-test
|
|||
, blaze-html >=0.9.2 && <0.10
|
||||
, blaze-markup >=0.8.3 && <0.9
|
||||
, directory >=1.3.8 && <1.4
|
||||
, elm-bridge >=0.8.4 && <0.9
|
||||
, hs-server
|
||||
, http-types >=0.12.4 && <0.13
|
||||
, scotty ==0.22.*
|
||||
|
|
20
backend/src/ElmskellTypes.hs
Normal file
20
backend/src/ElmskellTypes.hs
Normal file
|
@ -0,0 +1,20 @@
|
|||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module ElmskellTypes
|
||||
|
||||
import Elm.Derive
|
||||
import Elm.Module
|
||||
|
||||
data Foo
|
||||
= Foo
|
||||
{ name :: String
|
||||
, blablub :: Int
|
||||
} deriving (Show, Eq)
|
||||
|
||||
deriveBoth defaultOptions ''Foo
|
||||
|
||||
main :: IO ()
|
||||
main =
|
||||
putStrLn $ makeElmModule "Foo"
|
||||
[ DefineElm (Proxy :: Proxy Foo)
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue