https://github.com/plsyssec/inline-fact
Inline FaCT in Haskell
https://github.com/plsyssec/inline-fact
Last synced: 8 months ago
JSON representation
Inline FaCT in Haskell
- Host: GitHub
- URL: https://github.com/plsyssec/inline-fact
- Owner: PLSysSec
- License: mit
- Created: 2018-04-12T20:43:17.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-02-22T07:51:23.000Z (over 7 years ago)
- Last Synced: 2025-01-12T14:37:54.202Z (over 1 year ago)
- Language: Haskell
- Size: 6.84 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Once you install [FaCT](https://github.com/PLSysSec/FaCT), you can use it inline in your Haskell project:
```haskell
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
import Language.FaCT.Inline
[fact|secret uint32 add(secret uint32 x, secret uint32 y) {
return x + y;
}
|]
[fact|secret uint32 sub(secret uint32 x, secret uint32 y) {
return x - y;
}
|]
main :: IO ()
main = do
putStrLn "hello!"
res1 <- add 3 55
putStrLn $ show res1
res2 <- sub 55 3
putStrLn $ show res2
putStrLn "bye!"
```
This is a small protype and should not be used in production code.