Skip to content

selectel/stringlike

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stringlike Build Status

Transformations to several string-like types.

Example

{-# LANGUAGE OverloadedStrings #-}

module Main where

import Data.ByteString.Lazy

data Foo = Bar | Baz

instance ToString Foo where
    toText Bar = "bar"
    toText Baz = "baz"

test :: ByteString -> ()
test = const ()

main :: IO ()
main = do
    test $ string Bar
    test $ lbs Baz

About

Transformations to several string-like types

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published