Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency purescript to v0.15.15 #153

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 19, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
purescript 0.15.9 -> 0.15.15 age adoption passing confidence

Release Notes

purescript/purescript (purescript)

v0.15.15

Compare Source

New features:

  • Add --exclude-file to more commands (#​4530 by @​JordanMartinez)

    This CLI arg was added to the compile command, but not to other commands
    where such a usage would be relevant (e.g. docs, repl, graph, and ide).

  • Enable passing source input globs via --source-globs-file path/to/file (#​4530 by @​JordanMartinez)

    --source-globs-file support has been added to the following commands:
    compile, docs, graph, ide, and publish.

    Due to a shell character limitation on Windows where a large list of
    source globs cannot be passed (e.g. purs compile ... glob1000/src/**/*.purs),
    source globs can be stored in a file according to the format below
    and the file is passed in instead via purs compile ---source-globs-file path/to/file.

v0.15.14

Compare Source

Bugfixes:

  • Fix a compilation memory regression for very large files (#​4521 by @​mjrussell)

    When compiling a a very large file (>12K lines)
    the CSE pass could balloon memory and result in increased
    compilation times.

    This fix uses a strict Map instead of a lazy Map to avoid
    building up unnecessary thunks during the optimization pass.

  • Fix two space leaks while compiling many modules (#​4517 by @​MonoidMusician)

    The first would interleave compilation of too many modules at once, which
    would increase memory usage, especially for single threaded builds with
    +RTS -N1 -RTS. Now the number of concurrent modules is limited to
    the number of threads available to the
    GHC runtime system.

    The second would hold on to memory from modules that compiled with warnings
    until the end of the build when the warnings were printed and the memory freed.
    This is now fixed with additional NFData instances.

v0.15.13

Compare Source

New features:

  • Replace UnusableDeclaration with updated NoInstanceFound (#​4513 by @​JordanMartinez)

    Previously, the following type class would be invalid
    because there was no way for the compiler to infer
    which type class instance to select because
    the type variable in the class head a was
    not mentioned in bar's type signature:

    class Foo a where
      bar :: Int

    The recently-added visible type applications (VTAs)
    can now be used to guide the compiler in such cases:

    class Foo a where bar :: Int
    instance Foo String where bar = 0
    someInt = bar @​String -- use the `String` instance

    Without VTAs, the compiler
    will still produce an InstanceNotFound error, but this error
    has been updated to note which type variables in the class head
    can only be disambiguated via visible type applications.
    Given the following code

    class Single tyVarDoesNotAppearInBody where 
      useSingle :: Int
    
    single :: Int
    single = useSingle

    The error reported for useSingle will be:

    No type class instance was found for
    
      Main.Single t0
    
    The instance head contains unknown type variables.
    
    Note: The following type class members found in the expression require visible type applications 
    to be unambiguous (e.g. tyClassMember @​Int).
      Main.useSingle
        tyNotAppearInBody
    

    For a multiparameter typeclass with functional dependencies...

    class MultiFdBidi a b | a -> b, b -> a where
      useMultiFdBidi :: Int
    
    multiFdBidi :: Int
    multiFdBidi = useMultiFdBidi

    ...the "Note" part is updated to read

    Note: The following type class members found in the expression require visible type applications 
    to be unambiguous (e.g. tyClassMember @​Int).
      Main.useMultiFdBidi
        One of the following sets of type variables:
          a
          b
    

Bugfixes:

v0.15.12

Compare Source

New features:

  • Move the closed record update optimization (#​4489 by @​rhendric)

    For consumers of CoreFn like alternate backends, the optimization of
    replacing a closed record update with an object literal has now been moved to
    the point of desugaring CoreFn into JS. The ObjectUpdate expression
    constructor now contains a Maybe field holding a list of record labels to
    be copied as-is, for backends that want to perform this optimization also.

  • Allow instances that require Fail to be empty (#​4490 by @​rhendric)

    A class instance declaration that has Prim.TypeError.Fail as a constraint
    will never be used. In light of this, such instances are now allowed to have
    empty bodies even if the class has members.

    (Such instances are still allowed to declare all of their members, and it is
    still an error to specify some but not all members.)

Bugfixes:

  • Stop emitting warnings for wildcards in Visible Type Applications (#​4492 by @​JordanMartinez)

    Previously, the below usage of a wildcard (i.e. _) would
    incorrectly cause the compiler to emit a warning.

    f :: forall @​a. a -> a
    f = identity
    
    x :: { x :: Int }
    x = f @​{ x :: _ } { x: 42 }
  • Infer types using VTA inside a record (#​4501 by @​JordanMartinez)

    Previously, use would fail to compile
    because the v type variable would not be inferred
    to String. Now the below code compiles:

    reflect :: forall @​t v . Reflectable t v => v
    reflect = reflectType (Proxy @​t)
    
    use :: String
    use = show { asdf: reflect @​"asdf" }

Internal:

v0.15.11

Compare Source

Please use 0.15.12 instead of this release. There was an issue with the Linux build. This release notes were moved into 0.15.12's release notes.

v0.15.10

Compare Source

New features:

  • Implement visible type applications

    The compiler now supports visible type applications, allowing the user to instantiate one or more "visible" type variables to a specific type.

    A "visible" type variable is a type variable in a forall binder that appears prefixed with an @, like the following example:

    id :: forall @​a. a -> a  -- or with kinds: `forall (@​a :: Type). a -> a`
    id a = a

    We can then use type application syntax to instantiate this binding to a specific type:

    idInt :: Int -> Int
    idInt = id @​Int
    
    example :: Int
    example = id @​Int 0

    Type variables appearing in class or data are automatically visible, meaning that they do not require annotations:

    data Maybe a = Just a | Nothing
    
    nothingInt :: Maybe Int
    nothingInt = Nothing @​Int
    
    class Identity a where
      identity :: a -> a
    
    instance Identity Int where
      identity a = a
    
    identityInt = identity @​Int
    
    -- This throws a `NoInstanceFound` error.
    identityNumber = identity @​Number

    Lastly, visible type variables can also be skipped with a wildcard (i.e. _)

    data Either a b = Left a | Right b
    
    example = Left @​_ @​Number 0

    Note that performing a type application with a type that has no visible type variables throws an error:

    module Main where
    
    id :: forall a. a -> a
    id a = a
    
    idInt = id @​Int
    
    {-
    Error found:
    in module Main
    at Main.purs:6:9 - 6:16 (line 6, column 9 - line 6, column 16)
    
      An expression of polymorphic type
      with the invisible type variable a:
                      
        forall a. a -> a
                      
      cannot be applied to:
         
        Int
         
    
    while inferring the type of id
    in value declaration idInt
    
    See https://github.com/purescript/documentation/blob/master/errors/CannotApplyExpressionOfTypeOnType.md for more information,
    or to contribute content related to this error.
    -}

    Similarly, monomorphic types also cannot be used for type applications:

    module Main where
    
    idInt :: Int -> Int
    idInt a = a
    
    example = idInt @​Int
    
    {-
    Error found:
    in module Main
    at Main.purs:6:11 - 6:21 (line 6, column 11 - line 6, column 21)
    
      An expression of monomorphic type:
                
        Int -> Int
                
      cannot be applied to:
         
        Int
         
    
    while inferring the type of idInt
    in value declaration example
    
    See https://github.com/purescript/documentation/blob/master/errors/CannotApplyExpressionOfTypeOnType.md for more information,
    or to contribute content related to this error.
    -}
  • Exclude files from compiler input (#​4480 by @​i-am-the-slime)

    The compiler now supports excluding files from the globs given to it as input.
    This means there's now a new option for purs compile, namely
    --exclude-files (or the short version -x):

    > purs compile --help
    Usage: purs compile [FILE] [-x|--exclude-files ARG] [-o|--output ARG] ...
    
      Compile PureScript source files
    
    Available options:
      -h,--help                Show this help text
      FILE                     The input .purs file(s).
      -x,--exclude-files ARG   Glob of .purs files to exclude from the supplied
                              files.
      ...

    This allows you to keep related files closer together (that is, colocate them).

    Consider a setup like the following:

    src/
        Main.purs
        View/
            LoginPage.purs
            LoginPageTest.purs
            LoginPageStories.purs

    In order to exclude the files in the example above you can now invoke purs
    like this and it will only compile LoginPage.purs:

    purs compile "src/**/*.purs" --exclude-files "src/**/*Stories.purs" -x "src/**/*Test.purs"

    With spago, the equivalent command is:

    spago build --purs-args '-x "src/**/*Test.purs" -x "src/**/*Stories.purs"'

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title Update dependency purescript to v0.15.10 Update dependency purescript to v0.15.11 Sep 29, 2023
@renovate renovate bot changed the title Update dependency purescript to v0.15.11 Update dependency purescript to v0.15.12 Oct 7, 2023
@renovate renovate bot changed the title Update dependency purescript to v0.15.12 Update dependency purescript to v0.15.13 Nov 21, 2023
@renovate renovate bot changed the title Update dependency purescript to v0.15.13 Update dependency purescript to v0.15.14 Jan 3, 2024
@renovate renovate bot changed the title Update dependency purescript to v0.15.14 Update dependency purescript to v0.15.15 Feb 7, 2024
@renovate renovate bot force-pushed the renovate/purescript-0.x branch 2 times, most recently from e042efc to cbd8acd Compare April 4, 2024 20:49
@renovate renovate bot force-pushed the renovate/purescript-0.x branch 10 times, most recently from 6306e2d to b86fa65 Compare August 16, 2024 10:22
@MaybeJustJames MaybeJustJames merged commit 11b8056 into main Aug 16, 2024
2 checks passed
@renovate renovate bot deleted the renovate/purescript-0.x branch August 16, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant