-
Notifications
You must be signed in to change notification settings - Fork 81
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
Showing
23 changed files
with
249 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
data Proxy _ = Proxy |
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 @@ | ||
data Proxy _ = Proxy |
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,15 @@ | ||
module MyModule (default Monoid) where | ||
|
||
default (Int, Foo, Bar) | ||
|
||
default | ||
( Int, | ||
Foo, | ||
Bar | ||
) | ||
|
||
default Num (Int, Float) | ||
|
||
default IsList ([], Vector) | ||
|
||
default IsString (Text.Text, Foundation.String, String) |
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,6 +1,13 @@ | ||
module MyModule (default Monoid) where | ||
|
||
default ( Int , Foo , Bar ) | ||
|
||
default ( Int | ||
, Foo, | ||
Bar | ||
) | ||
|
||
default Num (Int, Float) | ||
default IsList ([], Vector) | ||
|
||
default IsString (Text.Text, Foundation.String, String) |
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 @@ | ||
type Const a _ = 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 @@ | ||
type Const a _ = a |
36 changes: 36 additions & 0 deletions
36
data/examples/declaration/value/function/pattern/or-patterns-out.hs
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,36 @@ | ||
{-# LANGUAGE PatternSynonyms #-} | ||
|
||
tasty (Cupcake; Cookie) = True | ||
tasty (Liquorice; Raisins) = False | ||
|
||
f :: (Eq a, Show a) => a -> a -> Bool | ||
f a ((== a) -> True; show -> "yes") = True | ||
f _ _ = False | ||
|
||
small (abs -> (0; 1; 2); 3) = True -- -3 is not small | ||
small _ = False | ||
|
||
type Coll a = Either [a] (Set a) | ||
|
||
pattern None <- (Left []; Right (toList -> [])) | ||
|
||
case e of | ||
1; 2; 3 -> x | ||
4; (5; 6) -> y | ||
|
||
sane e = case e of | ||
1 | ||
2 | ||
3 -> a | ||
4 | ||
5 | ||
6 -> b | ||
7; 8 -> c | ||
|
||
insane e = case e of | ||
A _ _ | ||
B _ | ||
C -> 3 | ||
(D; E (Just _) Nothing) -> | ||
4 | ||
F -> 5 |
33 changes: 33 additions & 0 deletions
33
data/examples/declaration/value/function/pattern/or-patterns.hs
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 @@ | ||
{-# LANGUAGE PatternSynonyms #-} | ||
|
||
tasty (Cupcake; Cookie) = True | ||
tasty (Liquorice; Raisins) = False | ||
|
||
f :: (Eq a, Show a) => a -> a -> Bool | ||
f a ((== a) -> True; show -> "yes") = True | ||
f _ _ = False | ||
|
||
small (abs -> (0; 1; 2); 3) = True -- -3 is not small | ||
small _ = False | ||
|
||
type Coll a = Either [a] (Set a) | ||
pattern None <- (Left []; Right (toList -> [])) | ||
|
||
case e of | ||
1; 2; 3 -> x | ||
4; (5; 6) -> y | ||
|
||
sane e = case e of | ||
1 | ||
2 | ||
3 -> a | ||
4 | ||
5;6 -> b | ||
7;8 -> c | ||
|
||
insane e = case e of | ||
A _ _; B _ | ||
C -> 3 | ||
(D; E (Just _) Nothing) | ||
-> 4 | ||
F -> 5 |
22 changes: 22 additions & 0 deletions
22
data/examples/declaration/value/function/required-type-arguments-2-out.hs
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,22 @@ | ||
{-# LANGUAGE LinearTypes #-} | ||
{-# LANGUAGE UnicodeSyntax #-} | ||
|
||
ex1 = f (forall a. Proxy a) | ||
|
||
ex2 = f ((ctx) => Int) | ||
|
||
ex2' = f ((ctx, ctx') => Int) | ||
|
||
ex3 = f (String -> Bool) | ||
|
||
long = | ||
f | ||
( forall m a. | ||
(A a, M m) => | ||
String -> | ||
Bool %1 -> | ||
Maybe Int -> | ||
Maybe | ||
(String, Int) %1 -> | ||
Word %m -> Text | ||
) |
14 changes: 14 additions & 0 deletions
14
data/examples/declaration/value/function/required-type-arguments-2.hs
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,14 @@ | ||
{-# LANGUAGE UnicodeSyntax #-} | ||
{-# LANGUAGE LinearTypes #-} | ||
|
||
ex1 = f (forall a. Proxy a) | ||
ex2 = f (ctx => Int) | ||
ex2' = f ((ctx,ctx') => Int) | ||
ex3 = f (String -> Bool) | ||
|
||
long = f (forall m a. (A a, M m) => String | ||
-> Bool %1 -> | ||
Maybe Int | ||
-> Maybe | ||
(String,Int) | ||
⊸ Word %m -> Text ) |
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,3 +1,3 @@ | ||
src/Database/Esqueleto/Internal/Internal.hs:434:1 | ||
src/Database/Esqueleto/Internal/Internal.hs:(433,5)-(434,0) | ||
The GHC parser (in Haddock mode) failed: | ||
[GHC-21231] lexical error in string/character literal at character 's' | ||
[GHC-21231] lexical error at character '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
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
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
Oops, something went wrong.