Last active
August 4, 2020 07:40
-
-
Save sergv/b39d88500f68987046d06ca1ee54ffd0 to your computer and use it in GitHub Desktop.
Stack bug report with preprocessed file
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
import Distribution.Simple (defaultMainWithHooks) | |
import Distribution.Simple.UUAGC (uuagcLibUserHook) | |
import UU.UUAGC (uuagc) | |
main :: IO () | |
main = defaultMainWithHooks $ | |
uuagcLibUserHook uuagc |
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
name: | |
stack-bug-report | |
version: | |
0.1.0.0 | |
license: | |
BSD3 | |
cabal-version: | |
>= 1.16 | |
build-type: Custom | |
extra-source-files: | |
Test.ag | |
custom-setup | |
setup-depends: | |
base >= 4.7, | |
Cabal >= 1.16, | |
uuagc, | |
uuagc-cabal | |
library | |
exposed-modules: | |
Test | |
hs-source-dirs: | |
. | |
build-depends: | |
base >= 4.7 | |
default-language: | |
Haskell2010 | |
ghc-options: | |
-Wall |
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
resolver: lts-11.0 | |
packages: | |
- "." | |
extra-deps: | |
- uuagc-0.9.52.1 | |
- uuagc-cabal-1.1.0.0 | |
- uulib-0.9.23 |
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
module {Test} | |
{ | |
-- exports | |
module Test | |
} | |
{ | |
-- imports | |
} | |
data Tree | |
| Node left :: Tree | |
right :: Tree | |
| Tip value :: Int | |
attr Tree | |
syn sum :: Int | |
sem Tree | |
| Node lhs.sum = @left.sum + @right.sum | |
| Tip lhs.sum = @value | |
{ | |
testTree :: Tree | |
testTree = Node (Tip 1) (Node (Tip 2) (Tip 3)) | |
test :: Int | |
test = sem_Tree testTree | |
} |
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
-- The file that defines the ADT(s) | |
file : "Test.ag" | |
options : | |
haskellsyntax, | |
-- The data option exists because we want UUAGC to actually generate | |
-- a data definition from that description | |
data, | |
-- Optional: all fields in the data definition(s) are strict | |
strictdata, | |
-- The following two options have the compiler generate functions to access | |
-- the attributes from the outside | |
catas, | |
semfuns, | |
wrappers, | |
-- generate signatures for semantic functions | |
signatures, | |
-- optimize generated code | |
optimize, | |
pretty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment