mirror of
https://github.com/ilyakooo0/elm-bridge.git
synced 2024-09-11 14:05:55 +03:00
21 lines
367 B
Haskell
21 lines
367 B
Haskell
{-# LANGUAGE PackageImports #-}
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
import "elm-bridge" Elm.Derive
|
|
import "elm-bridge" Elm.Module
|
|
|
|
import Data.Proxy
|
|
|
|
data Foo
|
|
= Foo
|
|
{ f_name :: String
|
|
, f_blablub :: Int
|
|
} deriving (Show, Eq)
|
|
|
|
deriveBoth defaultOptions ''Foo
|
|
|
|
main :: IO ()
|
|
main =
|
|
putStrLn $ makeElmModule "Foo"
|
|
[ DefineElm (Proxy :: Proxy Foo)
|
|
]
|