Skip to content

Commit

Permalink
Restructure files to expose library
Browse files Browse the repository at this point in the history
  • Loading branch information
kinoru committed Dec 5, 2015
1 parent 9fc7062 commit 44d090a
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 12 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Crypto.hs → lib/Unbreak/Crypto.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Crypto
module Unbreak.Crypto
( getRandomBytes
, scrypt
, encrypt
Expand Down
2 changes: 1 addition & 1 deletion src/Format.hs → lib/Unbreak/Format.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE DeriveGeneric #-}

module Format
module Unbreak.Format
( FromJSON(..)
, dec
, EncodeJSON(..)
Expand Down
6 changes: 3 additions & 3 deletions src/Run.hs → lib/Unbreak/Run.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Run
module Unbreak.Run
( runInit
, runOpen
) where
Expand All @@ -16,8 +16,8 @@ import Data.ByteString (ByteString)
import qualified Data.ByteString.OverheadFree as B
import qualified Data.Text.Encoding as T

import Crypto
import Format
import Unbreak.Crypto
import Unbreak.Format

(++) :: Monoid m => m -> m -> m
(++) = mappend
Expand Down
2 changes: 1 addition & 1 deletion src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as B
import System.Console.CmdArgs.Explicit

import Run
import Unbreak.Run

data Cmd
= CmdOpen ByteString
Expand Down
27 changes: 21 additions & 6 deletions unbreak.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,41 @@ synopsis: Secure editing of remote documents with unstable connection
license: AGPL-3
license-file: LICENSE
author: Kinoru
maintainer: [email protected]
copyright: Copyright (C) 2015 Kinoru
category: Web
build-type: Simple
cabal-version: >=1.18

executable u
library
hs-source-dirs: lib
exposed-modules:
Unbreak.Crypto,
Unbreak.Format,
Unbreak.Run,
Data.ByteString.OverheadFree
default-extensions: OverloadedStrings, RecordWildCards
main-is: Main.hs
other-modules: Data.ByteString.OverheadFree, Crypto, Format, Run
hs-source-dirs: src
default-language: Haskell2010
build-depends:
aeson >= 0.9,
aeson-pretty >= 0.7,
bytestring >= 0.10,
cmdargs >= 0.10,
cryptonite >= 0.9,
memory >= 0.10,
process == 1.*,
text == 1.*,
unix == 2.*,
base >=4.8 && <4.9
ghc-options: -Wall -O2 -threaded -static -optl-pthread -optl-static
ghc-options: -Wall -fwarn-incomplete-uni-patterns -O2 -threaded

executable u
default-extensions: OverloadedStrings, RecordWildCards
main-is: Main.hs
hs-source-dirs: src
build-depends:
bytestring >= 0.10,
cmdargs >= 0.10,
unbreak,
base >=4.8 && <4.9
ghc-options: -Wall -fwarn-incomplete-uni-patterns -O2 -threaded -static -optl-pthread -optl-static
default-language: Haskell2010

0 comments on commit 44d090a

Please sign in to comment.