Workaround for #340
This commit is contained in:
6
test/data/pattern-synonyms/A.hs
Normal file
6
test/data/pattern-synonyms/A.hs
Normal file
@@ -0,0 +1,6 @@
|
||||
{-# LANGUAGE PatternSynonyms #-}
|
||||
module A where
|
||||
|
||||
data SomeType a b = SomeType (a,b)
|
||||
|
||||
pattern MyPat x y <- SomeType (x,y)
|
||||
7
test/data/pattern-synonyms/B.hs
Normal file
7
test/data/pattern-synonyms/B.hs
Normal file
@@ -0,0 +1,7 @@
|
||||
{-# LANGUAGE PatternSynonyms #-}
|
||||
module B where
|
||||
import A
|
||||
|
||||
foo :: SomeType Int Char -> String
|
||||
foo x = case x of
|
||||
MyPat a b -> show a ++ " " ++ [b]
|
||||
2
test/data/pattern-synonyms/Setup.hs
Normal file
2
test/data/pattern-synonyms/Setup.hs
Normal file
@@ -0,0 +1,2 @@
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
24
test/data/pattern-synonyms/pattern-synonyms.cabal
Normal file
24
test/data/pattern-synonyms/pattern-synonyms.cabal
Normal file
@@ -0,0 +1,24 @@
|
||||
-- Initial pattern-synonyms.cabal generated by cabal init. For further
|
||||
-- documentation, see http://haskell.org/cabal/users-guide/
|
||||
|
||||
name: pattern-synonyms
|
||||
version: 0.1.0.0
|
||||
-- synopsis:
|
||||
-- description:
|
||||
-- license:
|
||||
license-file: LICENSE
|
||||
author: Daniel Gröber
|
||||
maintainer: dxld@darkboxed.org
|
||||
-- copyright:
|
||||
-- category:
|
||||
build-type: Simple
|
||||
-- extra-source-files:
|
||||
cabal-version: >=1.10
|
||||
|
||||
library
|
||||
exposed-modules: A, B
|
||||
-- other-modules:
|
||||
other-extensions: PatternSynonyms
|
||||
build-depends: base >=4.7 && <4.8
|
||||
-- hs-source-dirs:
|
||||
default-language: Haskell2010
|
||||
Reference in New Issue
Block a user