Skip to content

Commit

Permalink
haskell#4, make QFilePath have the right set Char instance
Browse files Browse the repository at this point in the history
  • Loading branch information
ndmitchell committed Oct 19, 2014
1 parent e447cc5 commit e6e5b6f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/AutoTest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ constTest False = error "Failed on constTest"



data QFilePath = QFilePath FilePath
newtype QFilePath = QFilePath FilePath
deriving Show

instance Arbitrary QFilePath where
arbitrary = liftM QFilePath arbitrary
arbitrary = fmap (QFilePath . map fromQChar) arbitrary

newtype QChar = QChar {fromQChar :: Char}

-- QuickCheck 2.4.1.1 has its own Arbitrary Char instance, so commented out for now
-- instance Arbitrary Char where
-- arbitrary = elements "?|./:\\abcd 123;_"
instance Arbitrary QChar where
arbitrary = fmap QChar $ elements "?|./:\\abcd 123;_"



Expand Down

0 comments on commit e6e5b6f

Please sign in to comment.