preamble 0.0.8 → 0.0.9
raw patch · 5 files changed
+48/−9 lines, 5 files
Files
- LICENSE +20/−0
- preamble.cabal +2/−1
- src/Preamble/Prelude.hs +5/−3
- src/Preamble/Types/Alias.hs +20/−0
- src/Preamble/Types/Ctx.hs +1/−5
+ LICENSE view
@@ -0,0 +1,20 @@+Copyright (C) 2016 Swift Navigation Inc.++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.
preamble.cabal view
@@ -1,9 +1,10 @@ name: preamble-version: 0.0.8+version: 0.0.9 synopsis: Yet another prelude. description: A prelude built on basic-prelude. homepage: https://github.com/swift-nav/preamble license: MIT+license-file: LICENSE author: Swift Navigation Inc. maintainer: Mark Fine <dev@swiftnav.com> copyright: Copyright (C) 2016 Swift Navigation, Inc.
src/Preamble/Prelude.hs view
@@ -5,6 +5,7 @@ -- module Preamble.Prelude ( module Exports+ , runResourceT , maybe' , maybe_ , eitherThrowIO@@ -16,10 +17,11 @@ , (-:-) ) where -import BasicPrelude as Exports-import Control.Lens as Exports hiding (uncons, (.=), (<.>))+import BasicPrelude as Exports+import Control.Lens as Exports hiding (uncons, (.=), (<.>))+import Control.Monad.Trans.Resource import Data.Text-import Safe as Exports (headMay, initMay, tailMay)+import Safe as Exports (headMay, initMay, tailMay) -- | maybe with hanging function. --
src/Preamble/Types/Alias.hs view
@@ -1,10 +1,15 @@+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} -- | Various alias types. -- module Preamble.Types.Alias where +import Control.Monad.Catch import Control.Monad.Logger+import Control.Monad.Trans.Control+import Control.Monad.Trans.Resource import Data.Aeson import Preamble.Prelude @@ -15,3 +20,18 @@ -- | Trace -- type Trace = Loc -> LogSource -> LogLevel -> LogStr -> IO ()++-- | MonadBaseControlIO+--+type MonadBaseControlIO m =+ ( MonadBaseControl IO m+ , MonadIO m+ )++-- | MonadMain+--+type MonadMain m =+ ( MonadBaseControlIO m+ , MonadResource m+ , MonadMask m+ )
src/Preamble/Types/Ctx.hs view
@@ -10,7 +10,6 @@ import Control.Monad.Catch import Control.Monad.Logger import Control.Monad.Reader-import Control.Monad.Trans.Resource import Preamble.Prelude import Preamble.Types.Alias @@ -28,13 +27,10 @@ $(makeClassy ''Ctx) type MonadCtx c m =- ( MonadBaseControl IO m- , MonadIO m+ ( MonadMain m , MonadReader c m , MonadLogger m , MonadCatch m , MonadThrow m- , MonadMask m- , MonadResource m , HasCtx c )