forked from purescript/purescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into restaumatic
- Loading branch information
Showing
17 changed files
with
73 additions
and
34 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 @@ | ||
* Fix compiler crash when a type operator is used in a type argument |
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 @@ | ||
* Remove the step that upgraded Git from the CI workflow |
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 @@ | ||
* Update Stackage snapshot to lts-20.26 and GHC to 9.2.8 |
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
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,43 @@ | ||
module Main where | ||
|
||
import Prelude | ||
|
||
import Data.Maybe (Maybe(..)) | ||
import Data.Tuple.Nested ((/\), type (/\)) | ||
import Effect (Effect) | ||
import Effect.Console (log) | ||
import Type.Proxy (Proxy(..)) | ||
|
||
singleArgument :: forall @a. a -> Unit | ||
singleArgument _ = unit | ||
|
||
multiArgument :: forall @a @b. a -> b -> Unit | ||
multiArgument _ _ = unit | ||
|
||
singleApplication :: Int /\ Number -> Unit | ||
singleApplication = singleArgument @(Int /\ Number) | ||
|
||
-- Like expression applications, visible type applications are left-associative. | ||
-- This test accounts for subsequent type applications nested in this manner. | ||
appNestingWorks :: Int /\ Number -> Number /\ Int -> Unit | ||
appNestingWorks = multiArgument @(Int /\ Number) @(Number /\ Int) | ||
|
||
-- This test accounts for type applications nested within other AST nodes. | ||
otherNestingWorks :: Array (Maybe (Int /\ Number)) | ||
otherNestingWorks = [Just @(Int /\ Number) (0 /\ 0.0), Just @(Int /\ Number) (1 /\ 1.0)] | ||
|
||
type InSynonym = Int /\ Number | ||
|
||
-- This test accounts for type synonyms used as type arguments. | ||
-- Since expansion happens during checking, InSynonym would expand | ||
-- to an already-desugared type operator. This test exists for the | ||
-- sake of redundancy. | ||
inSynonym :: InSynonym -> Unit | ||
inSynonym = singleArgument @InSynonym | ||
|
||
-- This test accounts for type operators used as type arguments directly. | ||
operatorAsArgument :: Proxy (/\) | ||
operatorAsArgument = Proxy @(/\) | ||
|
||
main :: Effect Unit | ||
main = log "Done" |