Skip to content
Inline FaCT in Haskell
Haskell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
src/Language/FaCT
.gitignore
LICENSE
README.md
inline-fact.cabal
stack.yaml

README.md

Once you install FaCT, you can use it inline in your Haskell project:

{-# 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.

You can’t perform that action at this time.