-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathGenerateElm.hs
26 lines (24 loc) · 1 KB
/
GenerateElm.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
import Data.List
import Data.Text hiding ( intercalate
, map
)
import Servant.Elm ( DefineElm(DefineElm)
, Proxy(Proxy)
, defaultOptions
, defElmImports
, defElmOptions
, deriveBoth
, generateElmModuleWith
)
import Api
main :: IO ()
main = generateElmModuleWith
defElmOptions
["Api"]
defElmImports
"client/src"
[DefineElm (Proxy :: Proxy Item), DefineElm (Proxy :: Proxy ItemId)]
(Proxy :: Proxy Api)