homepage: https://anonscm.debian.org/cgit/users/kaction-guest/haskell-once.git
changelog-type: ''
hash: c45f7ee109c806fddcba2236415834e799befcabfd914f81374dc7cdc0f57005
test-bench-deps: {}
maintainer: KAction@gnu.org
synopsis: memoization for IO actions and functions
changelog: ''
basic-deps:
  base: ! '>=4.7 && <5'
  unordered-containers: ! '>=0.2'
  containers: ! '>=0.5'
  hashable: ! '>=1.2'
  template-haskell: ! '>=2.10'
all-versions:
- '0.1.0.0'
- '0.2'
author: Dmitry Bogatov
latest: '0.2'
description-type: haddock
description: Please see Control.Once for examples
license-name: GPL-3

homepage: https://gitlab.com/kaction/haskell-once
changelog-type: ''
hash: 5fff6e0e1046eb12b780c1bdd06245d720c313adeff39e9bc8f48b57b0443389
test-bench-deps: {}
maintainer: KAction@debian.org
synopsis: memoization for IO actions and functions
changelog: ''
basic-deps:
  base: ! '>=4.7 && <5'
  unordered-containers: ! '>=0.2'
  containers: ! '>=0.5'
  hashable: ! '>=1.2'
  template-haskell: ! '>=2.10'
all-versions:
- '0.1.0.0'
- '0.2'
- '0.3'
author: Dmitry Bogatov
latest: '0.3'
description-type: haddock
description: ! 'Package provides single polymorphic function ''once'', that allows
  you

  to memoize IO actions and functions, evaluating them at most once.


  >>> let mkStamp = (putStrLn "stamping" >> writeFile "/tmp/stamp" "") :: IO ()

  >>> -- onceStamp :: IO ()

  >>> onceStamp <- once mkStamp

  >>> -- onceStamp actually evaluates mkStamp it wraps first time.

  >>> onceStamp

  stamping

  >>> -- but second time result `()'' is memoized, no action is performed.

  >>> onceStamp

  >>> -- we can memoize functions too

  >>> foo <- once $ \x -> print "foo" >> print (x :: Int)

  >>> -- action will be performed once for every distinct argument

  >>> foo 10

  foo

  10

  >>> foo 10

  10

  >>> foo 4

  foo

  4'
license-name: GPL-3

Update from Hackage at 2018-11-09T04:51:28Z
Update from Hackage at 2018-11-09T04:51:28Z
