TIM export list and ifExample2
This commit is contained in:
@@ -64,10 +64,14 @@ arithExample2 = [coreProg|
|
||||
main = negate# ((+#) 2 ((*#) 5 3));
|
||||
|]
|
||||
|
||||
ifExample = [coreProg|
|
||||
ifExample1 = [coreProg|
|
||||
main = if# True 2 3;
|
||||
|]
|
||||
|
||||
ifExample2 = [coreProg|
|
||||
main = if# (id True) 2 3;
|
||||
|]
|
||||
|
||||
facExample = [coreProg|
|
||||
fac n = if# ((==#) n 0) 1 ((*#) n (fac ((-#) n 1)))
|
||||
main = fac 3;
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
{-# LANGUAGE ViewPatterns #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
module TIM
|
||||
where
|
||||
( module Core.Examples
|
||||
) where
|
||||
----------------------------------------------------------------------------------
|
||||
import Data.Map (Map, (!?), (!))
|
||||
import Data.Map qualified as M
|
||||
@@ -21,6 +22,7 @@ import Lens.Micro
|
||||
import Lens.Micro.TH
|
||||
import Data.Pretty
|
||||
import Data.Heap
|
||||
import Core.Examples
|
||||
import Core
|
||||
----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user