summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T14779a.hs
blob: f2072dc92b042c1078422f4b5f9e61a02eb3808a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{-# OPTIONS_GHC -g -O #-}
{-# OPTIONS
  -fno-strictness
  -fno-case-merge
  -fno-call-arity
  -fno-case-folding
  -fno-cse
  -fno-do-eta-reduction
  -fno-do-lambda-eta-expansion
  -fno-float-in
  -ffull-laziness
  -fno-enable-rewrite-rules
#-}
-- This used to fail with:
--
-- *** Core Lint errors : in result of Simplifier ***
-- <no location info>: warning:
--     [RHS of str_sZr :: Addr#]
--     Recursive or top-level binder has strict demand info: str_sZr
--     Binder's demand info: <L,U>
module T14779a where

mkConstr :: String -> String
mkConstr str = r
  where
    r = idx `seq` str
    idx = eqS r str `seq` [r]

conMkFixed :: String
conMkFixed = mkConstr "MkFixed"

eqS :: String -> String -> Bool
eqS [] [] = True
eqS _ _ = False