mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 02:31:50 +03:00
15 lines
268 B
Idris
15 lines
268 B
Idris
%logging "compiler.identity" 5
|
|
|
|
-- This SHOULD give us the identity flag
|
|
id : Nat -> Nat
|
|
id Z = Z
|
|
id (S n) = S (id n)
|
|
|
|
-- This should NOT give us anything: `main` is not the identity
|
|
-- because it is effectful
|
|
main : IO ()
|
|
main = do
|
|
s <- getLine
|
|
putStrLn s
|
|
main
|