Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions base/GraphRewriting/Graph/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

module GraphRewriting.Graph.Internal where

import Control.Monad.Fix
import Control.Monad.Reader
import Control.Monad.State
import Data.IntMap as Map (IntMap, lookup)
Expand Down
1 change: 1 addition & 0 deletions base/GraphRewriting/Graph/Read.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module GraphRewriting.Graph.Read (
)
where

import Control.Monad
import Control.Monad.Reader
import qualified Data.IntMap as Map
import qualified Data.IntSet as Set
Expand Down
2 changes: 1 addition & 1 deletion base/GraphRewriting/Pattern.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
module GraphRewriting.Pattern (module GraphRewriting.Pattern, PatternT, Pattern, Match, (<|>)) where

import Control.Applicative
import Control.Monad.List
import Control.Monad
import Control.Monad.Reader
import Data.Functor.Identity
import qualified Data.Set as Set (empty, insert, member)
Expand Down
1 change: 1 addition & 0 deletions base/GraphRewriting/Rule.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module GraphRewriting.Rule (Replace, module GraphRewriting.Rule) where

import Prelude.Unicode

import Control.Monad
import Control.Monad.Reader
import Control.Monad.State
import Data.List (nub)
Expand Down
2 changes: 1 addition & 1 deletion base/graph-rewriting.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Library
Build-Depends:
base >= 4.9 && < 5,
base-unicode-symbols >= 0.2 && < 0.3,
mtl >= 1.1 && < 2.3,
mtl >= 1.1 && < 2.4,
containers >= 0.3 && < 0.7
Exposed-Modules:
Data.View
Expand Down
8 changes: 0 additions & 8 deletions gl/cabal.project

This file was deleted.

18 changes: 17 additions & 1 deletion lambdascope/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ instance (Render n) => Render (Layout.Wrapper n) where render = render . wrappee
instance (PortSpec n) => PortSpec (Control.Wrapper n) where portSpec = portSpec . wrapped
instance (LeftmostOutermost n) => LeftmostOutermost (Layout.Wrapper n) where lmoPort = lmoPort . wrappee

instance Show NodeLS where
show _ = error "TODO: Implement or derive Show NodeLS"

instance Show Control where
show _ = error "TODO: Implement or derive Show Control"
instance Eq Control where
(==) _ _ = error "TODO: Implement or derive Eq Control"
instance Show (Control.Wrapper (Layout.Wrapper NodeLS)) where
show _ = error "TODO: Implement or derive Show (Control.Wrapper (Layout.Wrapper NodeLS))"
instance Eq (Control.Wrapper (Layout.Wrapper NodeLS)) where
(==) _ _ = error "TODO: Implement or derive Eq (Control.Wrapper (Layout.Wrapper NodeLS))"

main :: IO ()
main = do
(prog, args) <- UI.initialise
Expand Down Expand Up @@ -88,7 +100,11 @@ layoutStep n = do
rot <- angularMomentum n
return (cgf, cf, sf, rot)
Unsafe.adjustNode n $
Position . sf (\x -> min 10 (x * 0.9)) . cgf (\x -> min 10 (x * 0.01)) . cf (\x -> min 10 (100 / (x ^ 2 + 0.1))) . position
Position
. sf (\x -> min 10 (x * 0.9))
. cgf (\x -> min 10 (x * 0.01))
. cf (\x -> min 10 (100 / (x ^ 2 + 0.1)))
. position
Unsafe.adjustNode n $ rot (* 0.9)

lmoTree :: (LeftmostOutermost n, View [Port] n, View Control n) => LabelledTree (Rule n) -> LabelledTree (Rule n)
Expand Down
7 changes: 0 additions & 7 deletions lambdascope/cabal.project

This file was deleted.

2 changes: 1 addition & 1 deletion lambdascope/graph-rewriting-lambdascope.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Executable lambdascope
graph-rewriting-layout >= 0.5.4 && < 0.6,
graph-rewriting-gl >= 0.7.6 && < 0.8,
graph-rewriting-strategies >= 0.2.4 && < 0.3,
mtl >= 1.1 && < 2.3,
mtl >= 1.1 && < 2.4,
parsec >= 3.1 && < 3.2,
GLUT >= 2.2 && < 3,
OpenGL >= 3.0 && < 4,
Expand Down
3 changes: 0 additions & 3 deletions lib/cabal.project

This file was deleted.

6 changes: 0 additions & 6 deletions ski/cabal.project

This file was deleted.

3 changes: 1 addition & 2 deletions ski/graph-rewriting-ski.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ library
Common.GL,
INet.GL,
INet.Graph,
Main,
INet.Rules
hs-source-dirs: ., INet
default-language: Haskell2010
Expand Down Expand Up @@ -70,4 +69,4 @@ test-suite graph-rewriting-ski-tests
tasty-hunit,
graph-rewriting-ski
hs-source-dirs: tests
default-language: Haskell2010
default-language: Haskell2010
78 changes: 78 additions & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# This file was automatically generated by 'stack init'
#
# Some commonly used options have been documented as comments in this file.
# For advanced use and comprehensive documentation of the format, please see:
# https://docs.haskellstack.org/en/stable/configure/yaml/

# A 'specific' Stackage snapshot or a compiler version.
# A snapshot resolver dictates the compiler version and the set of packages
# to be used for project dependencies. For example:
#
# snapshot: lts-23.0
# snapshot: nightly-2024-12-13
# snapshot: ghc-9.8.4
#
# The location of a snapshot can be provided as a file or url. Stack assumes
# a snapshot provided as a file might change, whereas a url resource does not.
#
# snapshot: ./custom-snapshot.yaml
# snapshot: https://example.com/snapshots/2024-01-01.yaml
resolver: lts-23.18

# User packages to be built.
# Various formats can be used as shown in the example below.
#
# packages:
# - some-directory
# - https://example.com/foo/bar/baz-0.0.2.tar.gz
# subdirs:
# - auto-update
# - wai
packages:
- base
- lib
- strategies
- gl
- lambdascope
- layout
- ski
- trs
- ww

# Dependency packages to be pulled from upstream that are not in the snapshot.
# These entries can reference officially published versions as well as
# forks / in-progress versions pinned to a git hash. For example:
#
# extra-deps:
# - acme-missiles-0.3
# - git: https://github.com/commercialhaskell/stack.git
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
#
extra-deps:
- AC-Vector-2.4.0@sha256:e9b03da163208a948f47d294cfd9f496108d060a73c8a9d1f0ec9c9429d7f67d,1237
- indentparser-0.1@sha256:038219aa47c404d62994db118aaa40cbc44762f0af776b66f21190001e296edc,1605
- uu-parsinglib-2.9.2@sha256:cd1d7ac35d65afa3919b9918fa003b1c2a6aee9f77e1fb04d045cdc7c59fb03e,3094
- uu-interleaved-0.2.0.2@sha256:595e62dfca0e3a08e9fd37e102568313d4f3e2c29fab26a66f3640cc9412ecf3,1721
# Override default flag values for project packages and extra-deps
# flags: {}

# Extra package databases containing global packages
# extra-package-dbs: []

# Control whether we use the GHC we find on the path
# system-ghc: true
#
# Require a specific version of Stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: ">=3.3"
#
# Override the architecture used by Stack, especially useful on Windows
# arch: i386
# arch: x86_64
#
# Extra directories used by Stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]
#
# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor
40 changes: 40 additions & 0 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/topics/lock_files

packages:
- completed:
hackage: AC-Vector-2.4.0@sha256:e9b03da163208a948f47d294cfd9f496108d060a73c8a9d1f0ec9c9429d7f67d,1237
pantry-tree:
sha256: 2bef6641223aafbdca6e75eec4534b09edeb7edf40184e87438e099270d4e701
size: 1038
original:
hackage: AC-Vector-2.4.0@sha256:e9b03da163208a948f47d294cfd9f496108d060a73c8a9d1f0ec9c9429d7f67d,1237
- completed:
hackage: indentparser-0.1@sha256:038219aa47c404d62994db118aaa40cbc44762f0af776b66f21190001e296edc,1605
pantry-tree:
sha256: 785e74e17bbfb055994852f78fdd6d5dd8f2952b6183f36f9a2e46ce3410b705
size: 540
original:
hackage: indentparser-0.1@sha256:038219aa47c404d62994db118aaa40cbc44762f0af776b66f21190001e296edc,1605
- completed:
hackage: uu-parsinglib-2.9.2@sha256:cd1d7ac35d65afa3919b9918fa003b1c2a6aee9f77e1fb04d045cdc7c59fb03e,3094
pantry-tree:
sha256: 092f68d0da727a4884d1b293378031ab6c048aa8874d83cbbfb9e85a832f331b
size: 974
original:
hackage: uu-parsinglib-2.9.2@sha256:cd1d7ac35d65afa3919b9918fa003b1c2a6aee9f77e1fb04d045cdc7c59fb03e,3094
- completed:
hackage: uu-interleaved-0.2.0.2@sha256:595e62dfca0e3a08e9fd37e102568313d4f3e2c29fab26a66f3640cc9412ecf3,1721
pantry-tree:
sha256: 030748a52a5397cb0217fc58f4ea89f7c7f4daaafea71d95ca40335da9d9cecc
size: 237
original:
hackage: uu-interleaved-0.2.0.2@sha256:595e62dfca0e3a08e9fd37e102568313d4f3e2c29fab26a66f3640cc9412ecf3,1721
snapshots:
- completed:
sha256: d133abe75e408a407cce3f032c96ac1bbadf474a93b5156ebf4135b53382d56b
size: 683827
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/23/18.yaml
original: lts-23.18
1 change: 1 addition & 0 deletions trs/Graph.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ data Vertex
= Applicator {inp, out1, out2 :: Port}
| Variable {inp :: Port, name :: Char}
| Root {out :: Port}
deriving (Show, Eq)

instance View [Port] Vertex where
inspect node = case node of
Expand Down
1 change: 1 addition & 0 deletions ww/Graph.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ data NodeWW
| Eraser {inp :: Port}
| Duplicator {active :: Bool, inp, out1, out2 :: Port}
| Multiplexer {out :: Port, ins :: [Port]} -- only intermediate compilation result
deriving (Show, Eq)

instance View [Port] NodeWW where
inspect node = case node of
Expand Down
1 change: 1 addition & 0 deletions ww/Term.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

module Term where

import Control.Monad
import Control.Monad.Identity
import Prelude.Unicode
import Text.Parsec
Expand Down
2 changes: 1 addition & 1 deletion ww/graph-rewriting-ww.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Executable ww
graph-rewriting >= 0.7.8 && < 0.9,
graph-rewriting-layout >= 0.5.4 && < 0.6,
graph-rewriting-gl >= 0.7.6 && < 0.8,
mtl >= 1.1 && < 2.3,
mtl >= 1.1 && < 2.4,
parsec >= 3.1 && < 3.2,
GLUT >= 2.2 && < 3,
OpenGL >= 3.0 && < 4,
Expand Down