Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
5601845d
Commit
5601845d
authored
Jan 15, 2012
by
chak@cse.unsw.edu.au.
Browse files
Adapt 'dph-classes' to class support in dph-lifted-vseg
parent
0a797ea3
Changes
1
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/dph/classes/DefsVect.hs
View file @
5601845d
...
...
@@ -4,26 +4,12 @@
module
DefsVect
where
import
Data.Array.Parallel
import
Data.Array.Parallel.Prelude.Bool
import
Data.Array.Parallel.Prelude.Int
(
Int
,
sumP
)
{-# VECTORISE class Eq #-}
{-# VECTORISE SCALAR instance Eq Bool #-}
-- {-# VECTORISE SCALAR instance Eq Char #-}
{-# VECTORISE SCALAR instance Eq Int #-}
{-# VECTORISE SCALAR instance Eq Word8 #-}
-- {-# VECTORISE SCALAR instance Eq Float #-}
{-# VECTORISE SCALAR instance Eq Double #-}
{-# VECTORISE SCALAR instance Eq Ordering #-}
{-# VECTORISE class Ord #-}
{-# VECTORISE SCALAR instance Ord Bool #-}
-- {-# VECTORISE SCALAR instance Ord Char #-}
{-# VECTORISE SCALAR instance Ord Int #-}
{-# VECTORISE SCALAR instance Ord Word8 #-}
-- {-# VECTORISE SCALAR instance Ord Float #-}
{-# VECTORISE SCALAR instance Ord Double #-}
{-# VECTORISE SCALAR instance Ord Ordering #-}
data
MyBool
=
MyTrue
|
MyFalse
...
...
@@ -31,6 +17,11 @@ data MyBool = MyTrue | MyFalse
class
Eq
a
=>
Cmp
a
where
cmp
::
a
->
a
->
Bool
-- FIXME:
-- instance Cmp Int where
-- cmp = (==)
-- isFive :: (Eq a, Num a) => a -> Bool
isFive
::
Int
->
Bool
isFive
x
=
x
==
5
...
...
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