packages feed

rock 0.3.1.1 → 0.3.1.2

raw patch · 6 files changed

+66/−23 lines, 6 filesdep ~constraints-extrasdep ~dependent-hashmapdep ~dependent-sumnew-uploader

Dependency ranges changed: constraints-extras, dependent-hashmap, dependent-sum, deriving-compat, hashable, lifted-base, monad-control, mtl, transformers, transformers-base, unordered-containers

Files

CHANGELOG.md view
@@ -1,5 +1,13 @@ # Unreleased +# 0.3.1.2++- Add docs about query params, mention Eclair in README+- Add note about IO actions+- Fix template stages to build with GHC 9.2.2+- Fix build errors with GHC 9.6.2+- Add CI in GitHub Actions Workflow+ # 0.3.1.1  - Fix a concurrency bug in `memoiseWithCycleDetection`, where a race condition meant that it could sometimes throw a `Cyclic` exception when there weren't actually cycles
LICENSE view
@@ -1,4 +1,4 @@-Copyright Olle Fredriksson (c) 2018-2021+Copyright Olle Fredriksson (c) 2018-2023  All rights reserved. 
README.md view
@@ -1,12 +1,18 @@-# rock [![Build Status](https://travis-ci.com/ollef/rock.svg?branch=master)](https://travis-ci.com/ollef/rock) [![Hackage](https://img.shields.io/hackage/v/rock.svg)](https://hackage.haskell.org/package/rock)+# rock +[![Build Status](https://travis-ci.com/ollef/rock.svg?branch=master)](https://travis-ci.com/ollef/rock) +[![CI Status](https://github.com/ollef/rock/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/ollef/rock/actions/workflows/ci.yml)+[![Hackage](https://img.shields.io/hackage/v/rock.svg)](https://hackage.haskell.org/package/rock) ++ A build system inspired by [Build systems à la carte](https://www.microsoft.com/en-us/research/publication/build-systems-la-carte/). -Used in [Sixten](https://github.com/ollef/sixten) and-[Sixty](https://github.com/ollef/sixty) to achieve incremental and query driven-compiler architectures.+Used in [Sixten](https://github.com/ollef/sixten),+[Sixty](https://github.com/ollef/sixty) and+[Eclair](https://github.com/luc-tielen/eclair-lang) to achieve incremental and+query driven compiler architectures. -# Example+## Example  ```haskell {-# language FlexibleInstances #-}@@ -86,11 +92,34 @@ 70 ``` -# Related projects+Note: Besides pure computations as shown above, the `Task` data type implements+`MonadIO`, so you can lift IO actions into the `Task` monad by using+`liftIO`! +## Query parameters++If you need to parametrize your queries (e.g. typechecking one specific file),+you can do this by adding additional arguments to your `Query` datatype:++```haskell+data Query a where+  Parse :: FilePath -> Query AST+  Typecheck :: FilePath -> Query (Either TypeError TypedAST)++rules :: Rock.Rules Query+rules key = case key of+  Parse file -> do+    _ -- parse the file..+  Typecheck file -> do+    ast <- Rock.fetch (Parse file)+    _ -- typecheck file..+```++## Related projects+ * [Shake](http://hackage.haskell.org/package/shake) * [Salsa](https://crates.io/crates/salsa) -# Contributions+## Contributions  ... are very welcome, especially in the areas of documentation and examples.
rock.cabal view
@@ -1,5 +1,5 @@ name:                rock-version:             0.3.1.1+version:             0.3.1.2 synopsis:            A build system for incremental, parallel, and demand-driven computations description:         See <https://www.github.com/ollef/rock> for more                      information and@@ -10,7 +10,7 @@ license-file:        LICENSE author:              Olle Fredriksson maintainer:          fredriksson.olle@gmail.com-copyright:           2018-2021 Olle Fredriksson+copyright:           2018-2023 Olle Fredriksson category:            Development build-type:          Simple extra-source-files:@@ -21,6 +21,9 @@                    , GHC == 8.4.3                    , GHC == 8.6.5                    , GHC == 8.8.3+                   , GHC == 9.2.2+                   , GHC == 9.4.4+                   , GHC == 9.6.2  library   ghc-options:         -Wall@@ -39,17 +42,17 @@                        Rock.Core                        Rock.Traces   build-depends:       base >= 4.7 && < 5-                     , constraints-extras >= 0.3-                     , dependent-hashmap >= 0.1-                     , dependent-sum >= 0.6-                     , deriving-compat >= 0.5-                     , hashable >= 1.3-                     , lifted-base >= 0.2-                     , monad-control >= 1.0-                     , mtl >= 2.2-                     , transformers >= 0.5-                     , transformers-base >= 0.4-                     , unordered-containers >= 0.2+                     , constraints-extras >= 0.4.0 && < 0.5+                     , dependent-hashmap >= 0.1.0 && < 0.2+                     , dependent-sum >= 0.7.2 && < 0.8+                     , deriving-compat >= 0.6.5 && < 0.7+                     , hashable >= 1.4.3 && < 1.5+                     , lifted-base >= 0.2.3 && < 0.3+                     , monad-control >= 1.0.3 && < 1.1+                     , mtl >= 2.3.1 && < 2.4+                     , transformers >= 0.6.1 && < 0.7+                     , transformers-base >= 0.4.6 && < 0.5+                     , unordered-containers >= 0.2.19 && < 0.3   default-language:    Haskell2010   default-extensions:  OverloadedStrings 
src/Rock/Core.hs view
@@ -9,15 +9,18 @@ {-# language ScopedTypeVariables #-} {-# language TupleSections #-} {-# language TypeFamilies #-}+{-# language TypeOperators #-} {-# language UndecidableInstances #-} module Rock.Core where  import Control.Concurrent.Lifted import Control.Exception.Lifted import Data.IORef.Lifted+import Control.Monad import Control.Monad.Base import Control.Monad.Cont import Control.Monad.Except+import Control.Monad.Fix import Control.Monad.Identity import Control.Monad.Reader import qualified Control.Monad.RWS.Lazy as Lazy
tests/Main.hs view
@@ -49,8 +49,6 @@       IntKey i -> hashWithSalt salt (0 :: Int, i)       StringKey s -> hashWithSalt salt (1 :: Int, s) -deriveArgDict ''Key- instance GEq Key where   geq (IntKey i1) (IntKey i2)     | i1 == i2 =@@ -80,6 +78,8 @@       GLT     | otherwise =       GGT++deriveArgDict ''Key  int :: Gen Int int = Gen.int (Range.linear 0 100)