-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4bca58
commit cffadaa
Showing
12 changed files
with
172 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module Fail.Issue223 where | ||
|
||
data Void : Set where | ||
{-# COMPILE AGDA2HS Void #-} | ||
|
||
test : {a : Set} → Void → a | ||
test () | ||
{-# COMPILE AGDA2HS test #-} |
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,33 @@ | ||
open import Haskell.Prelude hiding (a) | ||
|
||
module ModuleParameters | ||
(@0 name : Set) | ||
(p : @0 name → Set) where | ||
|
||
data Scope : Set where | ||
Empty : Scope | ||
Bind : (@0 x : name) → p x → Scope → Scope | ||
{-# COMPILE AGDA2HS Scope #-} | ||
|
||
unbind : Scope → Scope | ||
unbind Empty = Empty | ||
unbind (Bind _ _ s) = s | ||
{-# COMPILE AGDA2HS unbind #-} | ||
|
||
module _ {a : Set} where | ||
thing : a → a | ||
thing x = y | ||
where y : a | ||
y = x | ||
{-# COMPILE AGDA2HS thing #-} | ||
|
||
stuff : a → Scope → a | ||
stuff x Empty = x | ||
stuff x (Bind _ _ _) = x | ||
{-# COMPILE AGDA2HS stuff #-} | ||
|
||
module _ {b : Set} where | ||
more : b → a → Scope → Scope | ||
more _ _ Empty = Empty | ||
more _ _ (Bind _ _ s) = s | ||
{-# COMPILE AGDA2HS more #-} |
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 |
---|---|---|
|
@@ -58,4 +58,5 @@ import IOInput | |
import Issue200 | ||
import Issue169 | ||
import Issue210 | ||
import ModuleParameters | ||
|
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,2 +1,2 @@ | ||
test/Fail/ErasedRecordParameter.agda:4,8-10 | ||
Not supported by agda2hs: erased type variable a | ||
Cannot use erased variable a |
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/Issue223.agda:6,1-5 | ||
Functions defined with absurd patterns exclusively are not supported. Use function `error` from the Haskell.Prelude instead. |
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,24 @@ | ||
{-# LANGUAGE ScopedTypeVariables #-} | ||
module ModuleParameters where | ||
|
||
data Scope p = Empty | ||
| Bind p (Scope p) | ||
|
||
unbind :: Scope p -> Scope p | ||
unbind Empty = Empty | ||
unbind (Bind _ s) = s | ||
|
||
thing :: forall p a . a -> a | ||
thing x = y | ||
where | ||
y :: a | ||
y = x | ||
|
||
stuff :: forall p a . a -> Scope p -> a | ||
stuff x Empty = x | ||
stuff x (Bind _ _) = x | ||
|
||
more :: forall p a b . b -> a -> Scope p -> Scope p | ||
more _ _ Empty = Empty | ||
more _ _ (Bind _ s) = s | ||
|
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 |
---|---|---|
|
@@ -13,3 +13,8 @@ bar x y f = baz y | |
baz :: b -> b | ||
baz z = f (f z) | ||
|
||
data D = MakeD Bool | ||
|
||
mybool :: Bool | ||
mybool = False | ||
|