Skip to content

Commit

Permalink
Add test to reproduce #5
Browse files Browse the repository at this point in the history
  • Loading branch information
igrep committed Apr 9, 2017
1 parent 2de6650 commit b59fabe
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hood.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ Library
Exposed-modules:
Debug.Hood.Observe

Test-Suite hood-test
Type: exitcode-stdio-1.0
Hs-Source-Dirs: test
Main-Is: test.hs
Build-Depends: base, hood

source-repository head
type: git
location: https://github.com/ku-fpg/hood
26 changes: 26 additions & 0 deletions test/test.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env stack
{-# LANGUAGE DeriveGeneric #-}
-- stack --resolver lts-8.4 runghc --package hood
-- Minimum program to reproduce https://github.com/ku-fpg/hood/issues/5

import Debug.Hood.Observe
import GHC.Generics


data Hoge =
Hoge
{ hoge1 :: Int
, hoge2 :: String
} deriving Generic

instance Observable Hoge


main :: IO ()
main = runO $ print $ f undefined


f :: Hoge -> Bool
f = observe "f" f'
f' :: Hoge -> Bool
f' h@(Hoge _h1 _h2) = error "ERROR"

0 comments on commit b59fabe

Please sign in to comment.