1 {-# LANGUAGE RankNTypes, FlexibleContexts, NoMonomorphismRestriction, ScopedTypeVariables #-}
3 import Control.Category
5 import GHC.HetMet.Private
9 import BitSerialHardware
22 ga_second (ga_first ga_drop >>>
27 ga_loopl (ga_first reg >>>
31 oconst :: Int -> Opaque () a
32 oconst c = MkOpaque ("{\\large{"++(show c)++"}}") $
34 return $ GASPortPassthrough PortUnit (PortFree x) (oconst c)
36 omult :: Opaque (a,a) a
37 omult = MkOpaque "{\\large{*}}" $
39 return $ GASPortPassthrough (PortTensor (PortFree x) (PortFree x)) (PortFree x) omult
41 main = do let const c = PGArrowD $ GAS_misc $ oconst c
42 let mult = PGArrowD $ GAS_misc omult
44 sample5 <- toTikZ $ beautify $ optimize $ unG (Demo.sample5 const mult)
45 putStrLn $ tikz_header ++ sample5 ++ tikz_footer
46 withFile ".build/sample5.tex" WriteMode (\file -> hPutStr file sample5)
48 sample1 <- toTikZ $ skelify' tikzExample1
49 --putStrLn $ tikz_header ++ sample1 ++ tikz_footer
50 withFile ".build/sample1.tex" WriteMode (\file -> hPutStr file sample1)
52 sample2 <- toTikZ $ skelify' tikzExample2
53 --putStrLn $ tikz_header ++ sample2 ++ tikz_footer
54 withFile ".build/sample2.tex" WriteMode (\file -> hPutStr file sample2)
56 sample3 <- toTikZ $ skelify'' oscillator
57 --putStrLn $ tikz_header ++ sample3 ++ tikz_footer
58 withFile ".build/sample3.tex" WriteMode (\file -> hPutStr file sample3)
60 sample6 <- toTikZ $ beautify $ optimize $ unG (Demo.sample6 const mult)
61 --putStrLn $ tikz_header ++ sample6 ++ tikz_footer
62 withFile ".build/sample6.tex" WriteMode (\file -> hPutStr file sample6)