mirror of
https://github.com/maciej-bendkowski/generic-boltzmann-brain.git
synced 2024-08-17 08:30:30 +03:00
Separate internal library and public single module API
This commit is contained in:
parent
b0c2e4a7af
commit
febfcce6c3
@ -1,4 +1,4 @@
|
||||
cabal-version: 1.12
|
||||
cabal-version: 2.0
|
||||
|
||||
-- This file has been generated from package.yaml by hpack version 0.34.4.
|
||||
--
|
||||
@ -25,6 +25,34 @@ source-repository head
|
||||
location: https://github.com/maciej-bendkowski/generic-boltzmann-brain
|
||||
|
||||
library
|
||||
exposed-modules:
|
||||
Data.Boltzmann
|
||||
other-modules:
|
||||
Paths_generic_boltzmann_brain
|
||||
hs-source-dirs:
|
||||
src
|
||||
default-extensions:
|
||||
LambdaCase BangPatterns DerivingVia FlexibleInstances UndecidableInstances TypeApplications ScopedTypeVariables Rank2Types
|
||||
ghc-options: -O2 -Wall -Wcompat -Wmissing-export-lists -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -Wno-name-shadowing -fwarn-missing-signatures
|
||||
build-depends:
|
||||
QuickCheck >=2.14.2
|
||||
, base >=4.7 && <5
|
||||
, containers >=0.6.4
|
||||
, data-default >=0.7.1.1
|
||||
, generic-boltzmann-brain-internal
|
||||
, mtl >=2.2.2
|
||||
, paganini-hs >=0.3.0.0
|
||||
, random >=1.2.0
|
||||
, splitmix >=0.1.0.4
|
||||
, template-haskell >=2.17.0.0
|
||||
, th-abstraction >=0.4.3.0
|
||||
, th-lift >=0.8.2
|
||||
, th-lift-instances >=0.1.18
|
||||
, transformers >=0.5.6
|
||||
, vector >=0.12.3.1
|
||||
default-language: Haskell2010
|
||||
|
||||
library generic-boltzmann-brain-internal
|
||||
exposed-modules:
|
||||
Data.Boltzmann.BitOracle
|
||||
Data.Boltzmann.Distribution
|
||||
@ -35,7 +63,7 @@ library
|
||||
other-modules:
|
||||
Paths_generic_boltzmann_brain
|
||||
hs-source-dirs:
|
||||
src
|
||||
internal
|
||||
default-extensions:
|
||||
LambdaCase BangPatterns DerivingVia FlexibleInstances UndecidableInstances TypeApplications ScopedTypeVariables Rank2Types
|
||||
ghc-options: -O2 -Wall -Wcompat -Wmissing-export-lists -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -Wno-name-shadowing -fwarn-missing-signatures
|
||||
@ -157,6 +185,7 @@ test-suite generic-boltzmann-brain-test
|
||||
, containers >=0.6.4
|
||||
, data-default >=0.7.1.1
|
||||
, generic-boltzmann-brain
|
||||
, generic-boltzmann-brain-internal
|
||||
, mtl >=2.2.2
|
||||
, paganini-hs >=0.3.0.0
|
||||
, random >=1.2.0
|
||||
|
68
package.yaml
68
package.yaml
@ -35,26 +35,53 @@ dependencies:
|
||||
- data-default >= 0.7.1.1
|
||||
|
||||
library:
|
||||
source-dirs: src
|
||||
ghc-options:
|
||||
- -O2
|
||||
- -Wall
|
||||
- -Wcompat
|
||||
- -Wmissing-export-lists
|
||||
- -Wincomplete-record-updates
|
||||
- -Wincomplete-uni-patterns
|
||||
- -Wredundant-constraints
|
||||
- -Wno-name-shadowing
|
||||
- -fwarn-missing-signatures
|
||||
default-extensions:
|
||||
LambdaCase
|
||||
BangPatterns
|
||||
DerivingVia
|
||||
FlexibleInstances
|
||||
UndecidableInstances
|
||||
TypeApplications
|
||||
ScopedTypeVariables
|
||||
Rank2Types
|
||||
source-dirs: src
|
||||
exposed-modules:
|
||||
Data.Boltzmann
|
||||
dependencies:
|
||||
- generic-boltzmann-brain-internal
|
||||
ghc-options:
|
||||
- -O2
|
||||
- -Wall
|
||||
- -Wcompat
|
||||
- -Wmissing-export-lists
|
||||
- -Wincomplete-record-updates
|
||||
- -Wincomplete-uni-patterns
|
||||
- -Wredundant-constraints
|
||||
- -Wno-name-shadowing
|
||||
- -fwarn-missing-signatures
|
||||
default-extensions:
|
||||
LambdaCase
|
||||
BangPatterns
|
||||
DerivingVia
|
||||
FlexibleInstances
|
||||
UndecidableInstances
|
||||
TypeApplications
|
||||
ScopedTypeVariables
|
||||
Rank2Types
|
||||
|
||||
internal-libraries:
|
||||
generic-boltzmann-brain-internal:
|
||||
source-dirs: internal
|
||||
ghc-options:
|
||||
- -O2
|
||||
- -Wall
|
||||
- -Wcompat
|
||||
- -Wmissing-export-lists
|
||||
- -Wincomplete-record-updates
|
||||
- -Wincomplete-uni-patterns
|
||||
- -Wredundant-constraints
|
||||
- -Wno-name-shadowing
|
||||
- -fwarn-missing-signatures
|
||||
default-extensions:
|
||||
LambdaCase
|
||||
BangPatterns
|
||||
DerivingVia
|
||||
FlexibleInstances
|
||||
UndecidableInstances
|
||||
TypeApplications
|
||||
ScopedTypeVariables
|
||||
Rank2Types
|
||||
|
||||
executables:
|
||||
binTreeProfile:
|
||||
@ -151,6 +178,7 @@ tests:
|
||||
- -Wno-name-shadowing
|
||||
- -fwarn-missing-signatures
|
||||
dependencies:
|
||||
- generic-boltzmann-brain-internal
|
||||
- generic-boltzmann-brain
|
||||
- tasty >= 1.4.2
|
||||
- tasty-hunit >= 0.10.0
|
||||
|
@ -3,15 +3,18 @@
|
||||
module BinTree (BinTree (..), randomBinTreeListIO) where
|
||||
|
||||
import Control.Monad (replicateM)
|
||||
import Data.Boltzmann.BitOracle (evalIO)
|
||||
import Data.Boltzmann.Sampler (BoltzmannSampler (..), rejectionSampler')
|
||||
import Data.Boltzmann.Sampler.TH (mkDefWeights)
|
||||
import Data.Boltzmann.System (
|
||||
|
||||
import Data.Boltzmann (
|
||||
BoltzmannSampler (..),
|
||||
Constructable ((<:>)),
|
||||
System (..),
|
||||
evalIO,
|
||||
mkBoltzmannSampler,
|
||||
mkDefWeights,
|
||||
rejectionSampler',
|
||||
)
|
||||
import Data.Boltzmann.System.TH (mkBoltzmannSampler)
|
||||
import Data.Default (Default (def))
|
||||
|
||||
import System.Random.SplitMix (SMGen)
|
||||
|
||||
data BinTree
|
||||
|
@ -3,15 +3,18 @@
|
||||
module Lambda (Lambda (..), randomLambdaListIO) where
|
||||
|
||||
import Control.Monad (replicateM)
|
||||
import Data.Boltzmann.BitOracle (evalIO)
|
||||
import Data.Boltzmann.Sampler (BoltzmannSampler (..), rejectionSampler')
|
||||
import Data.Boltzmann.Sampler.TH (mkDefWeights)
|
||||
import Data.Boltzmann.System (
|
||||
|
||||
import Data.Boltzmann (
|
||||
BoltzmannSampler (..),
|
||||
Constructable ((<:>)),
|
||||
System (..),
|
||||
evalIO,
|
||||
mkBoltzmannSampler,
|
||||
mkDefWeights,
|
||||
rejectionSampler',
|
||||
)
|
||||
import Data.Boltzmann.System.TH (mkBoltzmannSampler)
|
||||
import Data.Default (Default (def))
|
||||
|
||||
import System.Random.SplitMix (SMGen)
|
||||
|
||||
data DeBruijn
|
||||
|
@ -3,9 +3,14 @@
|
||||
module Tree (Tree (..), randomTreeListIO) where
|
||||
|
||||
import Control.Monad (replicateM)
|
||||
import Data.Boltzmann.BitOracle (evalIO)
|
||||
import Data.Boltzmann.Sampler (BoltzmannSampler (..), rejectionSampler')
|
||||
import Data.Boltzmann.System.TH (mkDefBoltzmannSampler)
|
||||
|
||||
import Data.Boltzmann (
|
||||
BoltzmannSampler (..),
|
||||
evalIO,
|
||||
mkDefBoltzmannSampler,
|
||||
rejectionSampler',
|
||||
)
|
||||
|
||||
import System.Random.SplitMix (SMGen)
|
||||
|
||||
data Tree = T [Tree]
|
||||
|
43
src/Data/Boltzmann.hs
Normal file
43
src/Data/Boltzmann.hs
Normal file
@ -0,0 +1,43 @@
|
||||
module Data.Boltzmann (
|
||||
ConstructorWeights,
|
||||
ConstructorFrequencies,
|
||||
System (..),
|
||||
Constructable (..),
|
||||
mkBoltzmannSampler,
|
||||
mkDefBoltzmannSampler,
|
||||
BoltzmannSampler (..),
|
||||
rejectionSampler,
|
||||
rejectionSampler',
|
||||
mkDefWeights,
|
||||
BitOracle,
|
||||
EvalIO (..),
|
||||
eval,
|
||||
) where
|
||||
|
||||
import Data.Boltzmann.System (
|
||||
Constructable (..),
|
||||
ConstructorFrequencies,
|
||||
ConstructorWeights,
|
||||
System (..),
|
||||
)
|
||||
|
||||
import Data.Boltzmann.System.TH (
|
||||
mkBoltzmannSampler,
|
||||
mkDefBoltzmannSampler,
|
||||
)
|
||||
|
||||
import Data.Boltzmann.Sampler (
|
||||
BoltzmannSampler (..),
|
||||
rejectionSampler,
|
||||
rejectionSampler',
|
||||
)
|
||||
|
||||
import Data.Boltzmann.Sampler.TH (
|
||||
mkDefWeights,
|
||||
)
|
||||
|
||||
import Data.Boltzmann.BitOracle (
|
||||
BitOracle,
|
||||
EvalIO (..),
|
||||
eval,
|
||||
)
|
Loading…
Reference in New Issue
Block a user