Skip to content

Commit

Permalink
feat(runtime): add http frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
symbiont-stevan-andjelkovic committed Jun 3, 2021
1 parent d1188a5 commit e028770
Showing 1 changed file with 15 additions and 28 deletions.
43 changes: 15 additions & 28 deletions src/runtime-prototype/stunt-double.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -16,62 +16,53 @@ build-type: Simple
extra-source-files: CHANGELOG.md
tested-with: GHC ==8.10.4

flag http
description: Enable http transport support
default: True

library
hs-source-dirs: src/
exposed-modules:
StuntDouble
StuntDouble.Actor
StuntDouble.ActorMap
StuntDouble.Actor.State
StuntDouble.ActorMap
StuntDouble.Datatype
StuntDouble.Time
StuntDouble.Random
StuntDouble.Log
StuntDouble.EventLoop
StuntDouble.EventLoop.AsyncIOHandler
StuntDouble.EventLoop.Event
StuntDouble.EventLoop.InboundHandler
StuntDouble.EventLoop.State
StuntDouble.EventLoop.Transport
StuntDouble.EventLoop.Transport.Http
StuntDouble.FreeMonad
StuntDouble.Frontend.Http
StuntDouble.Log
StuntDouble.Message
StuntDouble.Random
StuntDouble.Reference
StuntDouble.Supervisor

if flag(http)
exposed-modules:
StuntDouble.EventLoop.Transport.Http
StuntDouble.Time

-- GHC boot library dependencies:
-- (https://gitlab.haskell.org/ghc/ghc/-/blob/master/packages)
build-depends:
base >=4.14 && <4.15
, containers
, filepath
, mtl
, stm
, text
, time
, mtl
, unix
, stm

build-depends:
aeson
, async
, bytestring
, heaps
, http-client
, http-types
, random
, unordered-containers
, heaps

if flag(http)
build-depends:
bytestring
, http-client
, http-types
, wai
, warp
, wai
, warp

default-language: Haskell2010

Expand All @@ -91,14 +82,10 @@ test-suite test

other-modules:
StuntDouble.ActorMapTest
StuntDouble.EventLoop.Transport.HttpTest
StuntDouble.EventLoop.TransportTest
StuntDouble.SchedulerTest
TastyDiscover
-- TODO(stevan: This doesn't work, because tasty-discovery finds the module
-- and tells cabal it's needed...
if flag(http)
other-modules:
StuntDouble.EventLoop.Transport.HttpTest

ghc-options: -threaded -rtsopts -with-rtsopts=-N -fno-ignore-asserts
default-language: Haskell2010
Expand Down

0 comments on commit e028770

Please sign in to comment.