on master help sign in
Add commented show instance to Path type
8e66534Harendra Kumar
core/src/Streamly/Internal/FileSystem/Path.hs+9
@@ -151,6 +151,15 @@ instance Exception PathException
151-- | A type representing file system paths for directories or files.
151-- | A type representing file system paths for directories or files.
152newtype Path = Path (Array WORD_TYPE) -- deriving Eq
152newtype Path = Path (Array WORD_TYPE) -- deriving Eq
153
153
154+-- Show instance prints raw bytes without any decoding for rountdtripping.
155+-- Should we print this as a string instead, may be useful for ascii chars but
156+-- utf8 encoded chars may be unprintable. Better use toString if you want to
157+-- pretty print the path.
158+{-
159+instance Show Path where
160+ show (Path x) = show x
161+-}
162+
154-- XXX Do we need a type for file or dir Name as names cannot have the
163-- XXX Do we need a type for file or dir Name as names cannot have the
155-- separator char and there may be other restrictions on names? For example,
164-- separator char and there may be other restrictions on names? For example,
156-- length restriction. A file name cannot be "." or "..". We can use the types
165-- length restriction. A file name cannot be "." or "..". We can use the types