Commit 52e1383d authored by Jun Matsushita's avatar Jun Matsushita

Blah

parent f214402b
==================== FINAL INTERFACE ====================
2016-09-07 12:12:38.229604 UTC
interface main@main:Main 7103
interface hash: 14c36ce77ae51b015d44521d37f7b65a
ABI hash: e9e60c20b4da3548e6cae8c206f8afe2
export-list hash: c1a3a2e9d10337bfffc65c94c6167e97
orphan hash: 693e9af84d3dfcc71e640e005bdc5e2e
flag hash: a060d6b08ab3a5949780ed3da409d298
sig of: Nothing
used TH splices: False
where
exports:
Main.main
module dependencies:
package dependencies: app-0.1.0.0@app_BAqDXPys9Fh2eOE9SLhGy1
base-4.8.2.0* ghc-prim-0.4.0.0 integer-gmp-1.0.0.0
mtl-2.2.1@mtl_Aue4leSeVkpKLsfHIV51E8
transformers-0.4.2.0@trans_GZTjP9K5WFq01xC9BAGQpF
orphans: base-4.8.2.0:GHC.Base base-4.8.2.0:GHC.Float
transformers-0.4.2.0@trans_GZTjP9K5WFq01xC9BAGQpF:Control.Monad.Trans.Error
family instance modules: base-4.8.2.0:Control.Applicative
base-4.8.2.0:Data.Either base-4.8.2.0:Data.Functor.Identity
base-4.8.2.0:Data.Monoid base-4.8.2.0:Data.Type.Equality
base-4.8.2.0:GHC.Generics
import -/ app-0.1.0.0@app_BAqDXPys9Fh2eOE9SLhGy1:Lib b145ea23e4c061d0b99bc2b884251056
import -/ base-4.8.2.0:Prelude 694dcaf039efe62df1c44834e2dbd2fb
import -/ base-4.8.2.0:System.IO 0899686bfc1d9ef72dff3de85e99862a
import -/ ghc-prim-0.4.0.0:GHC.Types 6b27fb3fdbd0e3f0925a4496c66513bb
792d01c3299830cd21187b61fa64d578
main :: GHC.Types.IO ()
{- Arity: 1, Strictness: <L,U>,
Unfolding: InlineRule (0, True, True)
Main.main1 `cast` (Sym (GHC.Types.NTCo:IO[0] <()>_R)) -}
ae34515df28531fe2c9bed4cb69f7e63
main1 ::
GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
{- Arity: 1, Strictness: <L,U>,
Unfolding: InlineRule (1, True, False)
(\ eta :: GHC.Prim.State# GHC.Prim.RealWorld[OneShot] ->
GHC.IO.Handle.Text.hPutStr2
GHC.IO.Handle.FD.stdout
Lib.evalVal
GHC.Types.True
eta) -}
8a08c6b4ddaaed1eccd86c1fd988d519
main2 ::
GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
{- Arity: 1,
Unfolding: (GHC.TopHandler.runMainIO1
@ ()
Main.main1 `cast` (Sym (GHC.Types.NTCo:IO[0] <()>_R))) -}
vectorised variables:
vectorised tycons:
vectorised reused tycons:
parallel variables:
parallel tycons:
trusted: safe
require own pkg trusted: False
module Paths_app (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
import Prelude
catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
catchIO = Exception.catch
version :: Version
version = Version [0,1,0,0] []
bindir, libdir, datadir, libexecdir, sysconfdir :: FilePath
bindir = "/Users/jun/dev/OII/hes/app/.stack-work/install/x86_64-osx/lts-6.15/7.10.3/bin"
libdir = "/Users/jun/dev/OII/hes/app/.stack-work/install/x86_64-osx/lts-6.15/7.10.3/lib/x86_64-osx-ghc-7.10.3/app-0.1.0.0-BAqDXPys9Fh2eOE9SLhGy1"
datadir = "/Users/jun/dev/OII/hes/app/.stack-work/install/x86_64-osx/lts-6.15/7.10.3/share/x86_64-osx-ghc-7.10.3/app-0.1.0.0"
libexecdir = "/Users/jun/dev/OII/hes/app/.stack-work/install/x86_64-osx/lts-6.15/7.10.3/libexec"
sysconfdir = "/Users/jun/dev/OII/hes/app/.stack-work/install/x86_64-osx/lts-6.15/7.10.3/etc"
getBinDir, getLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath
getBinDir = catchIO (getEnv "app_bindir") (\_ -> return bindir)
getLibDir = catchIO (getEnv "app_libdir") (\_ -> return libdir)
getDataDir = catchIO (getEnv "app_datadir") (\_ -> return datadir)
getLibexecDir = catchIO (getEnv "app_libexecdir") (\_ -> return libexecdir)
getSysconfDir = catchIO (getEnv "app_sysconfdir") (\_ -> return sysconfdir)
getDataFileName :: FilePath -> IO FilePath
getDataFileName name = do
dir <- getDataDir
return (dir ++ "/" ++ name)
/* DO NOT EDIT: This file is automatically generated by Cabal */
/* package base-4.8.2.0 */
#define VERSION_base "4.8.2.0"
#define MIN_VERSION_base(major1,major2,minor) (\
(major1) < 4 || \
(major1) == 4 && (major2) < 8 || \
(major1) == 4 && (major2) == 8 && (minor) <= 2)
/* package mtl-2.2.1 */
#define VERSION_mtl "2.2.1"
#define MIN_VERSION_mtl(major1,major2,minor) (\
(major1) < 2 || \
(major1) == 2 && (major2) < 2 || \
(major1) == 2 && (major2) == 2 && (minor) <= 1)
/* tool alex-3.1.4 */
#define TOOL_VERSION_alex "3.1.4"
#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\
(major1) < 3 || \
(major1) == 3 && (major2) < 1 || \
(major1) == 3 && (major2) == 1 && (minor) <= 4)
/* tool cpphs-1.20.1 */
#define TOOL_VERSION_cpphs "1.20.1"
#define MIN_TOOL_VERSION_cpphs(major1,major2,minor) (\
(major1) < 1 || \
(major1) == 1 && (major2) < 20 || \
(major1) == 1 && (major2) == 20 && (minor) <= 1)
/* tool gcc-4.2.1 */
#define TOOL_VERSION_gcc "4.2.1"
#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\
(major1) < 4 || \
(major1) == 4 && (major2) < 2 || \
(major1) == 4 && (major2) == 2 && (minor) <= 1)
/* tool ghc-7.10.3 */
#define TOOL_VERSION_ghc "7.10.3"
#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\
(major1) < 7 || \
(major1) == 7 && (major2) < 10 || \
(major1) == 7 && (major2) == 10 && (minor) <= 3)
/* tool ghc-pkg-7.10.3 */
#define TOOL_VERSION_ghc_pkg "7.10.3"
#define MIN_TOOL_VERSION_ghc_pkg(major1,major2,minor) (\
(major1) < 7 || \
(major1) == 7 && (major2) < 10 || \
(major1) == 7 && (major2) == 10 && (minor) <= 3)
/* tool haddock-2.16.1 */
#define TOOL_VERSION_haddock "2.16.1"
#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\
(major1) < 2 || \
(major1) == 2 && (major2) < 16 || \
(major1) == 2 && (major2) == 16 && (minor) <= 1)
/* tool happy-1.19.5 */
#define TOOL_VERSION_happy "1.19.5"
#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\
(major1) < 1 || \
(major1) == 1 && (major2) < 19 || \
(major1) == 1 && (major2) == 19 && (minor) <= 5)
/* tool hpc-0.67 */
#define TOOL_VERSION_hpc "0.67"
#define MIN_TOOL_VERSION_hpc(major1,major2,minor) (\
(major1) < 0 || \
(major1) == 0 && (major2) < 67 || \
(major1) == 0 && (major2) == 67 && (minor) <= 0)
/* tool hsc2hs-0.67 */
#define TOOL_VERSION_hsc2hs "0.67"
#define MIN_TOOL_VERSION_hsc2hs(major1,major2,minor) (\
(major1) < 0 || \
(major1) == 0 && (major2) < 67 || \
(major1) == 0 && (major2) == 67 && (minor) <= 0)
/* tool hscolour-1.24 */
#define TOOL_VERSION_hscolour "1.24"
#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\
(major1) < 1 || \
(major1) == 1 && (major2) < 24 || \
(major1) == 1 && (major2) == 24 && (minor) <= 0)
/* tool pkg-config-0.26 */
#define TOOL_VERSION_pkg_config "0.26"
#define MIN_TOOL_VERSION_pkg_config(major1,major2,minor) (\
(major1) < 0 || \
(major1) == 0 && (major2) < 26 || \
(major1) == 0 && (major2) == 26 && (minor) <= 0)
#define CURRENT_PACKAGE_KEY "app_BAqDXPys9Fh2eOE9SLhGy1"
==================== FINAL INTERFACE ====================
2016-09-07 12:12:37.537613 UTC
interface app_BAqDXPys9Fh2eOE9SLhGy1:Lib 7103
interface hash: 9542605353fe173c030551cf7c548630
ABI hash: b145ea23e4c061d0b99bc2b884251056
export-list hash: 2daa4167844fc3409bc078f8a2c7b81c
orphan hash: 693e9af84d3dfcc71e640e005bdc5e2e
flag hash: 4c0a7b65a6dddbc4161c2e2bfabe3dc3
sig of: Nothing
used TH splices: False
where
exports:
Lib.evalVal
Lib.idVal
module dependencies:
package dependencies: base-4.8.2.0* ghc-prim-0.4.0.0
integer-gmp-1.0.0.0 mtl-2.2.1@mtl_Aue4leSeVkpKLsfHIV51E8
transformers-0.4.2.0@trans_GZTjP9K5WFq01xC9BAGQpF
orphans: base-4.8.2.0:GHC.Base base-4.8.2.0:GHC.Float
transformers-0.4.2.0@trans_GZTjP9K5WFq01xC9BAGQpF:Control.Monad.Trans.Error
family instance modules: base-4.8.2.0:Control.Applicative
base-4.8.2.0:Data.Either base-4.8.2.0:Data.Functor.Identity
base-4.8.2.0:Data.Monoid base-4.8.2.0:Data.Type.Equality
base-4.8.2.0:GHC.Generics
import -/ base-4.8.2.0:GHC.Base 1db77db5dae73d8c424c85b09fbadb89
import -/ base-4.8.2.0:Prelude 694dcaf039efe62df1c44834e2dbd2fb
import -/ mtl-2.2.1@mtl_Aue4leSeVkpKLsfHIV51E8:Control.Monad.State 3c8114545920fee1e57c3d7a07c2d0d7
import -/ transformers-0.4.2.0@trans_GZTjP9K5WFq01xC9BAGQpF:Control.Monad.Trans.State.Lazy a0ae9990521f3719d0ffc837d271b7a5
11f926cf47c6269c63952ee659685afb
evalVal :: GHC.Base.String
{- Unfolding: (GHC.CString.unpackCString# "hello"#) -}
97a3659379ce9a65d7b21e530383204a
idVal ::
Control.Monad.Trans.State.Lazy.State GHC.Types.Int GHC.Base.String
{- Arity: 1, Strictness: <L,U>m,
Unfolding: InlineRule (0, True, True)
Lib.idVal1
`cast`
(Trans
(<GHC.Types.Int>_R
->_R Sym (Data.Functor.Identity.NTCo:Identity[0]
<(GHC.Base.String, GHC.Types.Int)>_R))
(Sym (Control.Monad.Trans.State.Lazy.NTCo:StateT[0]
<GHC.Types.Int>_N
<Data.Functor.Identity.Identity>_R
<GHC.Base.String>_N))) -}
b9705a7b57376acddfed8911581716b5
idVal1 :: GHC.Types.Int -> (GHC.Base.String, GHC.Types.Int)
{- Arity: 1, Strictness: <L,U>m,
Unfolding: InlineRule (1, True, False)
(\ eta :: GHC.Types.Int -> (Lib.evalVal, eta)) -}
vectorised variables:
vectorised tycons:
vectorised reused tycons:
parallel variables:
parallel tycons:
trusted: safe
require own pkg trusted: False
name: app
version: 0.1.0.0
id: app-0.1.0.0-inplace
key: app_BAqDXPys9Fh2eOE9SLhGy1
license: BSD3
copyright: 2016 Author name here
maintainer: example@example.com
homepage: https://github.com/githubuser/app#readme
synopsis: Initial project template from stack
description:
Please see README.md
category: Web
author: Author name here
exposed: True
exposed-modules:
Lib
trusted: False
import-dirs: /Users/jun/dev/OII/hes/app/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build
library-dirs: /Users/jun/dev/OII/hes/app/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build
data-dir: /Users/jun/dev/OII/hes/app
hs-libraries: HSapp-0.1.0.0-BAqDXPys9Fh2eOE9SLhGy1
depends:
base-4.8.2.0-cc43d8e06aa74e9c4c0132becc49ee25
mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219
haddock-interfaces: /Users/jun/dev/OII/hes/app/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/doc/html/app/app.haddock
haddock-html: /Users/jun/dev/OII/hes/app/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/doc/html/app
name: app
version: 0.1.0.0
id: app-0.1.0.0-07ba7a0f32e1180712beec316ab8367c
key: app_BAqDXPys9Fh2eOE9SLhGy1
license: BSD3
copyright: 2016 Author name here
maintainer: example@example.com
homepage: https://github.com/githubuser/app#readme
synopsis: Initial project template from stack
description:
Please see README.md
category: Web
author: Author name here
exposed: True
exposed-modules:
Lib
trusted: False
import-dirs: /Users/jun/dev/OII/hes/app/.stack-work/install/x86_64-osx/lts-6.15/7.10.3/lib/x86_64-osx-ghc-7.10.3/app-0.1.0.0-BAqDXPys9Fh2eOE9SLhGy1
library-dirs: /Users/jun/dev/OII/hes/app/.stack-work/install/x86_64-osx/lts-6.15/7.10.3/lib/x86_64-osx-ghc-7.10.3/app-0.1.0.0-BAqDXPys9Fh2eOE9SLhGy1
data-dir: /Users/jun/dev/OII/hes/app/.stack-work/install/x86_64-osx/lts-6.15/7.10.3/share/x86_64-osx-ghc-7.10.3/app-0.1.0.0
hs-libraries: HSapp-0.1.0.0-BAqDXPys9Fh2eOE9SLhGy1
depends:
base-4.8.2.0-cc43d8e06aa74e9c4c0132becc49ee25
mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219
haddock-interfaces: /Users/jun/dev/OII/hes/app/.stack-work/install/x86_64-osx/lts-6.15/7.10.3/doc/app-0.1.0.0/app.haddock
haddock-html: /Users/jun/dev/OII/hes/app/.stack-work/install/x86_64-osx/lts-6.15/7.10.3/doc/app-0.1.0.0
Copyright Author name here (c) 2016
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Author name here nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
name: hes
name: app
version: 0.1.0.0
synopsis: Initial project template from stack
description: Please see README.md
homepage: https://github.com/githubuser/hes#readme
homepage: https://github.com/githubuser/app#readme
license: BSD3
license-file: LICENSE
author: Author name here
......@@ -17,25 +17,26 @@ library
hs-source-dirs: src
exposed-modules: Lib
build-depends: base >= 4.7 && < 5
, mtl
default-language: Haskell2010
executable hes-exe
executable app-exe
hs-source-dirs: app
main-is: Main.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends: base
, hes
, app
default-language: Haskell2010
test-suite hes-test
test-suite app-test
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: base
, hes
, app
ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010
source-repository head
type: git
location: https://github.com/githubuser/hes
location: https://github.com/githubuser/app
......@@ -3,4 +3,4 @@ module Main where
import Lib
main :: IO ()
main = someFunc
main = putStrLn evalVal
module Lib
( idVal, evalVal
) where
import Control.Monad.State
idVal :: State Int String
idVal = return "hello"
evalVal :: String
evalVal = evalState idVal 0
module Lib
( someFunc
) where
someFunc :: IO ()
someFunc = putStrLn "someFunc"
name: hevents
synopsis: Base building blocks for building event-sourced services in Haskell
synopsis: Base building blocks for building event-sourced services in Haskell
description:
HEvents provide needed machinery to build Event Sourced Web Services in Haskell.
......@@ -9,13 +9,13 @@ description:
the service through a REST interface, provide logs and metrics...
HEvents is based on some other great packages:
* <https://hackage.haskell.org/package/extensible-effects-1.11.0.2 extensible-effects> provides the
type-level tooling anc conceptual framework for composing individual effects into a full-stack
framework
* <http://haskell-servant.readthedocs.io/en/stable/ servant> provides the RESTful API infrastructure.
version: 0.2.0.0
license: MIT
license-file: LICENSE
......@@ -63,6 +63,8 @@ Library
, DataKinds
ghc-options: -Wall -fno-warn-orphans -auto-all -caf-all
Test-Suite tests
Default-Language: Haskell2010
hs-source-dirs: test
......@@ -152,5 +154,50 @@ Executable store
, test-framework-quickcheck2
, text
, time
, wai
, wai
Executable demo
Default-Language: Haskell2010
hs-source-dirs: test/Hevents/Eff
default-extensions:
OverloadedStrings, FlexibleContexts , FlexibleInstances, FunctionalDependencies, GeneralizedNewtypeDeriving
, MultiParamTypeClasses, RankNTypes, RecordWildCards, TypeFamilies, TypeOperators, UndecidableInstances, GADTs
, DataKinds
main-is: Demo.hs
ghc-options: -threaded -Wall -fno-warn-orphans -rtsopts
build-depends: HUnit
, QuickCheck
, aeson
, async
, base
, binary
, bytestring
, bytestring-conversion
, cereal
, clock
, containers
, data-default
, directory
, either
, exceptions
, extensible-effects
, filepath
, free
, hevents
, hspec
, hspec-wai
, http-client
, http-types
, lens
, mtl
, servant
, servant-client
, servant-server
, stm
, test-framework
, test-framework-hunit
, test-framework-quickcheck2
, text
, time
, wai
......@@ -4,7 +4,7 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
module Hevents.Eff.Demo where
module Main where
-- * Imports, stuff to make the compiler happy
......@@ -14,15 +14,15 @@ import Control.Concurrent.STM
import Control.Exception (finally, throwIO)
import Control.Monad.Except
import qualified Control.Monad.State as ST
import Control.Monad.Trans.Either
-- import Control.Monad.Trans.Either
import qualified Data.ByteString.Builder as BS
import Data.Either (rights)
import Data.Proxy
import Data.Serialize (Serialize, get, put)
import Data.Typeable
-- import Data.Typeable
import Data.Void
import Hevents.Eff as W
import Network.HTTP.Client (Manager, defaultManagerSettings,
import Network.HTTP.Client ( defaultManagerSettings,
newManager)
import Prelude hiding (init, (.))
import Servant
......@@ -120,7 +120,7 @@ prepareContext = (,) <$>
-- defines how to interpret our action model in terms of actual services
type EventSourced m a = Eff (State m :> Store :> Exc ServantErr :> Lift STM :> Void) a
type EventSourced m a = Eff (State m W.:> Store W.:> Exc ServantErr W.:> Lift STM W.:> Void) a
interpret GetCounter = getCounter
interpret (IncCounter n) = increment n
......@@ -152,9 +152,9 @@ instance Versionable ECounter
-- * Expose our counter services through a REST API
type CounterApi = "counter" :> (Get '[JSON] Int
:<|> "increment" :> Capture "inc" Int :> Get '[JSON] Int
:<|> "decrement" :> Capture "dec" Int :> Get '[JSON] Int)
type CounterApi = "counter" Servant.:> (Get '[JSON] Int
:<|> "increment" Servant.:> Capture "inc" Int Servant.:> Get '[JSON] Int
:<|> "decrement" Servant.:> Capture "dec" Int Servant.:> Get '[JSON] Int)
counterApi :: Proxy CounterApi
counterApi = Proxy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment