Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CoPaR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Informatik 8
CoPaR
Commits
8182aa5a
Commit
8182aa5a
authored
6 years ago
by
Hans-Peter Deifel
Browse files
Options
Downloads
Patches
Plain Diff
Remove product functor
This was long obsoleted by the polynomial functor
parent
0f631281
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ma.cabal
+0
-1
0 additions, 1 deletion
ma.cabal
src/MA/Functors/Product.hs
+0
-56
0 additions, 56 deletions
src/MA/Functors/Product.hs
with
0 additions
and
57 deletions
ma.cabal
+
0
−
1
View file @
8182aa5a
...
...
@@ -35,7 +35,6 @@ library
, MA.Functors.Bag
, MA.Functors.MonoidValued
, MA.Functors.Distribution
, MA.Functors.Product
, MA.Functors.Polynomial
, MA.Functors.SomeFunctor
, MA.Parser
...
...
This diff is collapsed.
Click to expand it.
src/MA/Functors/Product.hs
deleted
100644 → 0
+
0
−
56
View file @
0f631281
module
MA.Functors.Product
(
product
,
Product
(
..
)
)
where
import
Control.Monad
(
void
)
import
Prelude
hiding
(
product
)
import
Data.Tuple.Extra
(
both
)
import
MA.RefinementInterface
import
qualified
MA.Parser.Lexer
as
L
import
MA.FunctorExpression.Parser
import
MA.Coalgebra.RefinementTypes
import
MA.Coalgebra.Parser
data
Product
a
=
Product
a
a
deriving
(
Show
,
Functor
,
Foldable
,
Traversable
)
product
::
FunctorParser
Product
product
=
infixR
$
do
void
$
L
.
symbol
"×"
return
Product
data
Side
=
L
|
R
deriving
(
Eq
)
data
Three
=
ToRest
|
ToCompound
|
ToSub
deriving
(
Show
,
Eq
,
Ord
,
Enum
)
type
instance
H1
Product
=
()
type
instance
H3
Product
=
(
Three
,
Three
)
type
instance
Label
Product
=
Side
type
instance
Weight
Product
=
(
Bool
,
Bool
)
instance
ParseMorphism
Product
where
parseMorphismPoint
(
Product
parseLeft
parseRight
)
=
L
.
parens
$
do
left
<-
parseLeft
void
L
.
comma
right
<-
parseRight
return
(
()
,
[(
left
,
L
),
(
right
,
R
)])
instance
RefinementInterface
Product
where
init
::
H1
Product
->
[
Label
Product
]
->
Weight
Product
init
_
_
=
(
True
,
True
)
update
::
[
Label
Product
]
->
Weight
Product
->
(
Weight
Product
,
H3
Product
,
Weight
Product
)
update
labels
(
left
,
right
)
=
val
up
where
val
h3
=
(
both
(
==
ToSub
)
h3
,
h3
,
both
(
==
ToCompound
)
h3
)
up
=
(
left
+?
(
L
`
elem
`
labels
),
right
+?
(
R
`
elem
`
labels
))
(
+?
)
::
Bool
->
Bool
->
Three
a
+?
b
=
toEnum
(
fromEnum
a
+
fromEnum
b
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment