Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
258d5542
Commit
258d5542
authored
Nov 08, 2012
by
ian@well-typed.com
Browse files
Remove duplicate test
parent
c1b677ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/indexed-types/should_compile/T7332.hs
deleted
100644 → 0
View file @
c1b677ff
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MagicHash #-}
module
Oleg
where
import
GHC.Exts
hiding
(
build
)
import
Data.Monoid
newtype
DC
d
=
DC
d
deriving
(
Show
,
Monoid
)
instance
IsString
(
DC
String
)
where
fromString
=
DC
class
Monoid
acc
=>
Build
acc
r
where
type
BuildR
r
::
*
-- Result type
build
::
(
acc
->
BuildR
r
)
->
acc
->
r
instance
Monoid
dc
=>
Build
dc
(
DC
dx
)
where
type
BuildR
(
DC
dx
)
=
DC
dx
build
tr
acc
=
tr
acc
instance
(
Build
dc
r
,
a
~
dc
)
=>
Build
dc
(
a
->
r
)
where
type
BuildR
(
a
->
r
)
=
BuildR
r
build
tr
acc
s
=
build
tr
(
acc
`
mappend
`
s
)
-- The type is inferred
tspan
::
(
Monoid
d
,
Build
(
DC
d
)
r
,
BuildR
r
~
DC
d
)
=>
r
tspan
=
build
(
id
::
DC
d
->
DC
d
)
mempty
foo
=
tspan
"aa"
{- Need (Monoid d, Build (DC d) (a -> t), BuildR (a -> t) ~ DC d, IsString a)
BuildR (a -> t) = BuildR t
Build (DC d) (a -> t) ===> (Build (DC d) t, a ~ DC d)
-}
foo1
=
tspan
(
tspan
"aa"
)
bar
=
tspan
"aa"
::
DC
String
testsuite/tests/indexed-types/should_compile/all.T
View file @
258d5542
...
...
@@ -200,6 +200,5 @@ test('T7156', normal, compile, [''])
test
('
T5591a
',
normal
,
compile
,
[''])
test
('
T5591b
',
normal
,
compile
,
[''])
test
('
T7280
',
normal
,
compile
,
[''])
test
('
T7332
',
normal
,
compile
,
[''])
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