Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
primitive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
primitive
Commits
a99c400a
Commit
a99c400a
authored
2 years ago
by
Andrew Martin
Browse files
Options
Downloads
Patches
Plain Diff
Small tweaks
parent
57f26f2a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Data/Primitive/Types.hs
+1
-1
1 addition, 1 deletion
Data/Primitive/Types.hs
test/main.hs
+1
-17
1 addition, 17 deletions
test/main.hs
with
2 additions
and
18 deletions
Data/Primitive/Types.hs
+
1
−
1
View file @
a99c400a
...
...
@@ -134,7 +134,7 @@ sizeOf x = I# (sizeOf# x)
alignment
::
Prim
a
=>
a
->
Int
alignment
x
=
I
#
(
alignment
#
x
)
-- | @since 0.
6.5
.0
-- | @since 0.
9.0
.0
instance
Prim
a
=>
Prim
(
Complex
a
)
where
sizeOf
#
_
=
2
#
*#
sizeOf
#
(
undefined
::
a
)
alignment
#
_
=
alignment
#
(
undefined
::
a
)
...
...
This diff is collapsed.
Click to expand it.
test/main.hs
+
1
−
17
View file @
a99c400a
...
...
@@ -153,9 +153,6 @@ main = do
,
testGroup
"DefaultSetMethod"
[
lawsToTest
(
primLaws
(
Proxy
::
Proxy
DefaultSetMethod
))
]
,
testGroup
"Complex"
[
lawsToTest
(
primLaws
(
Proxy
::
Proxy
(
Complex
Double
)))
]
#
if
__GLASGOW_HASKELL__
>=
805
,
testGroup
"PrimStorable"
[
lawsToTest
(
QCC
.
storableLaws
(
Proxy
::
Proxy
Derived
))
...
...
@@ -182,30 +179,17 @@ main = do
,
renameLawsToTest
"Last"
(
primLaws
(
Proxy
::
Proxy
(
Semigroup
.
Last
Int16
)))
,
renameLawsToTest
"Min"
(
primLaws
(
Proxy
::
Proxy
(
Semigroup
.
Min
Int16
)))
,
renameLawsToTest
"Max"
(
primLaws
(
Proxy
::
Proxy
(
Semigroup
.
Max
Int16
)))
]
,
testGroup
"Newtypes"
[
lawsToTest
(
primLaws
(
Proxy
::
Proxy
(
Const
Int16
Int16
)))
,
lawsToTest
(
primLaws
(
Proxy
::
Proxy
(
Down
Int16
)))
,
lawsToTest
(
primLaws
(
Proxy
::
Proxy
(
Identity
Int16
)))
,
lawsToTest
(
primLaws
(
Proxy
::
Proxy
(
Monoid
.
Dual
Int16
)))
,
lawsToTest
(
primLaws
(
Proxy
::
Proxy
(
Monoid
.
Sum
Int16
)))
,
lawsToTest
(
primLaws
(
Proxy
::
Proxy
(
Monoid
.
Product
Int16
)))
,
lawsToTest
(
primLaws
(
Proxy
::
Proxy
(
Semigroup
.
First
Int16
)))
,
lawsToTest
(
primLaws
(
Proxy
::
Proxy
(
Semigroup
.
Last
Int16
)))
,
lawsToTest
(
primLaws
(
Proxy
::
Proxy
(
Semigroup
.
Min
Int16
)))
,
lawsToTest
(
primLaws
(
Proxy
::
Proxy
(
Semigroup
.
Max
Int16
)))
,
renameLawsToTest
"Complex"
(
primLaws
(
Proxy
::
Proxy
(
Complex
Double
)))
]
]
deriving
instance
Arbitrary
a
=>
Arbitrary
(
Down
a
)
-- Const, Dual, Sum, Product: all have Arbitrary instances defined
-- in QuickCheck itself
#
if
MIN_VERSION_base
(
4
,
9
,
0
)
deriving
instance
Arbitrary
a
=>
Arbitrary
(
Semigroup
.
First
a
)
deriving
instance
Arbitrary
a
=>
Arbitrary
(
Semigroup
.
Last
a
)
deriving
instance
Arbitrary
a
=>
Arbitrary
(
Semigroup
.
Min
a
)
deriving
instance
Arbitrary
a
=>
Arbitrary
(
Semigroup
.
Max
a
)
#
endif
word8
::
Proxy
Word8
word8
=
Proxy
...
...
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