Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
curry
curry-frontend
Commits
536bf829
Commit
536bf829
authored
Oct 20, 2017
by
Finn Teegen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove monadlist dependency
parent
c94cb66c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
12 deletions
+17
-12
curry-frontend.cabal
curry-frontend.cabal
+0
-2
src/Base/Utils.hs
src/Base/Utils.hs
+14
-4
src/Checks/TypeCheck.hs
src/Checks/TypeCheck.hs
+1
-2
src/Transformations/Derive.hs
src/Transformations/Derive.hs
+1
-2
src/Transformations/Desugar.hs
src/Transformations/Desugar.hs
+1
-2
No files found.
curry-frontend.cabal
View file @
536bf829
...
...
@@ -48,7 +48,6 @@ Library
, directory
, extra >= 1.4.6
, filepath
, monadlist
, mtl
, pretty
, process
...
...
@@ -147,7 +146,6 @@ Executable curry-frontend
, directory
, extra >= 1.4.6
, filepath
, monadlist
, mtl
, pretty
, process
...
...
src/Base/Utils.hs
View file @
536bf829
...
...
@@ -3,10 +3,10 @@
Description : Auxiliary functions
Copyright : (c) 2001 - 2003 Wolfgang Lux
2011 - 2015 Björn Peemöler
2016
Finn Teegen
2016
- 2017
Finn Teegen
License : BSD-3-clause
Maintainer :
bjp
@informatik.uni-kiel.de
Maintainer :
fte
@informatik.uni-kiel.de
Stability : experimental
Portability : portable
...
...
@@ -17,10 +17,12 @@
module
Base.Utils
(
fst3
,
snd3
,
thd3
,
curry3
,
uncurry3
,
(
++!
),
foldr2
,
findDouble
,
findMultiples
,
(
++!
),
foldr2
,
mapAccumM
,
findDouble
,
findMultiples
)
where
import
Data.List
(
partition
)
import
Control.Monad
(
MonadPlus
,
mzero
,
mplus
)
import
Data.List
(
partition
)
infixr
5
++!
...
...
@@ -65,6 +67,14 @@ foldr2 _ z [] _ = z
foldr2
_
z
_
[]
=
z
foldr2
f
z
(
x
:
xs
)
(
y
:
ys
)
=
f
x
y
(
foldr2
f
z
xs
ys
)
mapAccumM
::
(
Monad
m
,
MonadPlus
p
)
=>
(
acc
->
x
->
m
(
acc
,
y
))
->
acc
->
[
x
]
->
m
(
acc
,
p
y
)
mapAccumM
_
z
[]
=
return
(
z
,
mzero
)
mapAccumM
f
z
(
x
:
xs
)
=
do
(
z'
,
y
)
<-
f
z
x
(
z''
,
ys
)
<-
mapAccumM
f
z'
xs
return
(
z''
,
return
y
`
mplus
`
ys
)
-- The function 'findDouble' checks whether a list of entities is linear,
-- i.e., if every entity in the list occurs only once. If it is non-linear,
-- the first offending object is returned.
...
...
src/Checks/TypeCheck.hs
View file @
536bf829
...
...
@@ -42,7 +42,6 @@ import Control.Applicative ((<$>), (<*>))
import
Control.Monad.Extra
(
(
&&^
),
allM
,
filterM
,
foldM
,
liftM
,
notM
,
replicateM
,
unless
,
unlessM
)
import
Control.Monad.ListM
(
mapAccumM
)
import
qualified
Control.Monad.State
as
S
(
State
,
runState
,
gets
,
modify
)
import
Data.List
(
nub
,
nubBy
,
partition
,
sortBy
)
import
Data.Function
(
on
)
...
...
@@ -68,7 +67,7 @@ import Base.TopEnv
import
Base.TypeExpansion
import
Base.Types
import
Base.TypeSubst
import
Base.Utils
(
foldr2
,
fst3
,
snd3
,
thd3
,
uncurry3
)
import
Base.Utils
(
foldr2
,
fst3
,
snd3
,
thd3
,
uncurry3
,
mapAccumM
)
import
Env.Class
import
Env.Instance
...
...
src/Transformations/Derive.hs
View file @
536bf829
...
...
@@ -16,7 +16,6 @@ module Transformations.Derive (derive) where
#
if
__GLASGOW_HASKELL__
<
710
import
Control.Applicative
((
<$>
))
#
endif
import
Control.Monad.ListM
(
mapAccumM
)
import
qualified
Control.Monad.State
as
S
(
State
,
evalState
,
gets
,
modify
)
import
Data.List
(
intercalate
,
intersperse
)
import
Data.Maybe
(
fromJust
,
isJust
)
...
...
@@ -31,7 +30,7 @@ import Base.Messages (internalError)
import
Base.Types
import
Base.TypeSubst
(
instanceType
)
import
Base.Typing
(
typeOf
)
import
Base.Utils
(
snd3
)
import
Base.Utils
(
snd3
,
mapAccumM
)
import
Env.Instance
import
Env.OpPrec
...
...
src/Transformations/Desugar.hs
View file @
536bf829
...
...
@@ -61,7 +61,6 @@ import Control.Applicative ((<$>), (<*>))
import
Control.Arrow
(
first
,
second
)
import
Control.Monad
(
liftM2
)
import
Control.Monad.Extra
(
concatMapM
)
import
Control.Monad.ListM
(
mapAccumM
)
import
qualified
Control.Monad.State
as
S
(
State
,
runState
,
gets
,
modify
)
import
Data.Foldable
(
foldrM
)
import
Data.List
(
(
\\
),
elemIndex
,
nub
,
partition
...
...
@@ -80,7 +79,7 @@ import Base.TypeExpansion
import
Base.Types
import
Base.TypeSubst
import
Base.Typing
import
Base.Utils
(
fst3
)
import
Base.Utils
(
fst3
,
mapAccumM
)
import
Env.TypeConstructor
(
TCEnv
,
TypeInfo
(
..
),
qualLookupTypeInfo
)
import
Env.Value
(
ValueEnv
,
ValueInfo
(
..
),
qualLookupValue
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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