homepage: https://github.com/robrix/interval-functor
changelog-type: markdown
hash: 2a7c1a041bb1a3f9721334628424f5d75d7089f3fdab80815ffa30b4db9ffcce
test-bench-deps:
  base: -any
  hedgehog: -any
  interval-functor: -any
maintainer: rob.rix@me.com
synopsis: Intervals of functors.
changelog: ''
basic-deps:
  base: '>=4.10 && <5'
  transformers: ^>=0.5.6.2
all-versions:
- 0.0.0.0
author: Rob Rix
latest: 0.0.0.0
description-type: markdown
description: |
  # `interval-functor`

  This is a Haskell package defining an `Interval` datatype parameterized by the type of endpoints and the type of their coordinates. For example, it can represent a simple one-dimensional range:

  ```haskell
  import Data.Functor.Identity
  import Data.Functor.Interval

  zeroInterval :: Num a => Interval Identity a
  zeroInterval = point 0
  ```

  or a multi-dimensional region:

  ```haskell
  import Data.Functor.Interval
  import Linear.V3 -- from the linear package

  unitCube :: Num a => Interval V3 a
  unitCube = (-1)...1
  ```


  ## Development

  Development currently assumes a Mac with `ghc` 8.10 & `cabal` 3.0. You can install them directly, or use [`ghcup`](https://www.haskell.org/ghcup/). It should be possible to develop on other platforms and compilers, but I probably haven’t tried them myself.

  ```bash
  cabal build --enable-tests # initial build
  script/repl # load the library and tests in ghci
  ```

  Once the repl has loaded, you can run the tests with `:main`.

  ```
  λ :main
  ```

  Configuration exists for `ghcide`, which can be integrated into many editors.


  ## Advantages

  `interval-functor` separates the representation of the coordinates of an interval from the representation of the space the coordinates occur in. This makes it particularly suitable for consistent treatment of multi-dimensional intervals; operations like e.g. `union` extend naturally to multi-dimensional spaces.

  It is also thoroughly property tested and documented.
license-name: BSD-3-Clause

Update from Hackage at 2020-07-11T22:55:58Z
Update from Hackage at 2020-07-11T22:55:58Z
