mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-24 12:54:28 +03:00
Merge remote-tracking branch 'origin/master' into testfix/chez010-macos
This commit is contained in:
commit
56d24e34d4
@ -25,7 +25,7 @@ findChez
|
||||
case env of
|
||||
Just n => pure n
|
||||
Nothing => do e <- firstExists [p ++ x | p <- ["/usr/bin/", "/usr/local/bin/"],
|
||||
x <- ["scheme", "chez", "chezscheme9.5"]]
|
||||
x <- ["chez", "chezscheme9.5", "scheme"]]
|
||||
pure $ fromMaybe "/usr/bin/env -S scheme" e
|
||||
|
||||
-- Given the chez compiler directives, return a list of pairs of:
|
||||
|
@ -113,7 +113,7 @@ sub : Constant -> Constant -> Maybe Constant
|
||||
sub (BI x) (BI y) = pure $ BI (x - y)
|
||||
sub (I x) (I y) = pure $ I (x - y)
|
||||
sub (Ch x) (Ch y) = pure $ Ch (cast (cast {to=Int} x - cast y))
|
||||
sub (Db x) (Db y) = pure $ Db (x + y)
|
||||
sub (Db x) (Db y) = pure $ Db (x - y)
|
||||
sub _ _ = Nothing
|
||||
|
||||
mul : Constant -> Constant -> Maybe Constant
|
||||
|
@ -40,6 +40,7 @@ idrisTests
|
||||
"interface005", "interface006", "interface007", "interface008",
|
||||
"interface009", "interface010", "interface011", "interface012",
|
||||
"interface013", "interface014",
|
||||
"interpreter001",
|
||||
"lazy001",
|
||||
"linear001", "linear002", "linear003", "linear004", "linear005",
|
||||
"linear006", "linear007",
|
||||
@ -125,7 +126,7 @@ findChez
|
||||
case env of
|
||||
Just n => pure $ Just n
|
||||
Nothing => firstExists [p ++ x | p <- ["/usr/bin/", "/usr/local/bin/"],
|
||||
x <- ["scheme", "chez", "chezscheme9.5"]]
|
||||
x <- ["chez", "chezscheme9.5", "scheme"]]
|
||||
|
||||
runChezTests : String -> List String -> IO (List Bool)
|
||||
runChezTests prog tests
|
||||
|
2
tests/idris2/interpreter001/expected
Normal file
2
tests/idris2/interpreter001/expected
Normal file
@ -0,0 +1,2 @@
|
||||
Main> 1.5
|
||||
Main> Bye for now!
|
2
tests/idris2/interpreter001/input
Normal file
2
tests/idris2/interpreter001/input
Normal file
@ -0,0 +1,2 @@
|
||||
3.5 - 2.0
|
||||
:q
|
1
tests/idris2/interpreter001/run
Executable file
1
tests/idris2/interpreter001/run
Executable file
@ -0,0 +1 @@
|
||||
$1 --no-banner < input
|
Loading…
Reference in New Issue
Block a user