Skip to content

\(\hat{H}\)'s Heather dialect syntax

Importing types

To enable a type contained in the hhat_types/ folder:

1
use(type:point)

for more than one type:

1
use(type:[point point3d])

for types in nested folders (scalar/ in the example below) inside hhat_types/ folder:

1
use(type:[scalar.pos scalar.velocity scalar.acceleration])

or

1
use(type:[scalar.{pos velocity acceleration}])

Note: Incorporating external types downloaded from a valid collection repository or from another local project is still in design phase.

Importing functions

To enable a function in the project:

1
use(fn:sum)

for more than one function:

1
use(fn:[sum times safe-div])

for functions inside nested folders (linalg/ in the example below) on src/ folder:

1
use(fn:[linalg.dot linalg.inner linalg.outer])

or

1
use(fn:[linalg.{dot inner outer}])

and

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
use(
    fn:[
        linalg.{
            dot
            inner
            outer
        }
        stats.{
            rv-continuous:rvc
            rv-discrete:rvd
        }
    ]
)

where rvc is the label for stats.rv-continuous and rvd is the label for stats.rv-discrete function, respectively.


Note: Incorporating external functions from downloaded sources or local project is still on design phase.