Skip to content

Commit 83816af

Browse files
committed
added docs for exported functions
1 parent 9187d50 commit 83816af

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Symengine.hs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Description : Symengine bindings to Haskell
77
module Symengine
88
(
99
ascii_art_str,
10-
basic_str,
1110
zero,
1211
one,
1312
im,
@@ -43,6 +42,18 @@ instance Storable BasicStruct where
4342
poke basic_ptr BasicStruct{..} = pokeByteOff basic_ptr 0 data_ptr
4443

4544

45+
-- |represents a symbol exported by SymEngine. create this using the functions
46+
-- 'zero', 'one', 'minus_one', 'e', 'im', 'rational', 'complex', and also by
47+
-- constructing a number and converting it to a Symbol
48+
--
49+
-- >>> 3.5 :: BasicSym
50+
-- 7/2
51+
--
52+
-- >>> rational 2 10
53+
-- 1 /5
54+
--
55+
-- >>> complex 1 2
56+
-- 1 + 2*I
4657
data BasicSym = BasicSym { fptr :: ForeignPtr BasicStruct }
4758

4859
withBasicSym :: BasicSym -> (Ptr BasicStruct -> IO a) -> IO a

0 commit comments

Comments
 (0)