-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ fix #119 ] Throw an error when an unknown name appears in generated…
… Haskell code
- Loading branch information
1 parent
6a9885a
commit 62617a5
Showing
10 changed files
with
90 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module Fail.Issue119 where | ||
|
||
open import Haskell.Prelude | ||
|
||
aaa : Int | ||
aaa = 21 | ||
|
||
-- Oops, forgot compile pragma for aaa | ||
|
||
bbb : Int | ||
bbb = aaa + aaa | ||
|
||
{-# COMPILE AGDA2HS bbb #-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
module Delay where | ||
|
||
div' :: Int -> Int -> Int | ||
div' = error "postulate: Int -> Int -> Int" | ||
|
||
mod' :: Int -> Int -> Int | ||
mod' = error "postulate: Int -> Int -> Int" | ||
|
||
even' :: Int -> Bool | ||
even' x = mod' x 2 == 0 | ||
|
||
collatz :: Int -> Int | ||
collatz x | ||
= if x == 0 then 0 else | ||
if even x then collatz (div x 2) else collatz (3 * x + 1) | ||
if even' x then collatz (div' x 2) else collatz (3 * x + 1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test/Fail/Issue119.agda:10,1-4 | ||
agda2hs: Symbol aaa is missing a COMPILE pragma or rewrite rule |