Skip to content

Add type class for lazy and strict text types #18

@chshersh

Description

@chshersh
class LazyStrict l s | l -> s, s -> l where
  toLazy :: s -> l
  toStrict :: l -> s

fromLazy :: LazyStrict l s => l -> s
fromLazy = toStrict

fromStrict :: LazyStrict l s => s -> l
fromStrict = toLazy

instance LazyStrict L.ByteString S.ByteString
instance LazyStrict L.Text S.Text

Metadata

Metadata

Assignees

Labels

newBring something new into library (add function or type or interface)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions