packages feed

yesod-ip 0.3 → 0.4

raw patch · 3 files changed

+28/−3 lines, 3 filesdep +path-pieces

Dependencies added: path-pieces

Files

src/Database/Persist/Net/Simple.hs view
@@ -1,7 +1,9 @@  {-# LANGUAGE OverloadedStrings #-} --- | This module provides orphan instances for data types---   from the @ip@ package. These instances will choose the+-- | This module provides orphan instances for the typeclasses+--   'PersistField' and 'PersistFieldSql'. The instances provided+--   are for the data types 'IPv4' and 'Mac' from the @ip@ package. +--   These instances will choose the  --   standard text type for the database column. If you are --   using PostgreSQL, you may want to consider importing  --   the @Database.Persist.Net.PostgreSQL@ module instead.
+ src/Web/PathPieces/Net.hs view
@@ -0,0 +1,21 @@+-- | This module provides orphan instances for 'PathPiece'+--   for data types from the @ip@ package.++module Web.PathPieces.Net where++import Web.PathPieces (PathPiece(..))+import Data.Text (Text)+import Data.Monoid+import Net.IPv4 (IPv4)+import Net.Mac (Mac)+import qualified Net.IPv4.Text as IPv4Text+import qualified Net.Mac.Text as MacText++instance PathPiece Mac where+  toPathPiece   = MacText.encode+  fromPathPiece = MacText.decode++instance PathPiece IPv4 where+  toPathPiece   = IPv4Text.encode+  fromPathPiece = IPv4Text.decode+
yesod-ip.cabal view
@@ -1,5 +1,5 @@ name:                yesod-ip-version:             0.3+version:             0.4 synopsis:            Code for using the ip package with yesod description:         Please see README.md homepage:            https://github.com/andrewthad/yesod-ip#readme@@ -19,12 +19,14 @@     Yesod.Form.Net     Database.Persist.Net.Simple     Database.Persist.Net.PostgreSQL+    Web.PathPieces.Net   build-depends:              base >= 4.7 && < 5     , text     , yesod-core     , yesod-form     , persistent+    , path-pieces     , ip   >= 0.6.0 && < 0.7.0   default-language:    Haskell2010