From f27f35c6839253c3795ba9a5655d1dd12e11132b Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 26 Nov 2015 16:21:54 -0500 Subject: [PATCH] Better error messages. --- app/Main.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index 57621ab40..00c8ccd14 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -35,8 +35,8 @@ data TSNode = TsNode { _data :: Ptr (), offset :: TSLength } instance Storable TSNode where alignment n = 24 sizeOf n = 24 - peek p = error "why are you reading from this" - poke p n = error "why are you writing to this" + peek p = error "Haskell code should never read TSNode values directly." + poke p n = error "Haskell code should never write TSNode values directly." foreign import ccall "app/bridge.h ts_document_root_node_p" ts_document_root_node_p :: Ptr TSDocument -> Ptr TSNode -> IO () foreign import ccall "app/bridge.h ts_node_p_name" ts_node_p_name :: Ptr TSNode -> Ptr TSDocument -> IO CString