Skip to content

Commit

Permalink
Revert pull request ku-fpg#7, but keep test/test.hs. Fix GHC 7.4.2 build
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGlScott authored and mberkowitz committed Nov 13, 2020
1 parent 19efa9f commit 5dfc2c2
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 @@ -26,6 +26,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, ghc-prim, 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 5dfc2c2

Please sign in to comment.