Skip to content

Commit

Permalink
clean up imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometer1729 committed Aug 30, 2022
1 parent 61a28f9 commit 001faa7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
7 changes: 6 additions & 1 deletion app/Main.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import Network.Wai.Handler.Warp
import System.IO
(setBeforeMainLoop
,setPort
,defaultSettings
,runSettings
)
import System.IO(hPutStrLn,stderr)
import Lib (secretKey,putEdKey,Id (Id), Label (Label),Domains(Domains) )
import Data.String (IsString(fromString))
import Api(app)
Expand Down
18 changes: 15 additions & 3 deletions src/Api.hs
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
module Api(app,SignApi) where

import Data.Aeson
import GHC.Generics
import Network.Wai
import Data.Aeson(ToJSON,FromJSON)
import GHC.Generics(Generic)
import Servant
((:<|>)((:<|>))
,(:>)
,Application
,Get
,Handler
,JSON
,PlainText
,Post
,Proxy(Proxy)
,ReqBody
,Server
,serve
)
import Control.Monad.IO.Class (MonadIO(liftIO))
import Lib (signWithEdKey, Id (Id),getPubKey)
import Hex(fromHex,toHex)
Expand Down
9 changes: 4 additions & 5 deletions src/Lib.hs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module Lib
(helloWorld
(Id(Id)
,Label(Label)
,Domains(Domains)
,helloWorld
,publicKey
,secretKey
,putEdKey
,signature
,signWithEdKey
,getPubKey
,message
,Id(Id)
,Label(Label)
,Domains(Domains)
) where

import Foreign.C.Types (CUShort(..), CSize(..), CBool (CBool))
Expand Down Expand Up @@ -90,4 +90,3 @@ getPubKey (Id i) isTesting =
get_public_key (CUShort i) outputBuffer (CBool isTestingWord)
B.packCStringLen (outputBuffer, keySize)


0 comments on commit 001faa7

Please sign in to comment.