Re: no-unused-imports for only one import

PICCA Frederic-Emmanuel <[email protected]>
Newsgroups gmane.comp.lang.haskell.cafe
Message-ID <780531209.127576379.1723194384155.JavaMail.zimbra@synchrotron-soleil.fr>
>   import Your.Module ()
> 
> trick? That is, add empty parenthesis after your import?


This code is a binding to a library and depending on values this import is necessary or not.

encodeDataspace :: Dataspace -> IO BS.ByteString
encodeDataspace (Dataspace space_id) =
    withOutByteString $ \buf bufSz ->
        withInOut_ bufSz $ \ioBufSz ->
            withErrorCheck_ $
#if H5_VERSION_GE(1,12,0)
# if H5Sencode_vers == 2
                h5s_encode space_id buf ioBufSz h5p_DEFAULT
# elif H5Sencode_vers == 1
                h5s_encode space_id buf ioBufSz
# else
#  error "H5Sencode_vers set to invalid value"
# endif
#else
                h5s_encode space_id buf ioBufSz
#endif


look at the h5p_DEFAULT which comes from the sus-named import.

If I put () I think that when 5Sencode_vers == 2, the compilation failed...

Fred
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.