This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeFamilies, DeriveGeneric, TypeOperators, RankNTypes, OverloadedStrings, StandaloneDeriving #-} | |
module GenericInstances where | |
-- Generic instances for various common data types | |
-- | |
-- > runhaskell GenericInstances.hs | |
-- Test {i = 3, t = "a", v = Vector.fromList [1,2,3], s = HashSet.fromList ["foo","baz","bar"], h = HashMap.fromList [("a",3),("b",4),("c",-1)], os = Set.fromList ["nay","yay"], om = Map.fromList [("f",False),("t",True)], is = IntSet [1,2,3], im = IntMap.fromList [(-3,[]),(0,[("a",True),("b",False)]),(5,[("aaaa",True)])], j = Object (HashMap.fromList [("num",Number 1.000),("array",Array (Vector.fromList [Number 7.000,Null,String "meh"])),("str",String "foo"),("bool",Bool True)])} | |
import GHC.Generics hiding (Prefix, prec) |