diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..1333ed7 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +TODO diff --git a/README.md b/README.md index c89d00e..376799e 120000 --- a/README.md +++ b/README.md @@ -1 +1 @@ -graphula-core/test/README.lhs \ No newline at end of file +test/README.lhs \ No newline at end of file diff --git a/graphula-core/Setup.hs b/Setup.hs similarity index 100% rename from graphula-core/Setup.hs rename to Setup.hs diff --git a/graphula-core/graphula-core.cabal b/graphula-core.cabal similarity index 92% rename from graphula-core/graphula-core.cabal rename to graphula-core.cabal index b0b0226..a6f77a6 100644 --- a/graphula-core/graphula-core.cabal +++ b/graphula-core.cabal @@ -4,7 +4,7 @@ cabal-version: 1.12 -- -- see: https://github.com/sol/hpack -- --- hash: 6d2c3c26856ffe4f969fae8c28e11aa6e252225226a3f13590d8526121438327 +-- hash: c702d130f70b24da8de0ffee7a182f6962fb405feea3f8e1bc1070a191b37900 name: graphula-core version: 2.0.0.0 @@ -13,7 +13,8 @@ license: MIT license-file: LICENSE build-type: Simple extra-source-files: - ../stack.yaml + README.md + CHANGELOG.md library exposed-modules: @@ -66,7 +67,6 @@ test-suite readme , monad-logger , path-pieces , persistent - , persistent-arbitrary , persistent-sqlite , persistent-template , resourcet diff --git a/graphula-core/LICENSE b/graphula-core/LICENSE deleted file mode 100644 index 44eaaac..0000000 --- a/graphula-core/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2013-2020 Freckle Education. https://www.freckle.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/graphula-core/README.md b/graphula-core/README.md deleted file mode 120000 index 376799e..0000000 --- a/graphula-core/README.md +++ /dev/null @@ -1 +0,0 @@ -test/README.lhs \ No newline at end of file diff --git a/graphula-core/package.yaml b/package.yaml similarity index 93% rename from graphula-core/package.yaml rename to package.yaml index bac3cf1..5ffaf6f 100644 --- a/graphula-core/package.yaml +++ b/package.yaml @@ -3,7 +3,8 @@ version: 2.0.0.0 maintainer: Freckle Education extra-source-files: - - ../stack.yaml + - README.md + - CHANGELOG.md dependencies: - base @@ -45,7 +46,7 @@ tests: - monad-logger - path-pieces - persistent - - persistent-arbitrary + #- persistent-arbitrary - persistent-sqlite - persistent-template - QuickCheck diff --git a/persistent-arbitrary/LICENSE b/persistent-arbitrary/LICENSE deleted file mode 100644 index 47d0a6d..0000000 --- a/persistent-arbitrary/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2013-2017 Front Row Education, Inc. www.frontrowed.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/persistent-arbitrary/Setup.hs b/persistent-arbitrary/Setup.hs deleted file mode 100644 index 9a994af..0000000 --- a/persistent-arbitrary/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/persistent-arbitrary/package.yaml b/persistent-arbitrary/package.yaml deleted file mode 100644 index 1e88462..0000000 --- a/persistent-arbitrary/package.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: persistent-arbitrary -version: "0.1.0" -maintainer: Front Row Education - -extra-source-files: - - ../stack.yaml - -dependencies: - - base - - persistent - - QuickCheck - -library: - source-dirs: - - src - ghc-options: -Wall diff --git a/persistent-arbitrary/src/Database/Persist/Arbitrary.hs b/persistent-arbitrary/src/Database/Persist/Arbitrary.hs deleted file mode 100644 index 0c7f88e..0000000 --- a/persistent-arbitrary/src/Database/Persist/Arbitrary.hs +++ /dev/null @@ -1,11 +0,0 @@ -{-# OPTIONS_GHC -fno-warn-orphans #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE UndecidableInstances #-} -module Database.Persist.Arbitrary where - -import Database.Persist -import Database.Persist.Sql -import Test.QuickCheck - -instance (ToBackendKey SqlBackend a) => Arbitrary (Key a) where - arbitrary = toSqlKey <$> arbitrary diff --git a/graphula-core/src/Graphula.hs b/src/Graphula.hs similarity index 100% rename from graphula-core/src/Graphula.hs rename to src/Graphula.hs diff --git a/graphula-core/src/Graphula/Arbitrary.hs b/src/Graphula/Arbitrary.hs similarity index 100% rename from graphula-core/src/Graphula/Arbitrary.hs rename to src/Graphula/Arbitrary.hs diff --git a/graphula-core/src/Graphula/Internal.hs b/src/Graphula/Internal.hs similarity index 100% rename from graphula-core/src/Graphula/Internal.hs rename to src/Graphula/Internal.hs diff --git a/graphula-core/src/Graphula/Key.hs b/src/Graphula/Key.hs similarity index 100% rename from graphula-core/src/Graphula/Key.hs rename to src/Graphula/Key.hs diff --git a/stack.yaml b/stack.yaml index 39a0db3..f4c865a 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,7 +1,4 @@ resolver: lts-15.13 -packages: - - graphula-core - - persistent-arbitrary extra-deps: - generics-eot-0.4.0.1@sha256:3d8df1d8ca010238ec5f20ba30282daa0fac99c7de495fae64e26a7ea1dadb08,2312 diff --git a/test.db b/test.db new file mode 100644 index 0000000..2a7f795 Binary files /dev/null and b/test.db differ diff --git a/graphula-core/test/Graphula/UUIDKey.hs b/test/Graphula/UUIDKey.hs similarity index 100% rename from graphula-core/test/Graphula/UUIDKey.hs rename to test/Graphula/UUIDKey.hs diff --git a/graphula-core/test/README.lhs b/test/README.lhs similarity index 98% rename from graphula-core/test/README.lhs rename to test/README.lhs index fc8edd0..b09a1cc 100644 --- a/graphula-core/test/README.lhs +++ b/test/README.lhs @@ -19,6 +19,7 @@ Graphula is a simple interface for generating persistent data and linking its de {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} +{-# OPTIONS_GHC -fno-warn-orphans #-} module Main where import Control.Monad (replicateM_) @@ -27,7 +28,6 @@ import Control.Monad.IO.Unlift import Control.Monad.Logger (NoLoggingT) import Control.Monad.Trans.Reader (ReaderT) import Control.Monad.Trans.Resource (ResourceT) -import Database.Persist.Arbitrary () import Database.Persist.Sqlite import Database.Persist.TH import Data.Typeable @@ -36,6 +36,9 @@ import Graphula import Graphula.UUIDKey import Test.Hspec import Test.QuickCheck + +instance (ToBackendKey SqlBackend a) => Arbitrary (Key a) where + arbitrary = toSqlKey <$> arbitrary ``` -->