syb-with-class-instances-text-0.0.1/0000755000000000000000000000000011355464134015524 5ustar0000000000000000syb-with-class-instances-text-0.0.1/LICENSE0000644000000000000000000000265311355464134016537 0ustar0000000000000000Copyright (c) 2010 Jeremy Shaw All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the author nor the names of his contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. syb-with-class-instances-text-0.0.1/Setup.hs0000644000000000000000000000013111355464134017153 0ustar0000000000000000 module Main (main) where import Distribution.Simple main :: IO () main = defaultMain syb-with-class-instances-text-0.0.1/syb-with-class-instances-text.cabal0000644000000000000000000000157211355464134024335 0ustar0000000000000000Name: syb-with-class-instances-text Version: 0.0.1 License: BSD3 License-file: LICENSE Copyright: 2010 Jeremy Shaw Author: Jeremy Shaw Maintainer: jeremy@seereason.org Stability: experimental Synopsis: Scrap Your Boilerplate With Class Text instance Description: Provides SYB-with-class instances for Text from the text package. Category: Data Build-Type: Simple Cabal-Version: >= 1.6 source-repository head type: darcs location: http://src.seereason.com/syb-with-class-instances-text Library Build-Depends: base >= 3 && < 5, syb-with-class, text >= 0.7.1 Exposed-modules: Data.Generics.SYB.WithClass.Instances.Text Extensions: FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, UndecidableInstances GHC-Options: -Wall syb-with-class-instances-text-0.0.1/Data/0000755000000000000000000000000011355464134016375 5ustar0000000000000000syb-with-class-instances-text-0.0.1/Data/Generics/0000755000000000000000000000000011355464134020134 5ustar0000000000000000syb-with-class-instances-text-0.0.1/Data/Generics/SYB/0000755000000000000000000000000011355464134020571 5ustar0000000000000000syb-with-class-instances-text-0.0.1/Data/Generics/SYB/WithClass/0000755000000000000000000000000011355464134022472 5ustar0000000000000000syb-with-class-instances-text-0.0.1/Data/Generics/SYB/WithClass/Instances/0000755000000000000000000000000011355464134024421 5ustar0000000000000000syb-with-class-instances-text-0.0.1/Data/Generics/SYB/WithClass/Instances/Text.hs0000644000000000000000000000203011355464134025674 0ustar0000000000000000{-# Language FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Data.Generics.SYB.WithClass.Instances.Text where import Data.Generics.SYB.WithClass.Basics import qualified Data.Text as S import qualified Data.Text.Lazy as L instance (Data ctx String, Sat (ctx S.Text)) => Data ctx S.Text where gfoldl _ f z txt = z S.pack `f` (S.unpack txt) toConstr _ _ = error "Data.Generics.SYB.WithClass.Instances.Text:toConstr S.Text" gunfold _ _ = error "Data.Generics.SYB.WithClass.Instances.Text:gunfold S.Text" dataTypeOf _ _ = mkNorepType "Data.Text.Text" instance (Data ctx String, Sat (ctx L.Text)) => Data ctx L.Text where gfoldl _ f z txt = z L.pack `f` (L.unpack txt) toConstr _ _ = error "Data.Generics.SYB.WithClass.Instances.Text:toConstr L.Text" gunfold _ _ = error "Data.Generics.SYB.WithClass.Instances.Text:gunfold L.Text" dataTypeOf _ _ = mkNorepType "Data.Text.Lazy.Text"