Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
curry
curry-frontend
Commits
919b7459
Commit
919b7459
authored
Feb 09, 2016
by
Björn Peemöller
Browse files
Changed Cabal configuration to also expose a library
parent
5540f7ba
Changes
4
Hide whitespace changes
Inline
Side-by-side
curry-frontend.cabal
View file @
919b7459
Name: curry-frontend
Version: 0.4.1
Cabal-Version: >= 1.
6
Cabal-Version: >= 1.
10
Synopsis: Compile the functional logic language Curry to several
intermediate formats
Description: The Curry Frontend consists of the executable program "cymake".
...
...
@@ -33,19 +33,25 @@ Flag network-uri
description: Get Network.URI from the network-uri package
default: True
Executable cymake
hs-source-dirs: src
Main-is: cymake.hs
Build-Depends: base == 4.*, curry-base == 0.4.1
, containers, directory, mtl, process, transformers, syb
Library
hs-source-dirs: src
default-language: Haskell2010
Build-Depends:
base == 4.*
, containers
, curry-base == 0.4.1
, directory
, filepath
, mtl
, process
, syb
, transformers
if flag(network-uri)
build-depends: network-uri >= 2.6
else
build-depends: network < 2.6
ghc-options: -Wall
Other-Modules:
Paths_curry_frontend
, Base.CurryTypes
Exposed-Modules:
Base.CurryTypes
, Base.Expr
, Base.Messages
, Base.NestEnv
...
...
@@ -76,6 +82,7 @@ Executable cymake
, Env.TypeConstructor
, Env.Value
, Exports
, Files.CymakePath
, Generators
, Generators.GenAbstractCurry
, Generators.GenFlatCurry
...
...
@@ -96,10 +103,27 @@ Executable cymake
, Transformations.Lift
, Transformations.Qual
, Transformations.Simplify
Library
hs-source-dirs: src
Build-Depends: filepath
Exposed-Modules:
Files.CymakePath
Other-Modules:
Paths_curry_frontend
ghc-options: -Wall
Executable cymake
hs-source-dirs: src
Main-is: cymake.hs
default-language: Haskell2010
Build-Depends:
base == 4.*
, containers
, curry-base == 0.4.1
, curry-frontend
, directory
, filepath
, mtl
, process
, syb
, transformers
if flag(network-uri)
build-depends: network-uri >= 2.6
else
build-depends: network < 2.6
ghc-options: -Wall
src/Generators/GenFlatCurry.hs
View file @
919b7459
...
...
@@ -463,6 +463,7 @@ qualifyFieldDecl m (CS.FieldDecl p l ty) = CS.FieldDecl p l (qualifyCSType m ty)
qualifyCSType
::
ModuleIdent
->
CS
.
TypeExpr
->
CS
.
TypeExpr
qualifyCSType
mid
=
fromType
.
toQualType
mid
[]
-- TODO: Refactor
trApply
::
IL
.
Expression
->
IL
.
Expression
->
FlatState
Expr
trApply
e1
e2
=
genFlatApplic
[
e2
]
e1
where
...
...
src/Transformations/Simplify.hs
View file @
919b7459
...
...
@@ -338,8 +338,8 @@ expandPatternBindings :: [Ident] -> Decl -> SIM [Decl]
expandPatternBindings
fvs
d
@
(
PatternDecl
p
t
(
SimpleRhs
_
e
_
))
=
case
t
of
VariablePattern
_
->
return
[
d
]
_
->
do
pty
<-
getTypeOf
t
-- type of pattern
mapM
(
mkSelectorDecl
pty
)
(
filter
(`
elem
`
fvs
)
(
bv
t
))
-- used variables
pty
<-
getTypeOf
t
-- type of pattern
mapM
(
mkSelectorDecl
pty
)
(
filter
(`
elem
`
fvs
)
(
bv
t
))
-- used variables
where
mkSelectorDecl
pty
v
=
do
vty
<-
getTypeOf
v
...
...
src/cymake.hs
View file @
919b7459
...
...
@@ -20,8 +20,8 @@ import Base.Messages
import
Files.CymakePath
(
cymakeGreeting
,
cymakeVersion
)
import
Html.CurryHtml
(
source2html
)
import
CurryBuilder
(
buildCurry
)
import
CompilerOpts
(
Options
(
..
),
CymakeMode
(
..
),
getCompilerOpts
,
usage
)
import
CurryBuilder
(
buildCurry
)
import
CompilerOpts
(
Options
(
..
),
CymakeMode
(
..
),
getCompilerOpts
,
usage
)
-- |The command line tool cymake
main
::
IO
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment