diff --git a/ats-storable.cabal b/ats-storable.cabal
--- a/ats-storable.cabal
+++ b/ats-storable.cabal
@@ -1,5 +1,5 @@
 name:                ats-storable
-version:             0.1.0.6
+version:             0.2.0.0
 synopsis:            Marshal ATS types into Haskell
 description:         Facilities for sharing types between ATS and Haskell
 homepage:            https://github.com//ats-generic#readme
@@ -25,6 +25,8 @@
   exposed-modules:     Foreign.Storable.ATS
   build-depends:       base >= 4.9 && < 5
                      , composition-prelude
+                     , text
+                     , bytestring
   default-language:    Haskell2010
   if flag(development)
     ghc-options:       -Werror
diff --git a/src/Foreign/Storable/ATS.hs b/src/Foreign/Storable/ATS.hs
--- a/src/Foreign/Storable/ATS.hs
+++ b/src/Foreign/Storable/ATS.hs
@@ -8,15 +8,39 @@
 
 module Foreign.Storable.ATS
     ( ATSStorable (..)
+    , AsCString (..)
     ) where
 
 import           Control.Composition
+import qualified Data.ByteString       as BS
+import qualified Data.ByteString.Lazy  as BSL
+import qualified Data.Text             as T
+import qualified Data.Text.Lazy        as TL
 import           Data.Word
+import           Foreign.C.String
 import           Foreign.Marshal.Alloc
 import           Foreign.Ptr
 import qualified Foreign.Storable      as C
 import           GHC.Generics
 
+class AsCString a where
+    toCString :: a -> IO CString
+
+instance AsCString String where
+    toCString = newCString
+
+instance AsCString T.Text where
+    toCString = newCString . T.unpack
+
+instance AsCString TL.Text where
+    toCString = newCString . TL.unpack
+
+instance AsCString BS.ByteString where
+    toCString = flip BS.useAsCString pure
+
+instance AsCString BSL.ByteString where
+    toCString = flip BS.useAsCString pure . BSL.toStrict
+
 class Storable' f where
 
     sizeOf' :: f a -> Int
@@ -61,6 +85,7 @@
     peek :: Ptr a -> IO a
     peek = C.peek
 
+-- FIXME this doesn't use reference types properly
 instance (Storable' a, Storable' b) => Storable' (a :+: b) where
     sizeOf' _ = 4 + max (sizeOf' (undefined :: a x)) (sizeOf' (undefined :: b x))
     alignment' _ = gcd 4 $ gcd (alignment' (undefined :: a x)) (alignment' (undefined :: b x))
