packages feed

reflex-dom-core-0.4: reflex-dom-core.cabal

Name: reflex-dom-core
Version: 0.4
Synopsis: Functional Reactive Web Apps with Reflex
Description: Reflex-DOM is a Functional Reactive web framework based on the Reflex FRP engine
License: BSD3
License-file: LICENSE
Author: Ryan Trinkle
Maintainer: ryan.trinkle@gmail.com
Stability: Experimental
Category: FRP, Web, GUI, HTML, Javascript, Reactive, Reactivity, User Interfaces, User-interface
Build-type: Simple
Cabal-version: >=1.9.2
-- Deal with https://github.com/haskell/cabal/issues/2544 / https://github.com/haskell/cabal/issues/367
extra-source-files: src-ghc/Foreign/JavaScript/Internal/Utils.hs
                    src-ghcjs/Foreign/JavaScript/Internal/Utils.hs
                    src/Reflex/Dom/Xhr/Foreign.hs
                    src/Reflex/Dom/WebSocket/Foreign.hs
                    src/Reflex/Dom/Xhr/ResponseType.hs
                    src/Reflex/Dom/Xhr/Exception.hs

flag use-template-haskell
  description: Use template haskell to generate lenses
  default: True
  manual: True

flag use-reflex-optimizer
  description: Use the GHC plugin Reflex.Optimizer on some of the modules in the package.  This is still experimental.
  default: False
  manual: True

flag expose-all-unfoldings
  description: Build the library with -fexpose-all-unfoldings which can help client code specialize better
  default: False
  manual: True

flag profile-reflex
  description: Add a layer of profiling to all Reflex events in the system
  default: False
  manual: True

library
  hs-source-dirs: src
  build-depends:
    aeson >= 0.8 && < 1.4,
    base >= 4.7 && < 4.12,
    bifunctors >= 4.2 && < 6,
    bimap >= 0.3 && < 0.4,
    blaze-builder,
    bytestring == 0.10.*,
    containers == 0.5.*,
    constraints >= 0.9 && < 0.11,
    contravariant >= 1.4 && < 1.5,
    data-default >= 0.5 && < 0.8,
    dependent-map == 0.2.*,
    dependent-sum >= 0.3 && < 0.5,
    dependent-sum-template >= 0.0.0.4 && < 0.1,
    directory >= 1.2 && < 1.4,
    exception-transformers == 0.4.*,
    ghcjs-dom >= 0.9.1.0 && < 0.10,
    jsaddle >=0.9.0.0 && <0.10,
    -- keycode-0.2 has a bug on firefox
    keycode >= 0.2.1 && < 0.3,
    lens >= 4.7 && < 5,
    monad-control >= 1.0.1 && < 1.1,
    mtl >= 2.1 && < 2.3,
    primitive >= 0.5 && < 0.7,
    ref-tf == 0.4.*,
    reflex == 0.5.*,
    semigroups >= 0.16 && < 0.19,
    stm == 2.4.*,
    text == 1.2.*,
    these >= 0.4 && < 0.8,
    transformers >= 0.3 && < 0.6,
    network-uri >= 2.6.1 && < 2.7,
    zenc == 0.1.*

  if impl(ghcjs)
    hs-source-dirs: src-ghcjs
    build-depends:
      ghcjs-base,
      hashable == 1.2.*
  else
    hs-source-dirs: src-ghc
    if !os(windows)
      build-depends: unix == 2.7.*

  exposed-modules:
    Foreign.JavaScript.TH
    Foreign.JavaScript.Orphans
    Foreign.JavaScript.Utils
    Reflex.Dom.Builder.Class
    Reflex.Dom.Builder.Class.Events
    Reflex.Dom.Builder.Immediate
    Reflex.Dom.Builder.InputDisabled
    Reflex.Dom.Builder.Static
    Reflex.Dom.Class
    Reflex.Dom.Core
    Reflex.Dom.Location
    Reflex.Dom.Main
    Reflex.Dom.Modals.Class
    Reflex.Dom.Old
    Reflex.Dom.Prerender
    Reflex.Dom.Specializations
    Reflex.Dom.Time
    Reflex.Dom.WebSocket
    Reflex.Dom.WebSocket.Query
    Reflex.Dom.Widget
    Reflex.Dom.Widget.Basic
    Reflex.Dom.Widget.Input
    Reflex.Dom.Widget.Lazy
    Reflex.Dom.Widget.Resize
    Reflex.Dom.Xhr
  other-modules:
    Foreign.JavaScript.Internal.Utils
    Reflex.Dom.WebSocket.Foreign
    Reflex.Dom.Xhr.Foreign
    Reflex.Dom.Xhr.ResponseType
    Reflex.Dom.Xhr.Exception

  ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2 -ferror-spans -fspecialise-aggressively
  ghc-prof-options: -fprof-auto

  if flag(expose-all-unfoldings)
    ghc-options: -fexpose-all-unfoldings

  if flag(use-reflex-optimizer)
    ghc-options: -fplugin=Reflex.Optimizer

  if flag(profile-reflex)
    cpp-options: -DPROFILE_REFLEX

  if flag(use-template-haskell)
    build-depends:
      dependent-sum >= 0.3 && < 0.5,
      dependent-sum-template >= 0.0.0.5 && < 0.1,
      template-haskell
    other-extensions: TemplateHaskell
    cpp-options: -DUSE_TEMPLATE_HASKELL
    other-modules:
      Reflex.Dom.Builder.Class.TH
  else
    build-depends:
      dependent-sum == 0.4.*

test-suite hlint
  build-depends: base, hlint
  hs-source-dirs: test
  main-is: hlint.hs
  type: exitcode-stdio-1.0

test-suite gc
  build-depends: base
               , reflex
               , reflex-dom-core
               , jsaddle
               , jsaddle-warp
               , linux-namespaces
               , process
               , temporary
               , unix
  hs-source-dirs: test
  ghc-options: -rtsopts -with-rtsopts=-T -Wall -fwarn-tabs -funbox-strict-fields -O2 -ferror-spans
  ghc-prof-options: -fprof-auto -optP-DPROFILING
  main-is: gc.hs
  type: exitcode-stdio-1.0
  if !os(linux) || !arch(x86_64)
    buildable: False

source-repository head
  type: git
  location: https://github.com/reflex-frp/reflex-dom
  subdir: reflex-dom-core