syb 0.4.0 → 0.4.1
raw patch · 47 files changed
+2831/−11368 lines, 47 files
Files
- LICENSE +83/−83
- README +43/−43
- src/Data/Generics/Basics.hs +23/−23
- src/Generics/SYB.hs +17/−17
- src/Generics/SYB/Aliases.hs +17/−17
- src/Generics/SYB/Basics.hs +17/−17
- src/Generics/SYB/Builders.hs +17/−17
- src/Generics/SYB/Instances.hs +17/−17
- src/Generics/SYB/Schemes.hs +17/−17
- src/Generics/SYB/Text.hs +17/−17
- src/Generics/SYB/Twins.hs +17/−17
- syb.cabal +1/−1
- tests/Builders.hs +19/−19
- tests/CompanyDatatypes.hs +39/−39
- tests/Encode.hs +81/−81
- tests/Ext.hs +30/−30
- tests/Ext1.hs +124/−124
- tests/Ext2.hs +65/−65
- tests/FoldTree.hs +73/−74
- tests/GEq.hs +21/−21
- tests/GMapQAssoc.hs +68/−68
- tests/GRead.hs +45/−45
- tests/GRead2.hs +66/−66
- tests/GShow.hs +52/−52
- tests/GShow2.hs +47/−47
- tests/GZip.hs +46/−46
- tests/GenUpTo.hs +94/−94
- tests/GetC.hs +121/−121
- tests/HList.hs +61/−61
- tests/HOPat.hs +66/−66
- tests/Labels.hs +30/−30
- tests/LocalQuantors.hs +21/−21
- tests/Main.hs +82/−84
- tests/NestedDatatypes.hs +43/−52
- tests/Paradise.hs +29/−29
- tests/Perm.hs +127/−127
- tests/Polymatch.hs +70/−70
- tests/Reify.hs +413/−413
- tests/Strings.hs +21/−21
- tests/Tree.hs +62/−62
- tests/Twin.hs +90/−90
- tests/Typeable.hs +0/−19
- tests/Typecase1.hs +58/−58
- tests/Typecase2.hs +61/−61
- tests/Where.hs +125/−125
- tests/XML.hs +195/−195
- tests/out.hs +0/−8506
LICENSE view
@@ -1,83 +1,83 @@-This library (libraries/syb) is derived from code from several -sources: - - * Code from the GHC project which is largely (c) The University of - Glasgow, and distributable under a BSD-style license (see below), - - * Code from the Haskell 98 Report which is (c) Simon Peyton Jones - and freely redistributable (but see the full license for - restrictions). - - * Code from the Haskell Foreign Function Interface specification, - which is (c) Manuel M. T. Chakravarty and freely redistributable - (but see the full license for restrictions). - -The full text of these licenses is reproduced below. All of the -licenses are BSD-style or compatible. - ------------------------------------------------------------------------------ - -The Glasgow Haskell Compiler License - -Copyright 2004, The University Court of the University of Glasgow. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -- Neither name of the University nor the names of its contributors may be -used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF -GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - ------------------------------------------------------------------------------ - -Code derived from the document "Report on the Programming Language -Haskell 98", is distributed under the following license: - - Copyright (c) 2002 Simon Peyton Jones - - The authors intend this Report to belong to the entire Haskell - community, and so we grant permission to copy and distribute it for - any purpose, provided that it is reproduced in its entirety, - including this Notice. Modified versions of this Report may also be - copied and distributed for any purpose, provided that the modified - version is clearly presented as such, and that it does not claim to - be a definition of the Haskell 98 Language. - ------------------------------------------------------------------------------ - -Code derived from the document "The Haskell 98 Foreign Function -Interface, An Addendum to the Haskell 98 Report" is distributed under -the following license: - - Copyright (c) 2002 Manuel M. T. Chakravarty - - The authors intend this Report to belong to the entire Haskell - community, and so we grant permission to copy and distribute it for - any purpose, provided that it is reproduced in its entirety, - including this Notice. Modified versions of this Report may also be - copied and distributed for any purpose, provided that the modified - version is clearly presented as such, and that it does not claim to - be a definition of the Haskell 98 Foreign Function Interface. - ------------------------------------------------------------------------------ +This library (libraries/syb) is derived from code from several+sources: ++ * Code from the GHC project which is largely (c) The University of+ Glasgow, and distributable under a BSD-style license (see below),++ * Code from the Haskell 98 Report which is (c) Simon Peyton Jones+ and freely redistributable (but see the full license for+ restrictions).++ * Code from the Haskell Foreign Function Interface specification,+ which is (c) Manuel M. T. Chakravarty and freely redistributable+ (but see the full license for restrictions).++The full text of these licenses is reproduced below. All of the+licenses are BSD-style or compatible.++-----------------------------------------------------------------------------++The Glasgow Haskell Compiler License++Copyright 2004, The University Court of the University of Glasgow. +All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++- Redistributions of source code must retain the above copyright notice,+this list of conditions and the following disclaimer.+ +- Redistributions in binary form must reproduce the above copyright notice,+this list of conditions and the following disclaimer in the documentation+and/or other materials provided with the distribution.+ +- Neither name of the University nor the names of its contributors may be+used to endorse or promote products derived from this software without+specific prior written permission. ++THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF+GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE+UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH+DAMAGE.++-----------------------------------------------------------------------------++Code derived from the document "Report on the Programming Language+Haskell 98", is distributed under the following license:++ Copyright (c) 2002 Simon Peyton Jones++ The authors intend this Report to belong to the entire Haskell+ community, and so we grant permission to copy and distribute it for+ any purpose, provided that it is reproduced in its entirety,+ including this Notice. Modified versions of this Report may also be+ copied and distributed for any purpose, provided that the modified+ version is clearly presented as such, and that it does not claim to+ be a definition of the Haskell 98 Language.++-----------------------------------------------------------------------------++Code derived from the document "The Haskell 98 Foreign Function+Interface, An Addendum to the Haskell 98 Report" is distributed under+the following license:++ Copyright (c) 2002 Manuel M. T. Chakravarty++ The authors intend this Report to belong to the entire Haskell+ community, and so we grant permission to copy and distribute it for+ any purpose, provided that it is reproduced in its entirety,+ including this Notice. Modified versions of this Report may also be+ copied and distributed for any purpose, provided that the modified+ version is clearly presented as such, and that it does not claim to+ be a definition of the Haskell 98 Foreign Function Interface.++-----------------------------------------------------------------------------
README view
@@ -1,43 +1,43 @@-syb: Scrap Your Boilerplate! -================================================================================ - -Scrap Your Boilerplate (SYB) is a library for generic programming in Haskell. It -is supported since the GHC >= 6.0 implementation of Haskell. Using this -approach, you can write generic functions such as traversal schemes (e.g., -everywhere and everything), as well as generic read, generic show and generic -equality (i.e., gread, gshow, and geq). This approach is based on just a few -primitives for type-safe cast and processing constructor applications. - -It was originally developed by Ralf Lämmel and Simon Peyton Jones. Since then, -many people have contributed with research relating to SYB or its applications. - -More information is available on the webpage: -http://www.cs.uu.nl/wiki/GenericProgramming/SYB - - -Features --------- - -* Easy generic programming with combinators -* GHC can derive Data and Typeable instances for your datatypes -* Comes with many useful generic functions - - -Requirements ------------- - -* GHC 6.10.1 or later -* Cabal 1.6 or later - - -Bugs & Support --------------- - -Please report issues or request features at the bug tracker: - - http://code.google.com/p/scrapyourboilerplate/issues/list - -For discussion about the library with the authors, maintainers, and other -interested persons use the mailing list: - - http://www.haskell.org/mailman/listinfo/generics +syb: Scrap Your Boilerplate!+================================================================================++Scrap Your Boilerplate (SYB) is a library for generic programming in Haskell. It +is supported since the GHC >= 6.0 implementation of Haskell. Using this +approach, you can write generic functions such as traversal schemes (e.g., +everywhere and everything), as well as generic read, generic show and generic +equality (i.e., gread, gshow, and geq). This approach is based on just a few +primitives for type-safe cast and processing constructor applications. ++It was originally developed by Ralf Lämmel and Simon Peyton Jones. Since then,+many people have contributed with research relating to SYB or its applications. ++More information is available on the webpage: +http://www.cs.uu.nl/wiki/GenericProgramming/SYB+++Features+--------++* Easy generic programming with combinators+* GHC can derive Data and Typeable instances for your datatypes+* Comes with many useful generic functions+++Requirements+------------++* GHC 6.10.1 or later+* Cabal 1.6 or later+++Bugs & Support+--------------++Please report issues or request features at the bug tracker:++ http://code.google.com/p/scrapyourboilerplate/issues/list++For discussion about the library with the authors, maintainers, and other+interested persons use the mailing list:++ http://www.haskell.org/mailman/listinfo/generics
src/Data/Generics/Basics.hs view
@@ -1,23 +1,23 @@------------------------------------------------------------------------------ --- | --- Module : Data.Generics.Basics --- Copyright : (c) The University of Glasgow, CWI 2001--2004 --- License : BSD-style (see the LICENSE file) --- --- Maintainer : generics@haskell.org --- Stability : experimental --- Portability : non-portable (local universal quantification) --- --- \"Scrap your boilerplate\" --- Generic programming in Haskell. --- See <http://www.cs.uu.nl/wiki/GenericProgramming/SYB>. This module provides --- the 'Data' class with its primitives for generic programming, --- which is now defined in @Data.Data@. Therefore this module simply --- re-exports @Data.Data@. --- ------------------------------------------------------------------------------ - -module Data.Generics.Basics ( - module Data.Data - ) where - -import Data.Data +-----------------------------------------------------------------------------+-- |+-- Module : Data.Generics.Basics+-- Copyright : (c) The University of Glasgow, CWI 2001--2004+-- License : BSD-style (see the LICENSE file)+-- +-- Maintainer : generics@haskell.org+-- Stability : experimental+-- Portability : non-portable (local universal quantification)+--+-- \"Scrap your boilerplate\" --- Generic programming in Haskell.+-- See <http://www.cs.uu.nl/wiki/GenericProgramming/SYB>. This module provides+-- the 'Data' class with its primitives for generic programming,+-- which is now defined in @Data.Data@. Therefore this module simply+-- re-exports @Data.Data@.+--+-----------------------------------------------------------------------------++module Data.Generics.Basics (+ module Data.Data+ ) where++import Data.Data
src/Generics/SYB.hs view
@@ -1,17 +1,17 @@------------------------------------------------------------------------------ --- | --- Module : Generics.SYB --- Copyright : (c) The University of Glasgow, CWI 2001--2004 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : generics@haskell.org --- Stability : experimental --- Portability : non-portable (local universal quantification) --- --- Convenience alias for "Data.Generics". --- ------------------------------------------------------------------------------ - -module Generics.SYB (module Data.Generics) where - -import Data.Generics +-----------------------------------------------------------------------------+-- |+-- Module : Generics.SYB+-- Copyright : (c) The University of Glasgow, CWI 2001--2004+-- License : BSD-style (see the file libraries/base/LICENSE)+-- +-- Maintainer : generics@haskell.org+-- Stability : experimental+-- Portability : non-portable (local universal quantification)+--+-- Convenience alias for "Data.Generics".+--+-----------------------------------------------------------------------------++module Generics.SYB (module Data.Generics) where++import Data.Generics
src/Generics/SYB/Aliases.hs view
@@ -1,17 +1,17 @@------------------------------------------------------------------------------ --- | --- Module : Generics.SYB.Aliases --- Copyright : (c) The University of Glasgow, CWI 2001--2004 --- License : BSD-style (see the LICENSE file) --- --- Maintainer : generics@haskell.org --- Stability : experimental --- Portability : non-portable (local universal quantification) --- --- Convenience alias for "Data.Generics.Aliases". --- ------------------------------------------------------------------------------ - -module Generics.SYB.Aliases (module Data.Generics.Aliases) where - -import Data.Generics.Aliases +-----------------------------------------------------------------------------+-- |+-- Module : Generics.SYB.Aliases+-- Copyright : (c) The University of Glasgow, CWI 2001--2004+-- License : BSD-style (see the LICENSE file)+-- +-- Maintainer : generics@haskell.org+-- Stability : experimental+-- Portability : non-portable (local universal quantification)+--+-- Convenience alias for "Data.Generics.Aliases".+--+-----------------------------------------------------------------------------++module Generics.SYB.Aliases (module Data.Generics.Aliases) where++import Data.Generics.Aliases
src/Generics/SYB/Basics.hs view
@@ -1,17 +1,17 @@------------------------------------------------------------------------------ --- | --- Module : Generics.SYB.Basics --- Copyright : (c) The University of Glasgow, CWI 2001--2004 --- License : BSD-style (see the LICENSE file) --- --- Maintainer : generics@haskell.org --- Stability : experimental --- Portability : non-portable (local universal quantification) --- --- Convenience alias for "Data.Generics.Basics". --- ------------------------------------------------------------------------------ - -module Generics.SYB.Basics (module Data.Generics.Basics) where - -import Data.Generics.Basics +-----------------------------------------------------------------------------+-- |+-- Module : Generics.SYB.Basics+-- Copyright : (c) The University of Glasgow, CWI 2001--2004+-- License : BSD-style (see the LICENSE file)+-- +-- Maintainer : generics@haskell.org+-- Stability : experimental+-- Portability : non-portable (local universal quantification)+--+-- Convenience alias for "Data.Generics.Basics".+--+-----------------------------------------------------------------------------++module Generics.SYB.Basics (module Data.Generics.Basics) where++import Data.Generics.Basics
src/Generics/SYB/Builders.hs view
@@ -1,17 +1,17 @@------------------------------------------------------------------------------ --- | --- Module : Generics.SYB.Builders --- Copyright : (c) The University of Glasgow, CWI 2001--2004 --- License : BSD-style (see the LICENSE file) --- --- Maintainer : generics@haskell.org --- Stability : experimental --- Portability : non-portable (local universal quantification) --- --- Convenience alias for "Data.Generics.Builders". --- ------------------------------------------------------------------------------ - -module Generics.SYB.Builders (module Data.Generics.Builders) where - -import Data.Generics.Builders +-----------------------------------------------------------------------------+-- |+-- Module : Generics.SYB.Builders+-- Copyright : (c) The University of Glasgow, CWI 2001--2004+-- License : BSD-style (see the LICENSE file)+-- +-- Maintainer : generics@haskell.org+-- Stability : experimental+-- Portability : non-portable (local universal quantification)+--+-- Convenience alias for "Data.Generics.Builders".+--+-----------------------------------------------------------------------------++module Generics.SYB.Builders (module Data.Generics.Builders) where++import Data.Generics.Builders
src/Generics/SYB/Instances.hs view
@@ -1,17 +1,17 @@------------------------------------------------------------------------------ --- | --- Module : Generics.SYB.Instances --- Copyright : (c) The University of Glasgow, CWI 2001--2004 --- License : BSD-style (see the LICENSE file) --- --- Maintainer : generics@haskell.org --- Stability : experimental --- Portability : non-portable (local universal quantification) --- --- Convenience alias for "Data.Generics.Instances". --- ------------------------------------------------------------------------------ - -module Generics.SYB.Instances () where - -import Data.Generics.Instances () +-----------------------------------------------------------------------------+-- |+-- Module : Generics.SYB.Instances+-- Copyright : (c) The University of Glasgow, CWI 2001--2004+-- License : BSD-style (see the LICENSE file)+-- +-- Maintainer : generics@haskell.org+-- Stability : experimental+-- Portability : non-portable (local universal quantification)+--+-- Convenience alias for "Data.Generics.Instances".+--+-----------------------------------------------------------------------------++module Generics.SYB.Instances () where++import Data.Generics.Instances ()
src/Generics/SYB/Schemes.hs view
@@ -1,17 +1,17 @@------------------------------------------------------------------------------ --- | --- Module : Generics.SYB.Schemes --- Copyright : (c) The University of Glasgow, CWI 2001--2004 --- License : BSD-style (see the LICENSE file) --- --- Maintainer : generics@haskell.org --- Stability : experimental --- Portability : non-portable (local universal quantification) --- --- Convenience alias for "Data.Generics.Schemes". --- ------------------------------------------------------------------------------ - -module Generics.SYB.Schemes (module Data.Generics.Schemes) where - -import Data.Generics.Schemes +-----------------------------------------------------------------------------+-- |+-- Module : Generics.SYB.Schemes+-- Copyright : (c) The University of Glasgow, CWI 2001--2004+-- License : BSD-style (see the LICENSE file)+-- +-- Maintainer : generics@haskell.org+-- Stability : experimental+-- Portability : non-portable (local universal quantification)+--+-- Convenience alias for "Data.Generics.Schemes".+--+-----------------------------------------------------------------------------++module Generics.SYB.Schemes (module Data.Generics.Schemes) where++import Data.Generics.Schemes
src/Generics/SYB/Text.hs view
@@ -1,17 +1,17 @@------------------------------------------------------------------------------ --- | --- Module : Generics.SYB.Text --- Copyright : (c) The University of Glasgow, CWI 2001--2004 --- License : BSD-style (see the LICENSE file) --- --- Maintainer : generics@haskell.org --- Stability : experimental --- Portability : non-portable (local universal quantification) --- --- Convenience alias for "Data.Generics.Text". --- ------------------------------------------------------------------------------ - -module Generics.SYB.Text (module Data.Generics.Text) where - -import Data.Generics.Text +-----------------------------------------------------------------------------+-- |+-- Module : Generics.SYB.Text+-- Copyright : (c) The University of Glasgow, CWI 2001--2004+-- License : BSD-style (see the LICENSE file)+-- +-- Maintainer : generics@haskell.org+-- Stability : experimental+-- Portability : non-portable (local universal quantification)+--+-- Convenience alias for "Data.Generics.Text".+--+-----------------------------------------------------------------------------++module Generics.SYB.Text (module Data.Generics.Text) where++import Data.Generics.Text
src/Generics/SYB/Twins.hs view
@@ -1,17 +1,17 @@------------------------------------------------------------------------------ --- | --- Module : Generics.SYB.Twins --- Copyright : (c) The University of Glasgow, CWI 2001--2004 --- License : BSD-style (see the LICENSE file) --- --- Maintainer : generics@haskell.org --- Stability : experimental --- Portability : non-portable (local universal quantification) --- --- Convenience alias for "Data.Generics.Twins". --- ------------------------------------------------------------------------------ - -module Generics.SYB.Twins (module Data.Generics.Twins) where - -import Data.Generics.Twins +-----------------------------------------------------------------------------+-- |+-- Module : Generics.SYB.Twins+-- Copyright : (c) The University of Glasgow, CWI 2001--2004+-- License : BSD-style (see the LICENSE file)+-- +-- Maintainer : generics@haskell.org+-- Stability : experimental+-- Portability : non-portable (local universal quantification)+--+-- Convenience alias for "Data.Generics.Twins".+--+-----------------------------------------------------------------------------++module Generics.SYB.Twins (module Data.Generics.Twins) where++import Data.Generics.Twins
syb.cabal view
@@ -1,5 +1,5 @@ name: syb -version: 0.4.0 +version: 0.4.1 license: BSD3 license-file: LICENSE author: Ralf Lammel, Simon Peyton Jones, Jose Pedro Magalhaes
tests/Builders.hs view
@@ -1,20 +1,20 @@-{-# OPTIONS -fglasgow-exts #-} - -module Builders (tests) where - --- Testing Data.Generics.Builders functionality - -import Test.HUnit - -import Data.Data -import Data.Generics.Builders - - --- Main function for testing -tests = ( constrs :: [Maybe Int] - , constrs :: [String] - , constrs :: [Either Int Float] - , constrs :: [((), Integer)] - ) ~=? output - +{-# OPTIONS -fglasgow-exts #-}++module Builders (tests) where++-- Testing Data.Generics.Builders functionality ++import Test.HUnit++import Data.Data+import Data.Generics.Builders+++-- Main function for testing+tests = ( constrs :: [Maybe Int]+ , constrs :: [String]+ , constrs :: [Either Int Float]+ , constrs :: [((), Integer)]+ ) ~=? output+ output = ([Nothing,Just 0],["","\NUL"],[Left 0,Right 0.0],[((),0)])
tests/CompanyDatatypes.hs view
@@ -1,39 +1,39 @@-{-# OPTIONS -fglasgow-exts #-} - -module CompanyDatatypes where - -import Data.Generics (Data, Typeable) - --- The organisational structure of a company - -data Company = C [Dept] deriving (Eq, Show, Typeable, Data) -data Dept = D Name Manager [Unit] deriving (Eq, Show, Typeable, Data) -data Unit = PU Employee | DU Dept deriving (Eq, Show, Typeable, Data) -data Employee = E Person Salary deriving (Eq, Show, Typeable, Data) -data Person = P Name Address deriving (Eq, Show, Typeable, Data) -data Salary = S Float deriving (Eq, Show, Typeable, Data) -type Manager = Employee -type Name = String -type Address = String - --- An illustrative company -genCom :: Company -genCom = C [D "Research" laemmel [PU joost, PU marlow], - D "Strategy" blair []] - --- A typo for the sake of testing equality; --- (cf. lammel vs. laemmel) -genCom' :: Company -genCom' = C [D "Research" lammel [PU joost, PU marlow], - D "Strategy" blair []] - -lammel, laemmel, joost, blair :: Employee -lammel = E (P "Lammel" "Amsterdam") (S 8000) -laemmel = E (P "Laemmel" "Amsterdam") (S 8000) -joost = E (P "Joost" "Amsterdam") (S 1000) -marlow = E (P "Marlow" "Cambridge") (S 2000) -blair = E (P "Blair" "London") (S 100000) - --- Some more test data -person1 = P "Lazy" "Home" -dept1 = D "Useless" (E person1 undefined) [] +{-# OPTIONS -fglasgow-exts #-}++module CompanyDatatypes where++import Data.Generics (Data, Typeable)++-- The organisational structure of a company++data Company = C [Dept] deriving (Eq, Show, Typeable, Data)+data Dept = D Name Manager [Unit] deriving (Eq, Show, Typeable, Data)+data Unit = PU Employee | DU Dept deriving (Eq, Show, Typeable, Data)+data Employee = E Person Salary deriving (Eq, Show, Typeable, Data)+data Person = P Name Address deriving (Eq, Show, Typeable, Data)+data Salary = S Float deriving (Eq, Show, Typeable, Data)+type Manager = Employee+type Name = String+type Address = String++-- An illustrative company+genCom :: Company+genCom = C [D "Research" laemmel [PU joost, PU marlow],+ D "Strategy" blair []]++-- A typo for the sake of testing equality;+-- (cf. lammel vs. laemmel)+genCom' :: Company+genCom' = C [D "Research" lammel [PU joost, PU marlow],+ D "Strategy" blair []]++lammel, laemmel, joost, blair :: Employee+lammel = E (P "Lammel" "Amsterdam") (S 8000)+laemmel = E (P "Laemmel" "Amsterdam") (S 8000)+joost = E (P "Joost" "Amsterdam") (S 1000)+marlow = E (P "Marlow" "Cambridge") (S 2000)+blair = E (P "Blair" "London") (S 100000)++-- Some more test data+person1 = P "Lazy" "Home"+dept1 = D "Useless" (E person1 undefined) []
tests/Encode.hs view
@@ -1,81 +1,81 @@-{-# OPTIONS -fglasgow-exts #-} - --- A bit more test code for the 2nd boilerplate paper. --- These are downscaled versions of library functionality or real test cases. --- We just wanted to typecheck the fragments as shown in the paper. - -module Encode () where - -import Data.Generics - -data Bit = Zero | One - ------------------------------------------------------------------------------- --- Sec. 3.2 - -data2bits :: Data a => a -> [Bit] -data2bits t = encodeCon (dataTypeOf t) (toConstr t) - ++ concat (gmapQ data2bits t) - --- The encoder for constructors -encodeCon :: DataType -> Constr -> [Bit] -encodeCon ty con = natToBin (max-1) (idx-1) - where - max = maxConstrIndex ty - idx = constrIndex con - - -natToBin :: Int -> Int -> [Bit] -natToBin = undefined - ------------------------------------------------------------------------------- --- Sec. 3.3 - -data State -- Abstract -initState :: State -encodeCon' :: DataType -> Constr - -> State -> (State, [Bit]) - -initState = undefined -encodeCon' = undefined - -data2bits' :: Data a => a -> [Bit] -data2bits' t = snd (show_bin t initState) - -show_bin :: Data a => a -> State -> (State, [Bit]) -show_bin t st = (st2, con_bits ++ args_bits) - where - (st1, con_bits) = encodeCon' (dataTypeOf t) - (toConstr t) st - (st2, args_bits) = foldr do_arg (st1,[]) - enc_args - - enc_args :: [State -> (State,[Bit])] - enc_args = gmapQ show_bin t - - do_arg fn (st,bits) = (st', bits' ++ bits) - where - (st', bits') = fn st - - ------------------------------------------------------------------------------- --- Sec. 3.3 cont'd - -data EncM a -- The encoder monad -instance Monad EncM - where - return = undefined - c >>= f = undefined - -runEnc :: EncM () -> [Bit] -emitCon :: DataType -> Constr -> EncM () - -runEnc = undefined -emitCon = undefined - -data2bits'' :: Data a => a -> [Bit] -data2bits'' t = runEnc (emit t) - -emit :: Data a => a -> EncM () -emit t = do { emitCon (dataTypeOf t) (toConstr t) - ; sequence_ (gmapQ emit t) } +{-# OPTIONS -fglasgow-exts #-}++-- A bit more test code for the 2nd boilerplate paper.+-- These are downscaled versions of library functionality or real test cases.+-- We just wanted to typecheck the fragments as shown in the paper.++module Encode () where++import Data.Generics++data Bit = Zero | One++------------------------------------------------------------------------------+-- Sec. 3.2++data2bits :: Data a => a -> [Bit]+data2bits t = encodeCon (dataTypeOf t) (toConstr t)+ ++ concat (gmapQ data2bits t)++-- The encoder for constructors+encodeCon :: DataType -> Constr -> [Bit]+encodeCon ty con = natToBin (max-1) (idx-1)+ where+ max = maxConstrIndex ty+ idx = constrIndex con+++natToBin :: Int -> Int -> [Bit]+natToBin = undefined++------------------------------------------------------------------------------+-- Sec. 3.3++data State -- Abstract+initState :: State+encodeCon' :: DataType -> Constr+ -> State -> (State, [Bit])++initState = undefined+encodeCon' = undefined++data2bits' :: Data a => a -> [Bit]+data2bits' t = snd (show_bin t initState)++show_bin :: Data a => a -> State -> (State, [Bit])+show_bin t st = (st2, con_bits ++ args_bits)+ where+ (st1, con_bits) = encodeCon' (dataTypeOf t)+ (toConstr t) st+ (st2, args_bits) = foldr do_arg (st1,[])+ enc_args++ enc_args :: [State -> (State,[Bit])]+ enc_args = gmapQ show_bin t++ do_arg fn (st,bits) = (st', bits' ++ bits)+ where+ (st', bits') = fn st+++------------------------------------------------------------------------------+-- Sec. 3.3 cont'd++data EncM a -- The encoder monad+instance Monad EncM+ where+ return = undefined+ c >>= f = undefined++runEnc :: EncM () -> [Bit]+emitCon :: DataType -> Constr -> EncM ()++runEnc = undefined+emitCon = undefined++data2bits'' :: Data a => a -> [Bit]+data2bits'' t = runEnc (emit t)++emit :: Data a => a -> EncM ()+emit t = do { emitCon (dataTypeOf t) (toConstr t) + ; sequence_ (gmapQ emit t) }
tests/Ext.hs view
@@ -1,30 +1,30 @@-{-# OPTIONS -fglasgow-exts #-} - -module Ext () where - --- There were typos in these definitions in the ICFP 2004 paper. - -import Data.Generics - -extQ fn spec_fn arg - = case gcast (Q spec_fn) of - Just (Q spec_fn') -> spec_fn' arg - Nothing -> fn arg - -newtype Q r a = Q (a -> r) - -extT fn spec_fn arg - = case gcast (T spec_fn) of - Just (T spec_fn') -> spec_fn' arg - Nothing -> fn arg - -newtype T a = T (a -> a) - -extM :: (Typeable a, Typeable b) - => (a -> m a) -> (b -> m b) -> (a -> m a) -extM fn spec_fn - = case gcast (M spec_fn) of - Just (M spec_fn') -> spec_fn' - Nothing -> fn - -newtype M m a = M (a -> m a) +{-# OPTIONS -fglasgow-exts #-}++module Ext () where++-- There were typos in these definitions in the ICFP 2004 paper.++import Data.Generics++extQ fn spec_fn arg+ = case gcast (Q spec_fn) of+ Just (Q spec_fn') -> spec_fn' arg+ Nothing -> fn arg+ +newtype Q r a = Q (a -> r)+ +extT fn spec_fn arg+ = case gcast (T spec_fn) of+ Just (T spec_fn') -> spec_fn' arg+ Nothing -> fn arg+ +newtype T a = T (a -> a)++extM :: (Typeable a, Typeable b)+ => (a -> m a) -> (b -> m b) -> (a -> m a)+extM fn spec_fn+ = case gcast (M spec_fn) of+ Just (M spec_fn') -> spec_fn'+ Nothing -> fn++newtype M m a = M (a -> m a)
tests/Ext1.hs view
@@ -1,124 +1,124 @@-{-# OPTIONS -fglasgow-exts #-} - -module Ext1 (tests) where - -{- - -This example records some experiments with polymorphic datatypes. - --} - -import Test.HUnit - -import Data.Generics -import GHC.Base - - --- Unsafe coerce -unsafeCoerce :: a -> b -unsafeCoerce = unsafeCoerce# - - --- Handy type constructors -newtype ID x = ID { unID :: x } -newtype CONST c a = CONST { unCONST :: c } - - --- Extension of a query with a para. poly. list case -extListQ' :: Data d - => (d -> q) - -> (forall d. [d] -> q) - -> d -> q -extListQ' def ext d = - if isList d - then ext (unsafeCoerce d) - else def d - - --- Test extListQ' -foo1 :: Data d => d -> Int -foo1 = const 0 `extListQ'` length -t1 = foo1 True -- should count as 0 -t2 = foo1 [True,True] -- should count as 2 - - --- Infeasible extension of a query with a data-polymorphic list case -extListQ'' :: Data d - => (d -> q) - -> (forall d. Data d => [d] -> q) - -> d -> q -extListQ'' def ext d = - if isList d - then undefined -- hard to avoid an ambiguous type - else def d - - --- Test extListQ from Data.Generics.Aliases -foo2 :: Data a => a -> Int -foo2 = const 0 `ext1Q` list - where - list :: Data a => [a] -> Int - list l = foldr (+) 0 $ map glength l - -t3 = foo2 (True,True) -- should count as 0 -t4 = foo2 [(True,True),(True,True)] -- should count as 2+2=4 - - --- Customisation for lists without type cast -foo3 :: Data a => a -> Int -foo3 x = if isList x - then foldr (+) 0 $ gmapListQ glength x - else 0 - -t5 = foo3 (True,True) -- should count as 0 -t6 = foo3 [(True,True),(True,True)] -- should count as 2+2=4 - - --- Test for list datatype -isList :: Data a => a -> Bool -isList x = typeRepTyCon (typeOf x) == - typeRepTyCon (typeOf (undefined::[()])) - - --- Test for nil -isNil :: Data a => a -> Bool -isNil x = toConstr x == toConstr ([]::[()]) - - --- Test for cons -isCons :: Data a => a -> Bool -isCons x = toConstr x == toConstr (():[]) - - --- gmapQ for polymorphic lists -gmapListQ :: forall a q. Data a => (forall a. Data a => a -> q) -> a -> [q] -gmapListQ f x = - if not $ isList x - then error "gmapListQ" - else if isNil x - then [] - else if isCons x - then ( gmapQi 0 f x : gmapQi 1 (gmapListQ f) x ) - else error "gmapListQ" - - --- Build nil -mkNil :: Data a => a -mkNil = fromConstr $ toConstr ([]::[()]) - - --- Build cons -mkCons :: Data a => a -mkCons = fromConstr $ toConstr ((undefined:undefined)::[()]) - - --- Main function for testing -tests = ( t1 - , ( t2 - , ( t3 - , ( t4 - , ( t5 - , ( t6 - )))))) ~=? output - -output = (0,(2,(0,(4,(0,4))))) +{-# OPTIONS -fglasgow-exts #-}++module Ext1 (tests) where++{-++This example records some experiments with polymorphic datatypes.++-}++import Test.HUnit++import Data.Generics+import GHC.Base+++-- Unsafe coerce+unsafeCoerce :: a -> b+unsafeCoerce = unsafeCoerce#+++-- Handy type constructors+newtype ID x = ID { unID :: x }+newtype CONST c a = CONST { unCONST :: c }+++-- Extension of a query with a para. poly. list case+extListQ' :: Data d+ => (d -> q)+ -> (forall d. [d] -> q)+ -> d -> q+extListQ' def ext d =+ if isList d+ then ext (unsafeCoerce d)+ else def d +++-- Test extListQ'+foo1 :: Data d => d -> Int+foo1 = const 0 `extListQ'` length+t1 = foo1 True -- should count as 0+t2 = foo1 [True,True] -- should count as 2+++-- Infeasible extension of a query with a data-polymorphic list case+extListQ'' :: Data d+ => (d -> q)+ -> (forall d. Data d => [d] -> q)+ -> d -> q+extListQ'' def ext d =+ if isList d+ then undefined -- hard to avoid an ambiguous type+ else def d +++-- Test extListQ from Data.Generics.Aliases+foo2 :: Data a => a -> Int+foo2 = const 0 `ext1Q` list+ where+ list :: Data a => [a] -> Int+ list l = foldr (+) 0 $ map glength l++t3 = foo2 (True,True) -- should count as 0+t4 = foo2 [(True,True),(True,True)] -- should count as 2+2=4+++-- Customisation for lists without type cast+foo3 :: Data a => a -> Int+foo3 x = if isList x+ then foldr (+) 0 $ gmapListQ glength x+ else 0++t5 = foo3 (True,True) -- should count as 0+t6 = foo3 [(True,True),(True,True)] -- should count as 2+2=4+++-- Test for list datatype+isList :: Data a => a -> Bool+isList x = typeRepTyCon (typeOf x) ==+ typeRepTyCon (typeOf (undefined::[()]))+++-- Test for nil+isNil :: Data a => a -> Bool+isNil x = toConstr x == toConstr ([]::[()])+++-- Test for cons+isCons :: Data a => a -> Bool+isCons x = toConstr x == toConstr (():[])+++-- gmapQ for polymorphic lists+gmapListQ :: forall a q. Data a => (forall a. Data a => a -> q) -> a -> [q]+gmapListQ f x =+ if not $ isList x + then error "gmapListQ"+ else if isNil x+ then []+ else if isCons x+ then ( gmapQi 0 f x : gmapQi 1 (gmapListQ f) x )+ else error "gmapListQ"+++-- Build nil+mkNil :: Data a => a+mkNil = fromConstr $ toConstr ([]::[()])+++-- Build cons+mkCons :: Data a => a+mkCons = fromConstr $ toConstr ((undefined:undefined)::[()])+++-- Main function for testing+tests = ( t1+ , ( t2+ , ( t3+ , ( t4+ , ( t5+ , ( t6+ )))))) ~=? output++output = (0,(2,(0,(4,(0,4)))))
tests/Ext2.hs view
@@ -1,65 +1,65 @@-{-# LANGUAGE DeriveDataTypeable #-} - -module Ext2 (tests) where - --- Tests for ext2 and friends - -import Test.HUnit -import Data.Generics - - --- A type of lists -data List a = Nil | Cons a (List a) deriving (Data, Typeable, Show, Eq) - --- Example lists -l1, l2 :: List Int -l1 = Cons 1 (Cons 2 Nil) -l2 = Cons 0 l1 - --- A type of pairs -data Pair a b = Pair1 a b | Pair2 a b deriving (Data, Typeable, Show, Eq) - --- Example pairs -p1, p2 :: Pair Int Char -p1 = Pair1 2 'p' -p2 = Pair2 3 'q' - --- Structures containing the above -s1 :: [Pair Int Char] -s1 = [p1, p2] - -s2 :: (Pair Int Char, List Int) -s2 = (p2, l2) - - --- Auxiliary functions -unifyPair :: Pair a b -> Pair a b -> Bool -unifyPair (Pair1 _ _) (Pair1 _ _) = True -unifyPair (Pair2 _ _) (Pair2 _ _) = True -unifyPair _ _ = False - -flipPair :: Pair a b -> Pair a b -flipPair (Pair1 a b) = Pair2 a b -flipPair (Pair2 a b) = Pair1 a b - --- Tests -t1 = everywhere (id `ext2T` flipPair) (s1,s2) -t2 = let f :: (Data a) => a -> Maybe a - f = (const Nothing) `ext2M` (Just . flipPair) - in (f p1, f l1) -t3 = everything (+) ( const 0 - `ext1Q` (const 1 :: List a -> Int) - `ext2Q` (const 10 :: Pair a b -> Int)) - $ s2 -t4 = unifyPair (t4' :: Pair Int Char) t4' where - t4' :: Data a => a - t4' = undefined `ext1B` Nil `ext2B` (Pair1 undefined undefined) - - --- Main function for testing -tests = (t1, t2, t3, t4) ~=? output - -output = ((map flipPair s1, (flipPair p2, l2)) - ,(Just (flipPair p1),Nothing) - ,14 - ,True) +{-# LANGUAGE DeriveDataTypeable #-}++module Ext2 (tests) where++-- Tests for ext2 and friends++import Test.HUnit+import Data.Generics+++-- A type of lists+data List a = Nil | Cons a (List a) deriving (Data, Typeable, Show, Eq)++-- Example lists+l1, l2 :: List Int+l1 = Cons 1 (Cons 2 Nil)+l2 = Cons 0 l1++-- A type of pairs+data Pair a b = Pair1 a b | Pair2 a b deriving (Data, Typeable, Show, Eq)++-- Example pairs+p1, p2 :: Pair Int Char+p1 = Pair1 2 'p'+p2 = Pair2 3 'q'++-- Structures containing the above+s1 :: [Pair Int Char]+s1 = [p1, p2]++s2 :: (Pair Int Char, List Int)+s2 = (p2, l2)+++-- Auxiliary functions+unifyPair :: Pair a b -> Pair a b -> Bool+unifyPair (Pair1 _ _) (Pair1 _ _) = True+unifyPair (Pair2 _ _) (Pair2 _ _) = True+unifyPair _ _ = False++flipPair :: Pair a b -> Pair a b+flipPair (Pair1 a b) = Pair2 a b+flipPair (Pair2 a b) = Pair1 a b++-- Tests+t1 = everywhere (id `ext2T` flipPair) (s1,s2)+t2 = let f :: (Data a) => a -> Maybe a+ f = (const Nothing) `ext2M` (Just . flipPair)+ in (f p1, f l1)+t3 = everything (+) ( const 0+ `ext1Q` (const 1 :: List a -> Int)+ `ext2Q` (const 10 :: Pair a b -> Int))+ $ s2+t4 = unifyPair (t4' :: Pair Int Char) t4' where+ t4' :: Data a => a+ t4' = undefined `ext1B` Nil `ext2B` (Pair1 undefined undefined)+++-- Main function for testing+tests = (t1, t2, t3, t4) ~=? output++output = ((map flipPair s1, (flipPair p2, l2))+ ,(Just (flipPair p1),Nothing)+ ,14+ ,True)
tests/FoldTree.hs view
@@ -1,74 +1,73 @@-{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE ScopedTypeVariables #-} - -{- - -A very, very simple example: "extract all Ints from a tree of Ints". -The text book approach is to write a generalised fold for that. One -can also turn the Tree datatype into functorial style and then write a -Functor instance for the functorial datatype including a definition of -fmap. (The original Tree datatype can be related to the functorial -version by the usual injection and projection.) - -You can scrap all such boilerplate by using a traversal scheme based -on gmap combinators as illustrated below. To get it a little more -interesting, we use a datatype Tree with not just a case for leafs and -fork trees, but we also add a case for trees with a weight. - -For completeness' sake, we mention that the fmap/generalised fold -approach differs from the gmap approach in some details. Most notably, -the gmap approach does not generally facilitate the identification of -term components that relate to the type parameter of a parameterised -datatype. The consequence of this is illustrated below as well. -Sec. 6.3 in "Scrap Your Boilerplate ..." discusses such `type -distinctions' as well. - --} - -module FoldTree (tests) where - -import Test.HUnit - --- Enable "ScrapYourBoilerplate" -import Data.Generics - - --- A parameterised datatype for binary trees with data at the leafs -data (Data a, Data w) => - Tree a w = Leaf a - | Fork (Tree a w) (Tree a w) - | WithWeight (Tree a w) w - deriving (Typeable, Data) - - --- A typical tree -mytree :: Tree Int Int -mytree = Fork (WithWeight (Leaf 42) 1) - (WithWeight (Fork (Leaf 88) (Leaf 37)) 2) - --- A less typical tree, used for testing everythingBut -mytree' :: Tree Int Int -mytree' = Fork (Leaf 42) - (WithWeight (Fork (Leaf 88) (Leaf 37)) 2) - - --- Print everything like an Int in mytree --- In fact, we show two attempts: --- 1. print really just everything like an Int --- 2. print everything wrapped with Leaf --- So (1.) confuses leafs and weights whereas (2.) does not. --- Additionally we test everythingBut, stopping when we see a WithWeight node -tests = show ( listify (\(_::Int) -> True) mytree - , everything (++) ([] `mkQ` fromLeaf) mytree - , everythingBut (++) - (([],False) `mkQ` (\x -> (fromLeaf x, stop x))) mytree' - ) ~=? output - where - fromLeaf :: Tree Int Int -> [Int] - fromLeaf (Leaf x) = [x] - fromLeaf _ = [] - stop :: (Data a, Data b) => Tree a b -> Bool - stop (WithWeight _ _) = True - stop _ = False - -output = "([42,1,88,37,2],[42,88,37],[42])" +{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE ScopedTypeVariables #-}++{-++A very, very simple example: "extract all Ints from a tree of Ints".+The text book approach is to write a generalised fold for that. One+can also turn the Tree datatype into functorial style and then write a+Functor instance for the functorial datatype including a definition of+fmap. (The original Tree datatype can be related to the functorial+version by the usual injection and projection.)++You can scrap all such boilerplate by using a traversal scheme based+on gmap combinators as illustrated below. To get it a little more+interesting, we use a datatype Tree with not just a case for leafs and+fork trees, but we also add a case for trees with a weight.++For completeness' sake, we mention that the fmap/generalised fold+approach differs from the gmap approach in some details. Most notably,+the gmap approach does not generally facilitate the identification of+term components that relate to the type parameter of a parameterised+datatype. The consequence of this is illustrated below as well.+Sec. 6.3 in "Scrap Your Boilerplate ..." discusses such `type+distinctions' as well.++-}++module FoldTree (tests) where++import Test.HUnit++-- Enable "ScrapYourBoilerplate"+import Data.Generics+++-- A parameterised datatype for binary trees with data at the leafs+data Tree a w = Leaf a+ | Fork (Tree a w) (Tree a w)+ | WithWeight (Tree a w) w + deriving (Typeable, Data)+++-- A typical tree+mytree :: Tree Int Int+mytree = Fork (WithWeight (Leaf 42) 1)+ (WithWeight (Fork (Leaf 88) (Leaf 37)) 2)++-- A less typical tree, used for testing everythingBut+mytree' :: Tree Int Int+mytree' = Fork (Leaf 42)+ (WithWeight (Fork (Leaf 88) (Leaf 37)) 2)+++-- Print everything like an Int in mytree+-- In fact, we show two attempts:+-- 1. print really just everything like an Int+-- 2. print everything wrapped with Leaf+-- So (1.) confuses leafs and weights whereas (2.) does not.+-- Additionally we test everythingBut, stopping when we see a WithWeight node+tests = show ( listify (\(_::Int) -> True) mytree+ , everything (++) ([] `mkQ` fromLeaf) mytree+ , everythingBut (++) + (([],False) `mkQ` (\x -> (fromLeaf x, stop x))) mytree'+ ) ~=? output+ where+ fromLeaf :: Tree Int Int -> [Int]+ fromLeaf (Leaf x) = [x]+ fromLeaf _ = []+ stop :: (Data a, Data b) => Tree a b -> Bool+ stop (WithWeight _ _) = True+ stop _ = False++output = "([42,1,88,37,2],[42,88,37],[42])"
tests/GEq.hs view
@@ -1,21 +1,21 @@-{-# OPTIONS -fglasgow-exts #-} - -module GEq (tests) where - -{- - -This test exercices GENERIC read, show, and eq for the company -datatypes which we use a lot. The output of the program should be -"True" which means that "gread" reads what "gshow" shows while the -read term is equal to the original term in terms of "geq". - --} - -import Test.HUnit - -import Data.Generics -import CompanyDatatypes - -tests = ( geq genCom genCom - , geq genCom genCom' - ) ~=? (True,False) +{-# OPTIONS -fglasgow-exts #-}++module GEq (tests) where++{-++This test exercices GENERIC read, show, and eq for the company+datatypes which we use a lot. The output of the program should be+"True" which means that "gread" reads what "gshow" shows while the+read term is equal to the original term in terms of "geq".++-}++import Test.HUnit++import Data.Generics+import CompanyDatatypes++tests = ( geq genCom genCom+ , geq genCom genCom'+ ) ~=? (True,False)
tests/GMapQAssoc.hs view
@@ -1,68 +1,68 @@-{-# OPTIONS -fglasgow-exts #-} - -module GMapQAssoc (tests) where - -{- - -This example demonstrates the inadequacy of an apparently simpler -variation on gmapQ. To this end, let us first recall a few facts. -Firstly, function application (including constructor application) is -left-associative. This is the reason why we had preferred our generic -fold to be left-associative too. (In "The Sketch Of a Polymorphic -Symphony" you can find a right-associative generic fold.) Secondly, -lists are right-associative. Because of these inverse associativities -queries for the synthesis of lists require some extra effort to -reflect the left-to-right of immediate subterms in the queried list. -In the module Data.Generics, we solve the problem by a common -higher-order trick, that is, we do not cons lists during folding but -we pass functions on lists starting from the identity function and -passing [] to the resulting function. The following example -illustrates that we get indeed an undesirable right-to-left order if -we just apply the simple constant datatype constructor CONST instead -of the higher-order trick. - -Contributed by Ralf Laemmel, ralf@cwi.nl - --} - -import Test.HUnit - -import Data.Generics - - --- The plain constant type constructor -newtype CONST x y = CONST x -unCONST (CONST x) = x - - --- A variation on the gmapQ combinator using CONST and not Q -gmapQ' :: Data a => (forall a. Data a => a -> u) -> a -> [u] -gmapQ' f = unCONST . gfoldl f' z - where - f' r a = CONST (f a : unCONST r) - z = const (CONST []) - - --- A trivial datatype used for this test case -data IntTree = Leaf Int | Fork IntTree IntTree - deriving (Typeable, Data) - - --- Select int if faced with a leaf -leaf (Leaf i) = [i] -leaf _ = [] - - --- A test term -term = Fork (Leaf 1) (Leaf 2) - - --- Process test term --- gmapQ gives left-to-right order --- gmapQ' gives right-to-left order --- -tests = show ( gmapQ ([] `mkQ` leaf) term - , gmapQ' ([] `mkQ` leaf) term - ) ~=? output - -output = show ([[1],[2]],[[2],[1]]) +{-# OPTIONS -fglasgow-exts #-}++module GMapQAssoc (tests) where++{-++This example demonstrates the inadequacy of an apparently simpler+variation on gmapQ. To this end, let us first recall a few facts.+Firstly, function application (including constructor application) is+left-associative. This is the reason why we had preferred our generic+fold to be left-associative too. (In "The Sketch Of a Polymorphic+Symphony" you can find a right-associative generic fold.) Secondly,+lists are right-associative. Because of these inverse associativities+queries for the synthesis of lists require some extra effort to+reflect the left-to-right of immediate subterms in the queried list.+In the module Data.Generics, we solve the problem by a common+higher-order trick, that is, we do not cons lists during folding but+we pass functions on lists starting from the identity function and+passing [] to the resulting function. The following example+illustrates that we get indeed an undesirable right-to-left order if+we just apply the simple constant datatype constructor CONST instead+of the higher-order trick.++Contributed by Ralf Laemmel, ralf@cwi.nl++-}++import Test.HUnit++import Data.Generics+++-- The plain constant type constructor+newtype CONST x y = CONST x+unCONST (CONST x) = x+++-- A variation on the gmapQ combinator using CONST and not Q+gmapQ' :: Data a => (forall a. Data a => a -> u) -> a -> [u]+gmapQ' f = unCONST . gfoldl f' z+ where+ f' r a = CONST (f a : unCONST r)+ z = const (CONST [])+++-- A trivial datatype used for this test case+data IntTree = Leaf Int | Fork IntTree IntTree+ deriving (Typeable, Data)+++-- Select int if faced with a leaf +leaf (Leaf i) = [i]+leaf _ = []+++-- A test term+term = Fork (Leaf 1) (Leaf 2)+++-- Process test term+-- gmapQ gives left-to-right order+-- gmapQ' gives right-to-left order+--+tests = show ( gmapQ ([] `mkQ` leaf) term+ , gmapQ' ([] `mkQ` leaf) term+ ) ~=? output++output = show ([[1],[2]],[[2],[1]])
tests/GRead.hs view
@@ -1,45 +1,45 @@-{-# OPTIONS -fglasgow-exts #-} - -module GRead (tests) where - -{- - -The following examples achieve branch coverage for the various -productions in the definition of gread. Also, negative test cases are -provided; see str2 and str3. Also, the potential of heading or -trailing spaces as well incomplete parsing of the input is exercised; -see str5. - --} - -import Test.HUnit - -import Data.Generics - -str1 = "(True)" -- reads fine as a Bool -str2 = "(Treu)" -- invalid constructor -str3 = "True" -- lacks parentheses -str4 = "(1)" -- could be an Int -str5 = "( 2 ) ..." -- could be an Int with some trailing left-over -str6 = "([])" -- test empty list -str7 = "((:)" ++ " " ++ str4 ++ " " ++ str6 ++ ")" - -tests = show ( ( [ gread str1, - gread str2, - gread str3 - ] - , [ gread str4, - gread str5 - ] - , [ gread str6, - gread str7 - ] - ) - :: ( [[(Bool, String)]] - , [[(Int, String)]] - , [[([Int], String)]] - ) - ) ~=? output - -output = show - ([[(True,"")],[],[]],[[(1,"")],[(2,"...")]],[[([],"")],[([1],"")]]) +{-# OPTIONS -fglasgow-exts #-}++module GRead (tests) where++{-++The following examples achieve branch coverage for the various+productions in the definition of gread. Also, negative test cases are+provided; see str2 and str3. Also, the potential of heading or+trailing spaces as well incomplete parsing of the input is exercised;+see str5.++-}++import Test.HUnit++import Data.Generics++str1 = "(True)" -- reads fine as a Bool+str2 = "(Treu)" -- invalid constructor+str3 = "True" -- lacks parentheses+str4 = "(1)" -- could be an Int+str5 = "( 2 ) ..." -- could be an Int with some trailing left-over+str6 = "([])" -- test empty list+str7 = "((:)" ++ " " ++ str4 ++ " " ++ str6 ++ ")" ++tests = show ( ( [ gread str1,+ gread str2,+ gread str3+ ]+ , [ gread str4,+ gread str5+ ]+ , [ gread str6,+ gread str7+ ]+ )+ :: ( [[(Bool, String)]]+ , [[(Int, String)]]+ , [[([Int], String)]]+ ) + ) ~=? output++output = show + ([[(True,"")],[],[]],[[(1,"")],[(2,"...")]],[[([],"")],[([1],"")]])
tests/GRead2.hs view
@@ -1,66 +1,66 @@-{-# OPTIONS -fglasgow-exts #-} - -module GRead2 () where - -{- - -For the discussion in the 2nd boilerplate paper, -we favour some simplified generic read, which is checked to compile. -For the full/real story see Data.Generics.Text. - --} - -import Data.Generics - -gread :: Data a => String -> Maybe a -gread input = runDec input readM - --- The decoder monad -newtype DecM a = D (String -> Maybe (String, a)) - -instance Monad DecM where - return a = D (\s -> Just (s,a)) - (D m) >>= k = D (\s -> - case m s of - Nothing -> Nothing - Just (s1,a) -> let D n = k a - in n s1) - -runDec :: String -> DecM a -> Maybe a -runDec input (D m) = do (_,x) <- m input - return x - -parseConstr :: DataType -> DecM Constr -parseConstr ty = D (\s -> - match s (dataTypeConstrs ty)) - where - match :: String -> [Constr] - -> Maybe (String, Constr) - match _ [] = Nothing - match input (con:cons) - | take n input == showConstr con - = Just (drop n input, con) - | otherwise - = match input cons - where - n = length (showConstr con) - - -readM :: forall a. Data a => DecM a -readM = read - where - read :: DecM a - read = do { let val = argOf read - ; let ty = dataTypeOf val - ; constr <- parseConstr ty - ; let con::a = fromConstr constr - ; gmapM (\_ -> readM) con } - -argOf :: c a -> a -argOf = undefined - -yareadM :: forall a. Data a => DecM a -yareadM = do { let ty = dataTypeOf (undefined::a) - ; constr <- parseConstr ty - ; let con::a = fromConstr constr - ; gmapM (\_ -> yareadM) con } +{-# OPTIONS -fglasgow-exts #-}++module GRead2 () where++{-++For the discussion in the 2nd boilerplate paper,+we favour some simplified generic read, which is checked to compile.+For the full/real story see Data.Generics.Text.++-}++import Data.Generics++gread :: Data a => String -> Maybe a+gread input = runDec input readM++-- The decoder monad+newtype DecM a = D (String -> Maybe (String, a))++instance Monad DecM where+ return a = D (\s -> Just (s,a))+ (D m) >>= k = D (\s ->+ case m s of+ Nothing -> Nothing+ Just (s1,a) -> let D n = k a+ in n s1)+ +runDec :: String -> DecM a -> Maybe a+runDec input (D m) = do (_,x) <- m input+ return x++parseConstr :: DataType -> DecM Constr+parseConstr ty = D (\s ->+ match s (dataTypeConstrs ty))+ where+ match :: String -> [Constr]+ -> Maybe (String, Constr)+ match _ [] = Nothing+ match input (con:cons)+ | take n input == showConstr con+ = Just (drop n input, con)+ | otherwise+ = match input cons+ where+ n = length (showConstr con)+++readM :: forall a. Data a => DecM a+readM = read+ where+ read :: DecM a+ read = do { let val = argOf read+ ; let ty = dataTypeOf val+ ; constr <- parseConstr ty+ ; let con::a = fromConstr constr+ ; gmapM (\_ -> readM) con }++argOf :: c a -> a+argOf = undefined++yareadM :: forall a. Data a => DecM a+yareadM = do { let ty = dataTypeOf (undefined::a)+ ; constr <- parseConstr ty+ ; let con::a = fromConstr constr+ ; gmapM (\_ -> yareadM) con }
tests/GShow.hs view
@@ -1,52 +1,52 @@-{-# OPTIONS -fglasgow-exts #-} - -module GShow (tests) where - -{- - -The generic show example from the 2nd boilerplate paper. -(There were some typos in the ICFP 2004 paper.) -Also check out Data.Generics.Text. - --} - -import Test.HUnit - -import Data.Generics hiding (gshow) -import Prelude hiding (showString) - - -gshow :: Data a => a -> String -gshow = gshow_help `extQ` showString - -gshow_help :: Data a => a -> String -gshow_help t - = "(" - ++ showConstr (toConstr t) - ++ concat (intersperse " " (gmapQ gshow t)) - ++ ")" - -showString :: String -> String -showString s = "\"" ++ concat (map escape s) ++ "\"" - where - escape '\n' = "\\n" - escape other_char = [other_char] - -gshowList :: Data b => [b] -> String -gshowList xs - = "[" ++ concat (intersperse "," (map gshow xs)) ++ "]" - -gshow' :: Data a => a -> String -gshow' = gshow_help `ext1Q` gshowList - `extQ` showString - -intersperse :: a -> [a] -> [a] -intersperse _ [] = [] -intersperse x [e] = [e] -intersperse x (e:es) = (e:(x:intersperse x es)) - -tests = ( gshow' "foo" - , gshow' [True,False] - ) ~=? output - -output = ("\"foo\"","[(True),(False)]") +{-# OPTIONS -fglasgow-exts #-}+ +module GShow (tests) where++{-+ +The generic show example from the 2nd boilerplate paper.+(There were some typos in the ICFP 2004 paper.)+Also check out Data.Generics.Text.+ +-}++import Test.HUnit++import Data.Generics hiding (gshow)+import Prelude hiding (showString)++ +gshow :: Data a => a -> String+gshow = gshow_help `extQ` showString++gshow_help :: Data a => a -> String+gshow_help t + = "("+ ++ showConstr (toConstr t)+ ++ concat (intersperse " " (gmapQ gshow t))+ ++ ")"++showString :: String -> String+showString s = "\"" ++ concat (map escape s) ++ "\"" + where+ escape '\n' = "\\n"+ escape other_char = [other_char]++gshowList :: Data b => [b] -> String+gshowList xs+ = "[" ++ concat (intersperse "," (map gshow xs)) ++ "]"++gshow' :: Data a => a -> String+gshow' = gshow_help `ext1Q` gshowList + `extQ` showString++intersperse :: a -> [a] -> [a]+intersperse _ [] = []+intersperse x [e] = [e]+intersperse x (e:es) = (e:(x:intersperse x es))++tests = ( gshow' "foo"+ , gshow' [True,False]+ ) ~=? output++output = ("\"foo\"","[(True),(False)]")
tests/GShow2.hs view
@@ -1,47 +1,47 @@-{-# OPTIONS -fglasgow-exts #-} - -module GShow2 (tests) where - -{- - -This test exercices GENERIC show for the infamous company datatypes. The -output of the program should be some representation of the infamous -"genCom" company. - --} - -import Test.HUnit - -import Data.Generics -import CompanyDatatypes - -tests = gshow genCom ~=? output - -{- - -Here is another exercise: -The following function gshow' is a completely generic variation on gshow. -It would print strings as follows: - -*Main> gshow' "abc" -"((:) ('a') ((:) ('b') ((:) ('c') ([]))))" - -The original gshow does a better job because it is customised for strings: - -*Main> gshow "foo" -"\"foo\"" - -In fact, this is what Haskell's normal show would also do: - -*Main> show "foo" -"\"foo\"" - --} - -gshow' :: Data a => a -> String -gshow' t = "(" - ++ showConstr (toConstr t) - ++ concat (gmapQ ((++) " " . gshow') t) - ++ ")" - -output = "(C ((:) (D \"Research\" (E (P \"Laemmel\" \"Amsterdam\") (S (8000.0))) ((:) (PU (E (P \"Joost\" \"Amsterdam\") (S (1000.0)))) ((:) (PU (E (P \"Marlow\" \"Cambridge\") (S (2000.0)))) ([])))) ((:) (D \"Strategy\" (E (P \"Blair\" \"London\") (S (100000.0))) ([])) ([]))))" +{-# OPTIONS -fglasgow-exts #-}++module GShow2 (tests) where++{-++This test exercices GENERIC show for the infamous company datatypes. The+output of the program should be some representation of the infamous+"genCom" company.++-}++import Test.HUnit++import Data.Generics+import CompanyDatatypes++tests = gshow genCom ~=? output++{-++Here is another exercise:+The following function gshow' is a completely generic variation on gshow.+It would print strings as follows:++*Main> gshow' "abc"+"((:) ('a') ((:) ('b') ((:) ('c') ([]))))"++The original gshow does a better job because it is customised for strings:++*Main> gshow "foo"+"\"foo\""++In fact, this is what Haskell's normal show would also do:++*Main> show "foo"+"\"foo\""++-}++gshow' :: Data a => a -> String+gshow' t = "("+ ++ showConstr (toConstr t)+ ++ concat (gmapQ ((++) " " . gshow') t)+ ++ ")"++output = "(C ((:) (D \"Research\" (E (P \"Laemmel\" \"Amsterdam\") (S (8000.0))) ((:) (PU (E (P \"Joost\" \"Amsterdam\") (S (1000.0)))) ((:) (PU (E (P \"Marlow\" \"Cambridge\") (S (2000.0)))) ([])))) ((:) (D \"Strategy\" (E (P \"Blair\" \"London\") (S (100000.0))) ([])) ([]))))"
tests/GZip.hs view
@@ -1,46 +1,46 @@-{-# OPTIONS -fglasgow-exts #-} - -module GZip (tests) where - -{- - -This test illustrates zipping for the company datatypes which we use a -lot. We process two companies that happen to agree on the overall -shape but differ in the salaries in a few positions. So whenever we -encounter salaries we take the maximum of the two. - --} - -import Test.HUnit - -import Data.Generics -import CompanyDatatypes - --- The main function which prints the result of zipping -tests = gzip (\x y -> mkTT maxS x y) genCom1 genCom2 ~=? output - -- NB: the argument has to be eta-expanded to match - -- the type of gzip's argument type, which is - -- GenericQ (GenericM Maybe) - where - - -- Variations on the show case company "genCom" - genCom1 = everywhere (mkT (double "Joost")) genCom - genCom2 = everywhere (mkT (double "Marlow")) genCom - double x (E p@(P y _) (S s)) | x == y = E p (S (2*s)) - double _ e = e - - -- Sum up two salaries - maxS (S x) (S y) = S (max x y) - - -- Make a two-arguments, generic function transformer - mkTT :: (Typeable a, Typeable b, Typeable c) - => (a -> a -> a) -> b -> c -> Maybe c - mkTT (f::a -> a -> a) x y = - case (cast x,cast y) of - (Just (x'::a),Just (y'::a)) -> cast (f x' y') - _ -> Nothing - -output = Just (C [D "Research" (E (P "Laemmel" "Amsterdam") (S 8000.0)) - [PU (E (P "Joost" "Amsterdam") (S 2000.0)) - ,PU (E (P "Marlow" "Cambridge") (S 4000.0))] - ,D "Strategy" (E (P "Blair" "London") (S 100000.0)) []]) +{-# OPTIONS -fglasgow-exts #-}++module GZip (tests) where++{-++This test illustrates zipping for the company datatypes which we use a+lot. We process two companies that happen to agree on the overall+shape but differ in the salaries in a few positions. So whenever we+encounter salaries we take the maximum of the two.++-}++import Test.HUnit++import Data.Generics+import CompanyDatatypes++-- The main function which prints the result of zipping+tests = gzip (\x y -> mkTT maxS x y) genCom1 genCom2 ~=? output+ -- NB: the argument has to be eta-expanded to match+ -- the type of gzip's argument type, which is+ -- GenericQ (GenericM Maybe)+ where++ -- Variations on the show case company "genCom"+ genCom1 = everywhere (mkT (double "Joost")) genCom+ genCom2 = everywhere (mkT (double "Marlow")) genCom+ double x (E p@(P y _) (S s)) | x == y = E p (S (2*s))+ double _ e = e++ -- Sum up two salaries+ maxS (S x) (S y) = S (max x y)++ -- Make a two-arguments, generic function transformer+ mkTT :: (Typeable a, Typeable b, Typeable c)+ => (a -> a -> a) -> b -> c -> Maybe c+ mkTT (f::a -> a -> a) x y =+ case (cast x,cast y) of+ (Just (x'::a),Just (y'::a)) -> cast (f x' y')+ _ -> Nothing++output = Just (C [D "Research" (E (P "Laemmel" "Amsterdam") (S 8000.0)) + [PU (E (P "Joost" "Amsterdam") (S 2000.0))+ ,PU (E (P "Marlow" "Cambridge") (S 4000.0))]+ ,D "Strategy" (E (P "Blair" "London") (S 100000.0)) []])
tests/GenUpTo.hs view
@@ -1,94 +1,94 @@-{-# OPTIONS -fglasgow-exts #-} - -module GenUpTo (tests) where - -{- - -This example illustrate test-set generation, -namely all terms of a given depth are generated. - --} - -import Test.HUnit - -import Data.Generics - - -{- - -The following datatypes comprise the abstract syntax of a simple -imperative language. Some provisions are such that the discussion -of test-set generation is simplified. In particular, we do not -consider anything but monomorphic *data*types --- no primitive -types, no tuples, ... - --} - -data Prog = Prog Dec Stat - deriving (Show, Eq, Typeable, Data) - -data Dec = Nodec - | Ondec Id Type - | Manydecs Dec Dec - deriving (Show, Eq, Typeable, Data) - -data Id = A | B - deriving (Show, Eq, Typeable, Data) - -data Type = Int | Bool - deriving (Show, Eq, Typeable, Data) - -data Stat = Noop - | Assign Id Exp - | Seq Stat Stat - deriving (Show, Eq, Typeable, Data) - -data Exp = Zero - | Succ Exp - deriving (Show, Eq, Typeable, Data) - - --- Generate all terms of a given depth -genUpTo :: Data a => Int -> [a] -genUpTo 0 = [] -genUpTo d = result - where - -- Getting hold of the result (type) - result = concat (map recurse cons) - - -- Retrieve constructors of the requested type - cons :: [Constr] - cons = dataTypeConstrs (dataTypeOf (head result)) - - -- Find all terms headed by a specific Constr - recurse :: Data a => Constr -> [a] - recurse con = gmapM (\_ -> genUpTo (d-1)) - (fromConstr con) - - -- We could also deal with primitive types easily. - -- Then we had to use cons' instead of cons. - -- - cons' :: [Constr] - cons' = case dataTypeRep ty of - AlgRep cons -> cons - IntRep -> [mkIntegralConstr ty 0] - FloatRep -> [mkIntegralConstr ty 0] - CharRep -> [mkCharConstr ty 'x'] - where - ty = dataTypeOf (head result) - - --- For silly tests -data T0 = T0 T1 T2 T3 deriving (Show, Eq, Typeable, Data) -data T1 = T1a | T1b deriving (Show, Eq, Typeable, Data) -data T2 = T2a | T2b deriving (Show, Eq, Typeable, Data) -data T3 = T3a | T3b deriving (Show, Eq, Typeable, Data) - -tests = ( genUpTo 0 :: [Id] - , ( genUpTo 1 :: [Id] - , ( genUpTo 2 :: [Id] - , ( genUpTo 2 :: [T0] - , ( genUpTo 3 :: [Prog] - ))))) ~=? output - -output = ([],([A,B],([A,B],([T0 T1a T2a T3a,T0 T1a T2a T3b,T0 T1a T2b T3a,T0 T1a T2b T3b,T0 T1b T2a T3a,T0 T1b T2a T3b,T0 T1b T2b T3a,T0 T1b T2b T3b],[Prog Nodec Noop,Prog Nodec (Assign A Zero),Prog Nodec (Assign B Zero),Prog Nodec (Seq Noop Noop),Prog (Ondec A Int) Noop,Prog (Ondec A Int) (Assign A Zero),Prog (Ondec A Int) (Assign B Zero),Prog (Ondec A Int) (Seq Noop Noop),Prog (Ondec A Bool) Noop,Prog (Ondec A Bool) (Assign A Zero),Prog (Ondec A Bool) (Assign B Zero),Prog (Ondec A Bool) (Seq Noop Noop),Prog (Ondec B Int) Noop,Prog (Ondec B Int) (Assign A Zero),Prog (Ondec B Int) (Assign B Zero),Prog (Ondec B Int) (Seq Noop Noop),Prog (Ondec B Bool) Noop,Prog (Ondec B Bool) (Assign A Zero),Prog (Ondec B Bool) (Assign B Zero),Prog (Ondec B Bool) (Seq Noop Noop),Prog (Manydecs Nodec Nodec) Noop,Prog (Manydecs Nodec Nodec) (Assign A Zero),Prog (Manydecs Nodec Nodec) (Assign B Zero),Prog (Manydecs Nodec Nodec) (Seq Noop Noop)])))) +{-# OPTIONS -fglasgow-exts #-}++module GenUpTo (tests) where++{-++This example illustrate test-set generation,+namely all terms of a given depth are generated.++-}++import Test.HUnit++import Data.Generics+++{-++The following datatypes comprise the abstract syntax of a simple+imperative language. Some provisions are such that the discussion+of test-set generation is simplified. In particular, we do not +consider anything but monomorphic *data*types --- no primitive+types, no tuples, ...++-}+ +data Prog = Prog Dec Stat + deriving (Show, Eq, Typeable, Data)++data Dec = Nodec+ | Ondec Id Type + | Manydecs Dec Dec+ deriving (Show, Eq, Typeable, Data)++data Id = A | B+ deriving (Show, Eq, Typeable, Data)++data Type = Int | Bool+ deriving (Show, Eq, Typeable, Data)++data Stat = Noop+ | Assign Id Exp+ | Seq Stat Stat+ deriving (Show, Eq, Typeable, Data)++data Exp = Zero + | Succ Exp+ deriving (Show, Eq, Typeable, Data)+++-- Generate all terms of a given depth+genUpTo :: Data a => Int -> [a]+genUpTo 0 = []+genUpTo d = result+ where+ -- Getting hold of the result (type)+ result = concat (map recurse cons)++ -- Retrieve constructors of the requested type+ cons :: [Constr]+ cons = dataTypeConstrs (dataTypeOf (head result))++ -- Find all terms headed by a specific Constr+ recurse :: Data a => Constr -> [a]+ recurse con = gmapM (\_ -> genUpTo (d-1)) + (fromConstr con)++ -- We could also deal with primitive types easily.+ -- Then we had to use cons' instead of cons.+ --+ cons' :: [Constr]+ cons' = case dataTypeRep ty of+ AlgRep cons -> cons+ IntRep -> [mkIntegralConstr ty 0]+ FloatRep -> [mkIntegralConstr ty 0]+ CharRep -> [mkCharConstr ty 'x']+ where+ ty = dataTypeOf (head result) +++-- For silly tests+data T0 = T0 T1 T2 T3 deriving (Show, Eq, Typeable, Data)+data T1 = T1a | T1b deriving (Show, Eq, Typeable, Data)+data T2 = T2a | T2b deriving (Show, Eq, Typeable, Data)+data T3 = T3a | T3b deriving (Show, Eq, Typeable, Data)++tests = ( genUpTo 0 :: [Id]+ , ( genUpTo 1 :: [Id]+ , ( genUpTo 2 :: [Id]+ , ( genUpTo 2 :: [T0]+ , ( genUpTo 3 :: [Prog]+ ))))) ~=? output++output = ([],([A,B],([A,B],([T0 T1a T2a T3a,T0 T1a T2a T3b,T0 T1a T2b T3a,T0 T1a T2b T3b,T0 T1b T2a T3a,T0 T1b T2a T3b,T0 T1b T2b T3a,T0 T1b T2b T3b],[Prog Nodec Noop,Prog Nodec (Assign A Zero),Prog Nodec (Assign B Zero),Prog Nodec (Seq Noop Noop),Prog (Ondec A Int) Noop,Prog (Ondec A Int) (Assign A Zero),Prog (Ondec A Int) (Assign B Zero),Prog (Ondec A Int) (Seq Noop Noop),Prog (Ondec A Bool) Noop,Prog (Ondec A Bool) (Assign A Zero),Prog (Ondec A Bool) (Assign B Zero),Prog (Ondec A Bool) (Seq Noop Noop),Prog (Ondec B Int) Noop,Prog (Ondec B Int) (Assign A Zero),Prog (Ondec B Int) (Assign B Zero),Prog (Ondec B Int) (Seq Noop Noop),Prog (Ondec B Bool) Noop,Prog (Ondec B Bool) (Assign A Zero),Prog (Ondec B Bool) (Assign B Zero),Prog (Ondec B Bool) (Seq Noop Noop),Prog (Manydecs Nodec Nodec) Noop,Prog (Manydecs Nodec Nodec) (Assign A Zero),Prog (Manydecs Nodec Nodec) (Assign B Zero),Prog (Manydecs Nodec Nodec) (Seq Noop Noop)]))))
tests/GetC.hs view
@@ -1,121 +1,121 @@-{-# OPTIONS -fglasgow-exts #-} -{-# LANGUAGE OverlappingInstances, UndecidableInstances #-} - -module GetC (tests) where - -import Test.HUnit - -{- - -Ralf Laemmel, 5 November 2004 - -Joe Stoy suggested the idiom to test for the outermost constructor. - -Given is a term t -and a constructor f (say the empty constructor application). - -isC f t returns True if the outermost constructor of t is f. -isC f t returns False otherwise. -Modulo type checking, i.e., the data type of f and t must be the same. -If not, we want to see a type error, of course. - --} - -import Data.Typeable -- to cast t's subterms, which will be reused for f. -import Data.Generics -- to access t's subterms and constructors. - - --- Some silly data types -data T1 = T1a Int String | T1b String Int deriving (Typeable, Data) -data T2 = T2a Int Int | T2b String String deriving (Typeable, Data) -data T3 = T3! Int deriving (Typeable, Data) - - --- Test cases -tests = show [ isC T1a (T1a 1 "foo") -- typechecks, returns True - , isC T1a (T1b "foo" 1) -- typechecks, returns False - , isC T3 (T3 42)] -- works for strict data too - ~=? output --- err = show $ isC T2b (T1b "foo" 1) -- must not typecheck - -output = show [True,False,True] - --- --- We look at a datum a. --- We look at a constructor function f. --- The class GetT checks that f constructs data of type a. --- The class GetC computes maybe the constructor ... --- ... if the subterms of the datum at hand fit for f. --- Finally we compare the constructors. --- - -isC :: (Data a, GetT f a, GetC f) => f -> a -> Bool -isC f t = maybe False ((==) (toConstr t)) con - where - kids = gmapQ ExTypeable t -- homogenify subterms in list for reuse - con = getC f kids -- compute constructor from constructor application - - --- --- We prepare for a list of kids using existential envelopes. --- We could also just operate on TypeReps for non-strict datatypes. --- - -data ExTypeable = forall a. Typeable a => ExTypeable a -unExTypeable (ExTypeable a) = cast a - - --- --- Compute the result type of a function type. --- Beware: the TypeUnify constraint causes headache. --- We can't have GetT t t because the FD will be violated then. --- We can't omit the FD because unresolvable overlapping will hold then. --- - -class GetT f t | f -> t -- FD is optional -instance GetT g t => GetT (x -> g) t -instance TypeUnify t t' => GetT t t' - - --- --- Obtain the constructor if term can be completed --- - -class GetC f - where - getC :: f -> [ExTypeable] -> Maybe Constr - -instance (Typeable x, GetC g) => GetC (x -> g) - where - getC _ [] = Nothing - getC (f::x->g) (h:t) - = - do - (x::x) <- unExTypeable h - getC (f x) t - -instance Data t => GetC t - where - getC y [] = Just $ toConstr y - getC _ (_:_) = Nothing - - --- --- Type unification; we could try this: --- class TypeUnify a b | a -> b, b -> a --- instance TypeUnify a a --- --- However, if the instance is placed in the present module, --- then type improvement would inline this instance. Sigh!!! --- --- So we need type unification with type improvement blocker --- The following solution works with GHC for ages. --- Other solutions; see the HList paper. --- - -class TypeUnify a b | a -> b, b -> a -class TypeUnify' x a b | x a -> b, x b -> a -class TypeUnify'' x a b | x a -> b, x b -> a -instance TypeUnify' () a b => TypeUnify a b -instance TypeUnify'' x a b => TypeUnify' x a b -instance TypeUnify'' () a a +{-# OPTIONS -fglasgow-exts #-}+{-# LANGUAGE OverlappingInstances, UndecidableInstances #-}++module GetC (tests) where++import Test.HUnit++{-++Ralf Laemmel, 5 November 2004 ++Joe Stoy suggested the idiom to test for the outermost constructor.++Given is a term t+and a constructor f (say the empty constructor application).++isC f t returns True if the outermost constructor of t is f.+isC f t returns False otherwise.+Modulo type checking, i.e., the data type of f and t must be the same.+If not, we want to see a type error, of course.++-}++import Data.Typeable -- to cast t's subterms, which will be reused for f.+import Data.Generics -- to access t's subterms and constructors.+++-- Some silly data types+data T1 = T1a Int String | T1b String Int deriving (Typeable, Data)+data T2 = T2a Int Int | T2b String String deriving (Typeable, Data)+data T3 = T3! Int deriving (Typeable, Data)+++-- Test cases+tests = show [ isC T1a (T1a 1 "foo") -- typechecks, returns True+ , isC T1a (T1b "foo" 1) -- typechecks, returns False+ , isC T3 (T3 42)] -- works for strict data too+ ~=? output+-- err = show $ isC T2b (T1b "foo" 1) -- must not typecheck++output = show [True,False,True]++--+-- We look at a datum a.+-- We look at a constructor function f.+-- The class GetT checks that f constructs data of type a.+-- The class GetC computes maybe the constructor ...+-- ... if the subterms of the datum at hand fit for f.+-- Finally we compare the constructors.+-- ++isC :: (Data a, GetT f a, GetC f) => f -> a -> Bool+isC f t = maybe False ((==) (toConstr t)) con+ where+ kids = gmapQ ExTypeable t -- homogenify subterms in list for reuse+ con = getC f kids -- compute constructor from constructor application+++--+-- We prepare for a list of kids using existential envelopes.+-- We could also just operate on TypeReps for non-strict datatypes.+-- ++data ExTypeable = forall a. Typeable a => ExTypeable a+unExTypeable (ExTypeable a) = cast a+++-- +-- Compute the result type of a function type.+-- Beware: the TypeUnify constraint causes headache.+-- We can't have GetT t t because the FD will be violated then.+-- We can't omit the FD because unresolvable overlapping will hold then. +-- ++class GetT f t | f -> t -- FD is optional+instance GetT g t => GetT (x -> g) t+instance TypeUnify t t' => GetT t t'+++--+-- Obtain the constructor if term can be completed+-- ++class GetC f+ where+ getC :: f -> [ExTypeable] -> Maybe Constr++instance (Typeable x, GetC g) => GetC (x -> g)+ where+ getC _ [] = Nothing+ getC (f::x->g) (h:t)+ =+ do+ (x::x) <- unExTypeable h+ getC (f x) t++instance Data t => GetC t+ where+ getC y [] = Just $ toConstr y+ getC _ (_:_) = Nothing+++--+-- Type unification; we could try this:+-- class TypeUnify a b | a -> b, b -> a+-- instance TypeUnify a a+-- +-- However, if the instance is placed in the present module,+-- then type improvement would inline this instance. Sigh!!!+--+-- So we need type unification with type improvement blocker+-- The following solution works with GHC for ages.+-- Other solutions; see the HList paper.+--++class TypeUnify a b | a -> b, b -> a+class TypeUnify' x a b | x a -> b, x b -> a +class TypeUnify'' x a b | x a -> b, x b -> a +instance TypeUnify' () a b => TypeUnify a b+instance TypeUnify'' x a b => TypeUnify' x a b+instance TypeUnify'' () a a
tests/HList.hs view
@@ -1,62 +1,62 @@-{-# OPTIONS -fglasgow-exts #-} - -module HList (tests) where - -{- - -This module illustrates heterogeneously typed lists. - --} - -import Test.HUnit - -import Data.Typeable - - --- Heterogeneously typed lists -type HList = [DontKnow] - -data DontKnow = forall a. Typeable a => DontKnow a - --- The empty list -initHList :: HList -initHList = [] - --- Add an entry -addHList :: Typeable a => a -> HList -> HList -addHList a l = (DontKnow a:l) - --- Test for an empty list -nullHList :: HList -> Bool -nullHList = null - --- Retrieve head by type case -headHList :: Typeable a => HList -> Maybe a -headHList [] = Nothing -headHList (DontKnow a:_) = cast a - --- Retrieve tail by type case -tailHList :: HList -> HList -tailHList = tail - --- Access per index; starts at 1 -nth1HList :: Typeable a => Int -> HList -> Maybe a -nth1HList i l = case (l !! (i-1)) of (DontKnow a) -> cast a - - ----------------------------------------------------------------------------- - --- A demo list -mylist = addHList (1::Int) $ - addHList (True::Bool) $ - addHList ("42"::String) $ - initHList - --- Main function for testing -tests = ( show (nth1HList 1 mylist :: Maybe Int) -- shows Just 1 - , ( show (nth1HList 1 mylist :: Maybe Bool) -- shows Nothing - , ( show (nth1HList 2 mylist :: Maybe Bool) -- shows Just True - , ( show (nth1HList 3 mylist :: Maybe String) -- shows Just "42" - )))) ~=? output - +{-# OPTIONS -fglasgow-exts #-}++module HList (tests) where++{-++This module illustrates heterogeneously typed lists.++-}++import Test.HUnit++import Data.Typeable+++-- Heterogeneously typed lists+type HList = [DontKnow]++data DontKnow = forall a. Typeable a => DontKnow a ++-- The empty list+initHList :: HList+initHList = []++-- Add an entry+addHList :: Typeable a => a -> HList -> HList+addHList a l = (DontKnow a:l)++-- Test for an empty list+nullHList :: HList -> Bool+nullHList = null++-- Retrieve head by type case+headHList :: Typeable a => HList -> Maybe a+headHList [] = Nothing+headHList (DontKnow a:_) = cast a++-- Retrieve tail by type case+tailHList :: HList -> HList+tailHList = tail++-- Access per index; starts at 1+nth1HList :: Typeable a => Int -> HList -> Maybe a+nth1HList i l = case (l !! (i-1)) of (DontKnow a) -> cast a+++----------------------------------------------------------------------------++-- A demo list+mylist = addHList (1::Int) $+ addHList (True::Bool) $+ addHList ("42"::String) $+ initHList++-- Main function for testing+tests = ( show (nth1HList 1 mylist :: Maybe Int) -- shows Just 1+ , ( show (nth1HList 1 mylist :: Maybe Bool) -- shows Nothing+ , ( show (nth1HList 2 mylist :: Maybe Bool) -- shows Just True+ , ( show (nth1HList 3 mylist :: Maybe String) -- shows Just "42"+ )))) ~=? output+ output = ("Just 1",("Nothing",("Just True","Just \"42\"")))
tests/HOPat.hs view
@@ -1,67 +1,67 @@-{-# OPTIONS -fglasgow-exts #-} - -module HOPat (tests) where - -{- - -This module is in reply to an email by C. Barry Jay -received on March 15, and handled within hours. CBJ -raises the very interesting issue of higher-order patterns. -It turns out that some form of it is readily covered in -our setting. - --} - -import Test.HUnit - -import Data.Generics - - --- Sample datatypes -data T1 = T1a Int | T1b Float - deriving (Show, Eq, Typeable, Data) -data T2 = T2a T1 T2 | T2b - deriving (Show, Eq, Typeable, Data) - --- Eliminate a constructor if feasible -elim' :: (Data y, Data x) => Constr -> y -> Maybe x -elim' c y = if toConstr y == c - then unwrap y - else Nothing - - --- Unwrap a term; Return its single component -unwrap :: (Data y, Data x) => y -> Maybe x -unwrap y = case gmapQ (Nothing `mkQ` Just) y of - [Just x] -> Just x - _ -> Nothing - - --- Eliminate a constructor if feasible; 2nd try -elim :: forall x y. (Data y, Data x) => (x -> y) -> y -> Maybe x -elim c y = elim' (toConstr (c (undefined::x))) y - - --- Visit a data structure -visitor :: (Data x, Data y, Data z) - => (x -> y) -> (x -> x) -> z -> z -visitor c f = everywhere (mkT g) - where - g y = case elim c y of - Just x -> c (f x) - Nothing -> y - - --- Main function for testing -tests = ( ( elim' (toConstr t1a) t1a) :: Maybe Int - , ( (elim' (toConstr t1a) t1b) :: Maybe Int - , ( (elim T1a t1a) :: Maybe Int - , ( (elim T1a t1b) :: Maybe Int - , ( (visitor T1a ((+) 46) t2) :: T2 - ))))) ~=? output - where - t1a = T1a 42 - t1b = T1b 3.14 - t2 = T2a t1a (T2a t1a T2b) - +{-# OPTIONS -fglasgow-exts #-}++module HOPat (tests) where++{-++This module is in reply to an email by C. Barry Jay+received on March 15, and handled within hours. CBJ+raises the very interesting issue of higher-order patterns.+It turns out that some form of it is readily covered in+our setting.++-}++import Test.HUnit++import Data.Generics+++-- Sample datatypes+data T1 = T1a Int | T1b Float+ deriving (Show, Eq, Typeable, Data)+data T2 = T2a T1 T2 | T2b+ deriving (Show, Eq, Typeable, Data)++-- Eliminate a constructor if feasible+elim' :: (Data y, Data x) => Constr -> y -> Maybe x+elim' c y = if toConstr y == c+ then unwrap y+ else Nothing+++-- Unwrap a term; Return its single component+unwrap :: (Data y, Data x) => y -> Maybe x +unwrap y = case gmapQ (Nothing `mkQ` Just) y of+ [Just x] -> Just x+ _ -> Nothing+++-- Eliminate a constructor if feasible; 2nd try+elim :: forall x y. (Data y, Data x) => (x -> y) -> y -> Maybe x+elim c y = elim' (toConstr (c (undefined::x))) y+++-- Visit a data structure+visitor :: (Data x, Data y, Data z)+ => (x -> y) -> (x -> x) -> z -> z+visitor c f = everywhere (mkT g)+ where+ g y = case elim c y of+ Just x -> c (f x) + Nothing -> y+++-- Main function for testing+tests = ( ( elim' (toConstr t1a) t1a) :: Maybe Int+ , ( (elim' (toConstr t1a) t1b) :: Maybe Int+ , ( (elim T1a t1a) :: Maybe Int+ , ( (elim T1a t1b) :: Maybe Int+ , ( (visitor T1a ((+) 46) t2) :: T2+ ))))) ~=? output+ where+ t1a = T1a 42+ t1b = T1b 3.14+ t2 = T2a t1a (T2a t1a T2b)+ output = (Just 42,(Nothing,(Just 42,(Nothing,T2a (T1a 88) (T2a (T1a 88) T2b)))))
tests/Labels.hs view
@@ -1,30 +1,30 @@-{-# OPTIONS -fglasgow-exts #-} - -module Labels (tests) where - --- This module tests availability of field labels. - -import Test.HUnit - -import Data.Generics - --- A datatype without labels -data NoLabels = NoLabels Int Float - deriving (Typeable, Data) - --- A datatype with labels -data YesLabels = YesLabels { myint :: Int - , myfloat :: Float - } - deriving (Typeable, Data) - --- Test terms -noLabels = NoLabels 42 3.14 -yesLabels = YesLabels 42 3.14 - --- Main function for testing -tests = ( constrFields $ toConstr noLabels - , constrFields $ toConstr yesLabels - ) ~=? output - -output = ([],["myint","myfloat"]) +{-# OPTIONS -fglasgow-exts #-}++module Labels (tests) where++-- This module tests availability of field labels.++import Test.HUnit++import Data.Generics++-- A datatype without labels+data NoLabels = NoLabels Int Float+ deriving (Typeable, Data)++-- A datatype with labels+data YesLabels = YesLabels { myint :: Int+ , myfloat :: Float+ }+ deriving (Typeable, Data)++-- Test terms+noLabels = NoLabels 42 3.14+yesLabels = YesLabels 42 3.14++-- Main function for testing+tests = ( constrFields $ toConstr noLabels+ , constrFields $ toConstr yesLabels+ ) ~=? output++output = ([],["myint","myfloat"])
tests/LocalQuantors.hs view
@@ -1,21 +1,21 @@-{-# OPTIONS -fglasgow-exts #-} - -module LocalQuantors () where - --- A datatype with a locally quantified component --- Seems to be too polymorphic to descend into structure! --- Largely irrelevant?! - -import Data.Generics - -data Test = Test (GenericT) deriving Typeable - -instance Data Test - where - gfoldl _ z x = z x -- folding without descent - toConstr (Test _) = testConstr - gunfold _ _ = error "gunfold" - dataTypeOf _ = testDataType - -testConstr = mkConstr testDataType "Test" [] Prefix -testDataType = mkDataType "Main.Test" [testConstr] +{-# OPTIONS -fglasgow-exts #-}++module LocalQuantors () where++-- A datatype with a locally quantified component+-- Seems to be too polymorphic to descend into structure!+-- Largely irrelevant?!++import Data.Generics++data Test = Test (GenericT) deriving Typeable++instance Data Test+ where+ gfoldl _ z x = z x -- folding without descent + toConstr (Test _) = testConstr+ gunfold _ _ = error "gunfold"+ dataTypeOf _ = testDataType++testConstr = mkConstr testDataType "Test" [] Prefix+testDataType = mkDataType "Main.Test" [testConstr]
tests/Main.hs view
@@ -1,84 +1,82 @@- -module Main where - -import Test.HUnit -import System.Exit - -import qualified Bits -import qualified Builders -import qualified Datatype -import qualified Ext1 -import qualified Ext2 -import qualified FoldTree -import qualified FreeNames -import qualified GEq -import qualified GMapQAssoc -import qualified GRead -import qualified GShow -import qualified GShow2 -import qualified GZip -import qualified GenUpTo -import qualified GetC -import qualified HList -import qualified HOPat -import qualified Labels -import qualified Newtype -import qualified Paradise -import qualified Perm -import qualified Reify -import qualified Strings -import qualified Tree -import qualified Twin -import qualified Typeable -import qualified Typecase1 -import qualified Typecase2 -import qualified Where -import qualified XML - -import qualified Encode -- no tests, should compile -import qualified Ext -- no tests, should compile -import qualified GRead2 -- no tests, should compile -import qualified LocalQuantors -- no tests, should compile -import qualified NestedDatatypes -- no tests, should compile -import qualified Polymatch -- no tests, should compile - - -tests = - "All" ~: [ Datatype.tests - , FoldTree.tests - , GetC.tests - , GMapQAssoc.tests - , GRead.tests - , GShow.tests - , GShow2.tests - , HList.tests - , HOPat.tests - , Labels.tests - , Newtype.tests - , Perm.tests - , Twin.tests - , Typeable.tests - , Typecase1.tests - , Typecase2.tests - , Where.tests - , XML.tests - , Tree.tests - , Strings.tests - , Reify.tests - , Paradise.tests - , GZip.tests - , GEq.tests - , GenUpTo.tests - , FreeNames.tests - , Ext1.tests - , Ext2.tests - , Bits.tests - , Builders.tests - ] - -main = do - putStrLn "Running tests for syb..." - counts <- runTestTT tests - if (failures counts > 0) - then exitFailure - else exitSuccess ++module Main where++import Test.HUnit+import System.Exit++import qualified Bits+import qualified Builders+import qualified Datatype+import qualified Ext1+import qualified Ext2+import qualified FoldTree+import qualified FreeNames+import qualified GEq+import qualified GMapQAssoc+import qualified GRead+import qualified GShow+import qualified GShow2+import qualified GZip+import qualified GenUpTo+import qualified GetC+import qualified HList+import qualified HOPat+import qualified Labels+import qualified Newtype+import qualified Paradise+import qualified Perm+import qualified Reify+import qualified Strings+import qualified Tree+import qualified Twin+import qualified Typecase1+import qualified Typecase2+import qualified Where+import qualified XML++import qualified Encode -- no tests, should compile+import qualified Ext -- no tests, should compile+import qualified GRead2 -- no tests, should compile+import qualified LocalQuantors -- no tests, should compile+import qualified NestedDatatypes -- no tests, should compile+import qualified Polymatch -- no tests, should compile+++tests =+ "All" ~: [ Datatype.tests+ , FoldTree.tests+ , GetC.tests+ , GMapQAssoc.tests+ , GRead.tests+ , GShow.tests+ , GShow2.tests+ , HList.tests+ , HOPat.tests+ , Labels.tests+ , Newtype.tests+ , Perm.tests+ , Twin.tests+ , Typecase1.tests+ , Typecase2.tests+ , Where.tests+ , XML.tests+ , Tree.tests+ , Strings.tests+ , Reify.tests+ , Paradise.tests+ , GZip.tests+ , GEq.tests+ , GenUpTo.tests+ , FreeNames.tests+ , Ext1.tests+ , Ext2.tests+ , Bits.tests+ , Builders.tests+ ]++main = do+ putStrLn "Running tests for syb..."+ counts <- runTestTT tests+ if (failures counts > 0)+ then exitFailure+ else exitSuccess
tests/NestedDatatypes.hs view
@@ -1,52 +1,43 @@-{-# OPTIONS -fglasgow-exts #-} -{-# LANGUAGE UndecidableInstances #-} - -module NestedDatatypes () where - -{- - -We provide an illustrative ScrapYourBoilerplate example for a nested -datatype. For clarity, we do not derive the Typeable and Data -instances by the deriving mechanism but we show the intended -definitions. The overall conclusion is that nested datatypes do not -pose any challenge for the ScrapYourBoilerplate scheme. Well, this is -maybe not quite true because it seems like we need to allow -undecidable instances. - --} - -import Data.Dynamic -import Data.Generics - - --- A nested datatype -data Nest a = Box a | Wrap (Nest [a]) - - --- The representation of the type constructor -nestTc = mkTyCon "Nest" - - --- The Typeable instance for the nested datatype -instance Typeable1 Nest - where - typeOf1 n = mkTyConApp nestTc [] - - --- The Data instance for the nested datatype -instance (Data a, Data [a]) => Data (Nest a) - where - gfoldl k z (Box a) = z Box `k` a - gfoldl k z (Wrap w) = z Wrap `k` w - gmapT f (Box a) = Box (f a) - gmapT f (Wrap w) = Wrap (f w) - toConstr (Box _) = boxConstr - toConstr (Wrap _) = wrapConstr - gunfold k z c = case constrIndex c of - 1 -> k (z Box) - 2 -> k (z Wrap) - dataTypeOf _ = nestDataType - -boxConstr = mkConstr nestDataType "Box" [] Prefix -wrapConstr = mkConstr nestDataType "Wrap" [] Prefix -nestDataType = mkDataType "Main.Nest" [boxConstr,wrapConstr] +{-# OPTIONS -fglasgow-exts #-}+{-# LANGUAGE UndecidableInstances #-}+{-# LANGUAGE DeriveDataTypeable #-}++module NestedDatatypes () where++{-++We provide an illustrative ScrapYourBoilerplate example for a nested+datatype. For clarity, we do not derive the Typeable and Data+instances by the deriving mechanism but we show the intended+definitions. The overall conclusion is that nested datatypes do not+pose any challenge for the ScrapYourBoilerplate scheme. Well, this is+maybe not quite true because it seems like we need to allow+undecidable instances.++-}++import Data.Dynamic+import Data.Generics++ +-- A nested datatype+data Nest a = Box a | Wrap (Nest [a]) deriving Typeable+++-- The Data instance for the nested datatype+instance (Data a, Data [a]) => Data (Nest a)+ where+ gfoldl k z (Box a) = z Box `k` a+ gfoldl k z (Wrap w) = z Wrap `k` w+ gmapT f (Box a) = Box (f a)+ gmapT f (Wrap w) = Wrap (f w)+ toConstr (Box _) = boxConstr+ toConstr (Wrap _) = wrapConstr+ gunfold k z c = case constrIndex c of+ 1 -> k (z Box)+ 2 -> k (z Wrap)+ dataTypeOf _ = nestDataType++boxConstr = mkConstr nestDataType "Box" [] Prefix+wrapConstr = mkConstr nestDataType "Wrap" [] Prefix+nestDataType = mkDataType "Main.Nest" [boxConstr,wrapConstr]
tests/Paradise.hs view
@@ -1,29 +1,29 @@-{-# OPTIONS -fglasgow-exts #-} - -module Paradise (tests) where - -{- - -This test runs the infamous PARADISE benchmark, -which is the HELLO WORLD example of generic programming, -i.e., the "increase salary" function is applied to -a typical company just as shown in the boilerplate paper. - --} - -import Test.HUnit - -import Data.Generics -import CompanyDatatypes - --- Increase salary by percentage -increase :: Float -> Company -> Company -increase k = everywhere (mkT (incS k)) - --- "interesting" code for increase -incS :: Float -> Salary -> Salary -incS k (S s) = S (s * (1+k)) - -tests = increase 0.1 genCom ~=? output - -output = C [D "Research" (E (P "Laemmel" "Amsterdam") (S 8800.0)) [PU (E (P "Joost" "Amsterdam") (S 1100.0)),PU (E (P "Marlow" "Cambridge") (S 2200.0))],D "Strategy" (E (P "Blair" "London") (S 110000.0)) []] +{-# OPTIONS -fglasgow-exts #-}++module Paradise (tests) where++{-++This test runs the infamous PARADISE benchmark,+which is the HELLO WORLD example of generic programming,+i.e., the "increase salary" function is applied to+a typical company just as shown in the boilerplate paper.++-}++import Test.HUnit++import Data.Generics+import CompanyDatatypes++-- Increase salary by percentage+increase :: Float -> Company -> Company+increase k = everywhere (mkT (incS k))++-- "interesting" code for increase+incS :: Float -> Salary -> Salary+incS k (S s) = S (s * (1+k))++tests = increase 0.1 genCom ~=? output++output = C [D "Research" (E (P "Laemmel" "Amsterdam") (S 8800.0)) [PU (E (P "Joost" "Amsterdam") (S 1100.0)),PU (E (P "Marlow" "Cambridge") (S 2200.0))],D "Strategy" (E (P "Blair" "London") (S 110000.0)) []]
tests/Perm.hs view
@@ -1,127 +1,127 @@-{-# OPTIONS -fglasgow-exts #-} - -module Perm (tests) where - -{- - -This module illustrates permutation phrases. -Disclaimer: this is a perhaps naive, certainly undebugged example. - --} - -import Test.HUnit - -import Control.Monad -import Data.Generics - ---------------------------------------------------------------------------- --- We want to read terms of type T3 regardless of the order T1 and T2. ---------------------------------------------------------------------------- - -data T1 = T1 deriving (Show, Eq, Typeable, Data) -data T2 = T2 deriving (Show, Eq, Typeable, Data) -data T3 = T3 T1 T2 deriving (Show, Eq, Typeable, Data) - - ---------------------------------------------------------------------------- --- A silly monad that we use to read lists of constructor strings. ---------------------------------------------------------------------------- - --- Type constructor -newtype ReadT a = ReadT { unReadT :: [String] -> Maybe ([String],a) } - - - --- Run a computation -runReadT x y = case unReadT x y of - Just ([],y) -> Just y - _ -> Nothing - --- Read one string -readT :: ReadT String -readT = ReadT (\x -> if null x - then Nothing - else Just (tail x, head x) - ) - --- ReadT is a monad! -instance Monad ReadT where - return x = ReadT (\y -> Just (y,x)) - c >>= f = ReadT (\x -> case unReadT c x of - Nothing -> Nothing - Just (x', a) -> unReadT (f a) x' - ) - --- ReadT also accommodates mzero and mplus! -instance MonadPlus ReadT where - mzero = ReadT (const Nothing) - f `mplus` g = ReadT (\x -> case unReadT f x of - Nothing -> unReadT g x - y -> y - ) - - ---------------------------------------------------------------------------- --- A helper type to appeal to predicative type system. ---------------------------------------------------------------------------- - -newtype GenM = GenM { unGenM :: forall a. Data a => a -> ReadT a } - - ---------------------------------------------------------------------------- --- The function that reads and copes with all permutations. ---------------------------------------------------------------------------- - -buildT :: forall a. Data a => ReadT a -buildT = result - - where - result = do str <- readT - con <- string2constr str - ske <- return $ fromConstr con - fs <- return $ gmapQ buildT' ske - perm [] fs ske - - -- Determine type of data to be constructed - myType = myTypeOf result - where - myTypeOf :: forall a. ReadT a -> a - myTypeOf = undefined - - -- Turn string into constructor - string2constr str = maybe mzero - return - (readConstr (dataTypeOf myType) str) - - -- Specialise buildT per kid type - buildT' :: forall a. Data a => a -> GenM - buildT' (_::a) = GenM (const mzero `extM` const (buildT::ReadT a)) - - -- The permutation exploration function - perm :: forall a. Data a => [GenM] -> [GenM] -> a -> ReadT a - perm [] [] a = return a - perm fs [] a = perm [] fs a - perm fs (f:fs') a = ( - do a' <- gmapMo (unGenM f) a - perm fs fs' a' - ) - `mplus` - ( - do guard (not (null fs')) - perm (f:fs) fs' a - ) - - ---------------------------------------------------------------------------- --- The main function for testing ---------------------------------------------------------------------------- - -tests = - ( runReadT buildT ["T1"] :: Maybe T1 -- should parse fine - , ( runReadT buildT ["T2"] :: Maybe T2 -- should parse fine - , ( runReadT buildT ["T3","T1","T2"] :: Maybe T3 -- should parse fine - , ( runReadT buildT ["T3","T2","T1"] :: Maybe T3 -- should parse fine - , ( runReadT buildT ["T3","T2","T2"] :: Maybe T3 -- should fail - ))))) ~=? output - -output = (Just T1,(Just T2,(Just (T3 T1 T2),(Just (T3 T1 T2),Nothing)))) +{-# OPTIONS -fglasgow-exts #-}++module Perm (tests) where++{-++This module illustrates permutation phrases.+Disclaimer: this is a perhaps naive, certainly undebugged example.++-}++import Test.HUnit++import Control.Monad+import Data.Generics++---------------------------------------------------------------------------+-- We want to read terms of type T3 regardless of the order T1 and T2.+---------------------------------------------------------------------------++data T1 = T1 deriving (Show, Eq, Typeable, Data)+data T2 = T2 deriving (Show, Eq, Typeable, Data)+data T3 = T3 T1 T2 deriving (Show, Eq, Typeable, Data)+++---------------------------------------------------------------------------+-- A silly monad that we use to read lists of constructor strings.+---------------------------------------------------------------------------++-- Type constructor+newtype ReadT a = ReadT { unReadT :: [String] -> Maybe ([String],a) }++++-- Run a computation+runReadT x y = case unReadT x y of+ Just ([],y) -> Just y+ _ -> Nothing++-- Read one string+readT :: ReadT String+readT = ReadT (\x -> if null x+ then Nothing+ else Just (tail x, head x)+ )++-- ReadT is a monad!+instance Monad ReadT where+ return x = ReadT (\y -> Just (y,x))+ c >>= f = ReadT (\x -> case unReadT c x of+ Nothing -> Nothing+ Just (x', a) -> unReadT (f a) x'+ )++-- ReadT also accommodates mzero and mplus!+instance MonadPlus ReadT where+ mzero = ReadT (const Nothing)+ f `mplus` g = ReadT (\x -> case unReadT f x of+ Nothing -> unReadT g x+ y -> y+ )+++---------------------------------------------------------------------------+-- A helper type to appeal to predicative type system.+---------------------------------------------------------------------------++newtype GenM = GenM { unGenM :: forall a. Data a => a -> ReadT a }+++---------------------------------------------------------------------------+-- The function that reads and copes with all permutations.+---------------------------------------------------------------------------++buildT :: forall a. Data a => ReadT a+buildT = result++ where+ result = do str <- readT+ con <- string2constr str+ ske <- return $ fromConstr con+ fs <- return $ gmapQ buildT' ske+ perm [] fs ske++ -- Determine type of data to be constructed+ myType = myTypeOf result+ where+ myTypeOf :: forall a. ReadT a -> a+ myTypeOf = undefined++ -- Turn string into constructor+ string2constr str = maybe mzero+ return+ (readConstr (dataTypeOf myType) str)++ -- Specialise buildT per kid type+ buildT' :: forall a. Data a => a -> GenM+ buildT' (_::a) = GenM (const mzero `extM` const (buildT::ReadT a))++ -- The permutation exploration function+ perm :: forall a. Data a => [GenM] -> [GenM] -> a -> ReadT a+ perm [] [] a = return a+ perm fs [] a = perm [] fs a+ perm fs (f:fs') a = (+ do a' <- gmapMo (unGenM f) a+ perm fs fs' a'+ )+ `mplus`+ (+ do guard (not (null fs'))+ perm (f:fs) fs' a+ )+++---------------------------------------------------------------------------+-- The main function for testing+---------------------------------------------------------------------------++tests =+ ( runReadT buildT ["T1"] :: Maybe T1 -- should parse fine+ , ( runReadT buildT ["T2"] :: Maybe T2 -- should parse fine+ , ( runReadT buildT ["T3","T1","T2"] :: Maybe T3 -- should parse fine+ , ( runReadT buildT ["T3","T2","T1"] :: Maybe T3 -- should parse fine+ , ( runReadT buildT ["T3","T2","T2"] :: Maybe T3 -- should fail+ ))))) ~=? output++output = (Just T1,(Just T2,(Just (T3 T1 T2),(Just (T3 T1 T2),Nothing))))
tests/Polymatch.hs view
@@ -1,70 +1,70 @@-{-# OPTIONS -fglasgow-exts #-} - -module Polymatch () where - - -import Data.Typeable -import Data.Generics - - --- Representation of kids -kids x = gmapQ Kid x -- get all kids -type Kids = [Kid] -data Kid = forall k. Typeable k => Kid k - - --- Build term from a list of kids and the constructor -fromConstrL :: Data a => Kids -> Constr -> Maybe a -fromConstrL l = unIDL . gunfold k z - where - z c = IDL (Just c) l - k (IDL Nothing _) = IDL Nothing undefined - k (IDL (Just f) (Kid x:l)) = IDL f' l - where - f' = case cast x of - (Just x') -> Just (f x') - _ -> Nothing - - --- Helper datatype -data IDL x = IDL (Maybe x) Kids -unIDL (IDL mx _) = mx - - --- Two sample datatypes -data A = A String deriving (Read, Show, Eq, Data, Typeable) -data B = B String deriving (Read, Show, Eq, Data, Typeable) - - --- Mediate between two "left-equal" Either types -f :: (Data a, Data b, Show a, Read b) - => (a->b) -> Either String a -> Either String b - -f g (Right a) = Right $ g a -- conversion really needed --- f g (Left s) = Left s -- unappreciated conversion --- f g s = s -- doesn't typecheck --- f g s = deep_rebuild s -- too expensive -f g s = just (shallow_rebuild s) -- perhaps this is Ok? - - --- Get rid of maybies -just = maybe (error "tried, but failed.") id - - --- Just mentioned for completeness' sake -deep_rebuild :: (Show a, Read b) => a -> b -deep_rebuild = read . show - - --- For the record: it's possible. -shallow_rebuild :: (Data a, Data b) => a -> Maybe b -shallow_rebuild a = b - where - b = fromConstrL (kids a) constr - constr = indexConstr (dataTypeOf b) (constrIndex (toConstr a)) - - --- Test cases -a2b (A s) = B s -- silly conversion -t1 = f a2b (Left "x") -- prints Left "x" -t2 = f a2b (Right (A "y")) -- prints Right (B "y") +{-# OPTIONS -fglasgow-exts #-}++module Polymatch () where+++import Data.Typeable+import Data.Generics+++-- Representation of kids+kids x = gmapQ Kid x -- get all kids+type Kids = [Kid]+data Kid = forall k. Typeable k => Kid k+++-- Build term from a list of kids and the constructor +fromConstrL :: Data a => Kids -> Constr -> Maybe a+fromConstrL l = unIDL . gunfold k z+ where+ z c = IDL (Just c) l+ k (IDL Nothing _) = IDL Nothing undefined+ k (IDL (Just f) (Kid x:l)) = IDL f' l+ where+ f' = case cast x of+ (Just x') -> Just (f x')+ _ -> Nothing+++-- Helper datatype+data IDL x = IDL (Maybe x) Kids+unIDL (IDL mx _) = mx+++-- Two sample datatypes+data A = A String deriving (Read, Show, Eq, Data, Typeable)+data B = B String deriving (Read, Show, Eq, Data, Typeable)+++-- Mediate between two "left-equal" Either types+f :: (Data a, Data b, Show a, Read b)+ => (a->b) -> Either String a -> Either String b++f g (Right a) = Right $ g a -- conversion really needed+-- f g (Left s) = Left s -- unappreciated conversion+-- f g s = s -- doesn't typecheck +-- f g s = deep_rebuild s -- too expensive+f g s = just (shallow_rebuild s) -- perhaps this is Ok?+++-- Get rid of maybies+just = maybe (error "tried, but failed.") id+++-- Just mentioned for completeness' sake+deep_rebuild :: (Show a, Read b) => a -> b+deep_rebuild = read . show+++-- For the record: it's possible.+shallow_rebuild :: (Data a, Data b) => a -> Maybe b+shallow_rebuild a = b + where+ b = fromConstrL (kids a) constr+ constr = indexConstr (dataTypeOf b) (constrIndex (toConstr a))+++-- Test cases+a2b (A s) = B s -- silly conversion+t1 = f a2b (Left "x") -- prints Left "x"+t2 = f a2b (Right (A "y")) -- prints Right (B "y")
tests/Reify.hs view
@@ -1,413 +1,413 @@-{-# OPTIONS -fglasgow-exts #-} - -module Reify (tests) where - -{- - -The following examples illustrate the reification facilities for type -structure. Most notably, we generate shallow terms using the depth of -types and constructors as means to steer the generation. - --} - -import Test.HUnit - -import Data.Maybe -import Data.Generics -import Control.Monad.State -import CompanyDatatypes - - - ------------------------------------------------------------------------------- --- --- Encoding types as values; some other way. --- ------------------------------------------------------------------------------- - -{- - -This group provides a style of encoding types as values and using -them. This style is seen as an alternative to the pragmatic style used -in Data.Typeable.typeOf and elsewhere, i.e., simply use an "undefined" -to denote a type argument. This pragmatic style suffers from lack -of robustness: one feels tempted to pattern match on undefineds. -Maybe Data.Typeable.typeOf etc. should be rewritten accordingly. - --} - - --- | Type as values to stipulate use of undefineds -type TypeVal a = a -> () - - --- | The value that denotes a type -typeVal :: TypeVal a -typeVal = const () - - --- | Test for type equivalence -sameType :: (Typeable a, Typeable b) => TypeVal a -> TypeVal b -> Bool -sameType tva tvb = typeOf (type2val tva) == - typeOf (type2val tvb) - - --- | Map a value to its type -val2type :: a -> TypeVal a -val2type _ = typeVal - - --- | Stipulate this idiom! -type2val :: TypeVal a -> a -type2val _ = undefined - - --- | Constrain a type -withType :: a -> TypeVal a -> a -withType x _ = x - - --- | The argument type of a function -argType :: (a -> b) -> TypeVal a -argType _ = typeVal - - --- | The result type of a function -resType :: (a -> b) -> TypeVal b -resType _ = typeVal - - --- | The parameter type of type constructor -paraType :: t a -> TypeVal a -paraType _ = typeVal - - --- Type functions, --- i.e., functions mapping types to values --- -type TypeFun a r = TypeVal a -> r - - - --- Generic type functions, --- i.e., functions mapping types to values --- -type GTypeFun r = forall a. Data a => TypeFun a r - - - --- | Extend a type function -extType :: (Data a, Typeable r) => GTypeFun r -> TypeFun a r -> GTypeFun r -extType f x = maybe f id (cast x) - - - ------------------------------------------------------------------------------- --- --- Mapping operators to map over type structure --- ------------------------------------------------------------------------------- - - --- | Query all constructors of a given type - -gmapType :: ([(Constr,r')] -> r) - -> GTypeFun (Constr -> r') - -> GTypeFun r - -gmapType (o::[(Constr,r')] -> r) f (t::TypeVal a) - = - o $ zip cons query - - where - - -- All constructors of the given type - cons :: [Constr] - cons = if isAlgType $ dataTypeOf $ type2val t - then dataTypeConstrs $ dataTypeOf $ type2val t - else [] - - -- Query constructors - query :: [r'] - query = map (f t) cons - - --- | Query all subterm types of a given constructor - -gmapConstr :: ([r] -> r') - -> GTypeFun r - -> GTypeFun (Constr -> r') - -gmapConstr (o::[r] -> r') f (t::TypeVal a) c - = - o $ query - - where - - -- Term for the given constructor - term :: a - term = fromConstr c - - -- Query subterm types - query :: [r] - query = gmapQ (f . val2type) term - - --- | Compute arity of a given constructor -constrArity :: GTypeFun (Constr -> Int) -constrArity t c = glength $ withType (fromConstr c) t - - --- | Query all immediate subterm types of a given type -gmapSubtermTypes :: (Data a, Typeable r) - => (r -> r -> r) -> r -> GTypeFun r -> TypeVal a -> r -gmapSubtermTypes o (r::r) f (t::TypeVal a) - = - reduce (concat (map (gmapQ (query . val2type)) terms)) - (GTypeFun' f) - - where - - -- All constructors of the given type - cons :: [Constr] - cons = if isAlgType $ dataTypeOf $ type2val t - then dataTypeConstrs $ dataTypeOf $ type2val t - else [] - - -- Terms for all constructors - terms :: [a] - terms = map fromConstr cons - - -- Query a subterm type - query :: Data b => TypeVal b -> GTypeFun' r -> (r,GTypeFun' r) - query t f = (unGTypeFun' f t, GTypeFun' (disable t (unGTypeFun' f))) - - -- Constant out given type - disable :: Data b => TypeVal b -> GTypeFun r -> GTypeFun r - disable (t::TypeVal b) f = f `extType` \(_::TypeVal b) -> r - - -- Reduce all subterm types - reduce :: [GTypeFun' r -> (r,GTypeFun' r)] -> GTypeFun' r -> r - reduce [] _ = r - reduce (xy:z) g = fst (xy g) `o` reduce z (snd (xy g)) - - --- First-class polymorphic variation on GTypeFun -newtype GTypeFun' r = GTypeFun' (GTypeFun r) -unGTypeFun' (GTypeFun' f) = f - - --- | Query all immediate subterm types. --- There is an extra argument to \"constant out\" the type at hand. --- This can be used to avoid cycles. - -gmapSubtermTypesConst :: (Data a, Typeable r) - => (r -> r -> r) - -> r - -> GTypeFun r - -> TypeVal a - -> r -gmapSubtermTypesConst o (r::r) f (t::TypeVal a) - = - gmapSubtermTypes o r f' t - where - f' :: GTypeFun r - f' = f `extType` \(_::TypeVal a) -> r - - --- Count all distinct subterm types -gcountSubtermTypes :: Data a => TypeVal a -> Int -gcountSubtermTypes = gmapSubtermTypes (+) (0::Int) (const 1) - - --- | A simplied variation on gmapSubtermTypes. --- Weakness: no awareness of doubles. --- Strength: easy to comprehend as it uses gmapType and gmapConstr. - -_gmapSubtermTypes :: (Data a, Typeable r) - => (r -> r -> r) -> r -> GTypeFun r -> TypeVal a -> r -_gmapSubtermTypes o (r::r) f - = - gmapType otype (gmapConstr oconstr f) - - where - - otype :: [(Constr,r)] -> r - otype = foldr (\x y -> snd x `o` y) r - - oconstr :: [r] -> r - oconstr = foldr o r - - ------------------------------------------------------------------------------- --- --- Some reifying relations on types --- ------------------------------------------------------------------------------- - - --- | Reachability relation on types, i.e., --- test if nodes of type @a@ are reachable from nodes of type @b@. --- The relation is defined to be reflexive. - -reachableType :: (Data a, Data b) => TypeVal a -> TypeVal b -> Bool -reachableType (a::TypeVal a) (b::TypeVal b) - = - or [ sameType a b - , gmapSubtermTypesConst (\x y -> or [x,y]) False (reachableType a) b - ] - - --- | Depth of a datatype as the constructor with the minimum depth. --- The outermost 'Nothing' denotes a type without constructors. --- The innermost 'Nothing' denotes potentially infinite. - -depthOfType :: GTypeFun Bool -> GTypeFun (Maybe (Constr, Maybe Int)) -depthOfType p (t::TypeVal a) - = - gmapType o f t - - where - - o :: [(Constr, Maybe Int)] -> Maybe (Constr, Maybe Int) - o l = if null l then Nothing else Just (foldr1 min' l) - - f :: GTypeFun (Constr -> Maybe Int) - f = depthOfConstr p' - - -- Specific minimum operator - min' :: (Constr, Maybe Int) -> (Constr, Maybe Int) -> (Constr, Maybe Int) - min' x (_, Nothing) = x - min' (_, Nothing) x = x - min' (c, Just i) (c', Just i') | i <= i' = (c, Just i) - min' (c, Just i) (c', Just i') = (c', Just i') - - -- Updated predicate for unblocked types - p' :: GTypeFun Bool - p' = p `extType` \(_::TypeVal a) -> False - - --- | Depth of a constructor. --- Depth is viewed as the maximum depth of all subterm types + 1. --- 'Nothing' denotes potentially infinite. - -depthOfConstr :: GTypeFun Bool -> GTypeFun (Constr -> Maybe Int) -depthOfConstr p (t::TypeVal a) c - = - gmapConstr o f t c - - where - - o :: [Maybe Int] -> Maybe Int - o = inc' . foldr max' (Just 0) - - f :: GTypeFun (Maybe Int) - f t' = if p t' - then - case depthOfType p t' of - Nothing -> Just 0 - Just (_, x) -> x - else Nothing - - -- Specific maximum operator - max' Nothing _ = Nothing - max' _ Nothing = Nothing - max' (Just i) (Just i') | i >= i' = Just i - max' (Just i) (Just i') = Just i' - - -- Specific increment operator - inc' Nothing = Nothing - inc' (Just i) = Just (i+1) - - ------------------------------------------------------------------------------- --- --- Build a shallow term --- ------------------------------------------------------------------------------- - -shallowTerm :: (forall a. Data a => Maybe a) -> (forall b. Data b => b) -shallowTerm cust - = result - where - result :: forall b. Data b => b - -- Need a type signature here to bring 'b' into scope - result = maybe gdefault id cust - where - - -- The worker, also used for type disambiguation - gdefault :: b - gdefault = case con of - Just (con, Just _) -> fromConstrB (shallowTerm cust) con - _ -> error "no shallow term!" - - -- The type to be constructed - typeVal :: TypeVal b - typeVal = val2type gdefault - - -- The most shallow constructor if any - con :: Maybe (Constr, Maybe Int) - con = depthOfType (const True) typeVal - - - --- For testing shallowTerm -shallowTermBase :: GenericR Maybe -shallowTermBase = Nothing - `extR` Just (1.23::Float) - `extR` Just ("foo"::String) - - - --- Sample datatypes -data T1 = T1a deriving (Typeable, Data) -- just a constant -data T2 = T2 T1 deriving (Typeable, Data) -- little detour -data T3 = T3a T3 | T3b T2 deriving (Typeable, Data) -- recursive case -data T4 = T4 T3 T3 deriving (Typeable, Data) -- sum matters - - - --- Sample type arguments -t0 = typeVal :: TypeVal Int -t1 = typeVal :: TypeVal T1 -t2 = typeVal :: TypeVal T2 -t3 = typeVal :: TypeVal T3 -t4 = typeVal :: TypeVal T4 -tCompany = typeVal :: TypeVal Company -tPerson = typeVal :: TypeVal Person -tEmployee = typeVal :: TypeVal Employee -tDept = typeVal :: TypeVal Dept - - - --- Test cases -test0 = t1 `reachableType` t1 -- True -test1 = t1 `reachableType` t2 -- True -test2 = t2 `reachableType` t1 -- False -test3 = t1 `reachableType` t3 -test4 = tPerson `reachableType` tCompany -test5 = gcountSubtermTypes tPerson -test6 = gcountSubtermTypes tEmployee -test7 = gcountSubtermTypes tDept -test8 = shallowTerm shallowTermBase :: Person -test9 = shallowTerm shallowTermBase :: Employee -test10 = shallowTerm shallowTermBase :: Dept - - - -tests = ( test0 - , ( test1 - , ( test2 - , ( test3 - , ( test4 - , ( test5 - , ( test6 - , ( test7 - , ( test8 - , ( test9 - , ( test10 - ))))))))))) ~=? output - -output = (True,(True,(False,(True,(True,(1,(2,(3,(P "foo" "foo", - (E (P "foo" "foo") (S 1.23), - D "foo" (E (P "foo" "foo") (S 1.23)) [])))))))))) +{-# OPTIONS -fglasgow-exts #-}++module Reify (tests) where++{-++The following examples illustrate the reification facilities for type+structure. Most notably, we generate shallow terms using the depth of+types and constructors as means to steer the generation.++-}++import Test.HUnit++import Data.Maybe+import Data.Generics+import Control.Monad.State+import CompanyDatatypes++++------------------------------------------------------------------------------+--+-- Encoding types as values; some other way.+--+------------------------------------------------------------------------------++{- ++This group provides a style of encoding types as values and using+them. This style is seen as an alternative to the pragmatic style used+in Data.Typeable.typeOf and elsewhere, i.e., simply use an "undefined"+to denote a type argument. This pragmatic style suffers from lack+of robustness: one feels tempted to pattern match on undefineds.+Maybe Data.Typeable.typeOf etc. should be rewritten accordingly.++-}+++-- | Type as values to stipulate use of undefineds+type TypeVal a = a -> ()+++-- | The value that denotes a type+typeVal :: TypeVal a+typeVal = const ()+++-- | Test for type equivalence+sameType :: (Typeable a, Typeable b) => TypeVal a -> TypeVal b -> Bool+sameType tva tvb = typeOf (type2val tva) ==+ typeOf (type2val tvb)+++-- | Map a value to its type+val2type :: a -> TypeVal a+val2type _ = typeVal+++-- | Stipulate this idiom!+type2val :: TypeVal a -> a+type2val _ = undefined+++-- | Constrain a type+withType :: a -> TypeVal a -> a+withType x _ = x+++-- | The argument type of a function+argType :: (a -> b) -> TypeVal a+argType _ = typeVal+++-- | The result type of a function+resType :: (a -> b) -> TypeVal b+resType _ = typeVal+++-- | The parameter type of type constructor+paraType :: t a -> TypeVal a+paraType _ = typeVal+++-- Type functions,+-- i.e., functions mapping types to values+--+type TypeFun a r = TypeVal a -> r++++-- Generic type functions,+-- i.e., functions mapping types to values+--+type GTypeFun r = forall a. Data a => TypeFun a r++++-- | Extend a type function+extType :: (Data a, Typeable r) => GTypeFun r -> TypeFun a r -> GTypeFun r+extType f x = maybe f id (cast x)++++------------------------------------------------------------------------------+--+-- Mapping operators to map over type structure+--+------------------------------------------------------------------------------+++-- | Query all constructors of a given type++gmapType :: ([(Constr,r')] -> r)+ -> GTypeFun (Constr -> r')+ -> GTypeFun r++gmapType (o::[(Constr,r')] -> r) f (t::TypeVal a)+ = + o $ zip cons query++ where++ -- All constructors of the given type+ cons :: [Constr]+ cons = if isAlgType $ dataTypeOf $ type2val t+ then dataTypeConstrs $ dataTypeOf $ type2val t+ else []++ -- Query constructors+ query :: [r']+ query = map (f t) cons+++-- | Query all subterm types of a given constructor++gmapConstr :: ([r] -> r')+ -> GTypeFun r+ -> GTypeFun (Constr -> r')++gmapConstr (o::[r] -> r') f (t::TypeVal a) c+ = + o $ query++ where++ -- Term for the given constructor+ term :: a+ term = fromConstr c++ -- Query subterm types+ query :: [r]+ query = gmapQ (f . val2type) term+++-- | Compute arity of a given constructor+constrArity :: GTypeFun (Constr -> Int)+constrArity t c = glength $ withType (fromConstr c) t+++-- | Query all immediate subterm types of a given type+gmapSubtermTypes :: (Data a, Typeable r) + => (r -> r -> r) -> r -> GTypeFun r -> TypeVal a -> r+gmapSubtermTypes o (r::r) f (t::TypeVal a)+ =+ reduce (concat (map (gmapQ (query . val2type)) terms))+ (GTypeFun' f)++ where++ -- All constructors of the given type+ cons :: [Constr]+ cons = if isAlgType $ dataTypeOf $ type2val t+ then dataTypeConstrs $ dataTypeOf $ type2val t+ else []++ -- Terms for all constructors+ terms :: [a]+ terms = map fromConstr cons++ -- Query a subterm type+ query :: Data b => TypeVal b -> GTypeFun' r -> (r,GTypeFun' r)+ query t f = (unGTypeFun' f t, GTypeFun' (disable t (unGTypeFun' f)))++ -- Constant out given type+ disable :: Data b => TypeVal b -> GTypeFun r -> GTypeFun r+ disable (t::TypeVal b) f = f `extType` \(_::TypeVal b) -> r++ -- Reduce all subterm types+ reduce :: [GTypeFun' r -> (r,GTypeFun' r)] -> GTypeFun' r -> r+ reduce [] _ = r+ reduce (xy:z) g = fst (xy g) `o` reduce z (snd (xy g))+++-- First-class polymorphic variation on GTypeFun+newtype GTypeFun' r = GTypeFun' (GTypeFun r)+unGTypeFun' (GTypeFun' f) = f+++-- | Query all immediate subterm types.+-- There is an extra argument to \"constant out\" the type at hand.+-- This can be used to avoid cycles.++gmapSubtermTypesConst :: (Data a, Typeable r)+ => (r -> r -> r)+ -> r+ -> GTypeFun r + -> TypeVal a + -> r+gmapSubtermTypesConst o (r::r) f (t::TypeVal a)+ =+ gmapSubtermTypes o r f' t+ where+ f' :: GTypeFun r+ f' = f `extType` \(_::TypeVal a) -> r+++-- Count all distinct subterm types+gcountSubtermTypes :: Data a => TypeVal a -> Int+gcountSubtermTypes = gmapSubtermTypes (+) (0::Int) (const 1)+++-- | A simplied variation on gmapSubtermTypes.+-- Weakness: no awareness of doubles.+-- Strength: easy to comprehend as it uses gmapType and gmapConstr.++_gmapSubtermTypes :: (Data a, Typeable r) + => (r -> r -> r) -> r -> GTypeFun r -> TypeVal a -> r+_gmapSubtermTypes o (r::r) f+ =+ gmapType otype (gmapConstr oconstr f)++ where++ otype :: [(Constr,r)] -> r+ otype = foldr (\x y -> snd x `o` y) r++ oconstr :: [r] -> r+ oconstr = foldr o r+++------------------------------------------------------------------------------+--+-- Some reifying relations on types+--+------------------------------------------------------------------------------+++-- | Reachability relation on types, i.e.,+-- test if nodes of type @a@ are reachable from nodes of type @b@.+-- The relation is defined to be reflexive.++reachableType :: (Data a, Data b) => TypeVal a -> TypeVal b -> Bool+reachableType (a::TypeVal a) (b::TypeVal b)+ =+ or [ sameType a b+ , gmapSubtermTypesConst (\x y -> or [x,y]) False (reachableType a) b+ ]+++-- | Depth of a datatype as the constructor with the minimum depth.+-- The outermost 'Nothing' denotes a type without constructors.+-- The innermost 'Nothing' denotes potentially infinite.++depthOfType :: GTypeFun Bool -> GTypeFun (Maybe (Constr, Maybe Int))+depthOfType p (t::TypeVal a)+ = + gmapType o f t++ where+ + o :: [(Constr, Maybe Int)] -> Maybe (Constr, Maybe Int)+ o l = if null l then Nothing else Just (foldr1 min' l)++ f :: GTypeFun (Constr -> Maybe Int)+ f = depthOfConstr p'++ -- Specific minimum operator+ min' :: (Constr, Maybe Int) -> (Constr, Maybe Int) -> (Constr, Maybe Int)+ min' x (_, Nothing) = x+ min' (_, Nothing) x = x+ min' (c, Just i) (c', Just i') | i <= i' = (c, Just i)+ min' (c, Just i) (c', Just i') = (c', Just i')++ -- Updated predicate for unblocked types+ p' :: GTypeFun Bool+ p' = p `extType` \(_::TypeVal a) -> False+++-- | Depth of a constructor.+-- Depth is viewed as the maximum depth of all subterm types + 1.+-- 'Nothing' denotes potentially infinite.++depthOfConstr :: GTypeFun Bool -> GTypeFun (Constr -> Maybe Int)+depthOfConstr p (t::TypeVal a) c+ =+ gmapConstr o f t c++ where++ o :: [Maybe Int] -> Maybe Int+ o = inc' . foldr max' (Just 0)++ f :: GTypeFun (Maybe Int)+ f t' = if p t'+ then+ case depthOfType p t' of+ Nothing -> Just 0+ Just (_, x) -> x+ else Nothing++ -- Specific maximum operator+ max' Nothing _ = Nothing+ max' _ Nothing = Nothing+ max' (Just i) (Just i') | i >= i' = Just i+ max' (Just i) (Just i') = Just i'++ -- Specific increment operator+ inc' Nothing = Nothing+ inc' (Just i) = Just (i+1)+++------------------------------------------------------------------------------+--+-- Build a shallow term +--+------------------------------------------------------------------------------++shallowTerm :: (forall a. Data a => Maybe a) -> (forall b. Data b => b)+shallowTerm cust+ = result+ where+ result :: forall b. Data b => b+ -- Need a type signature here to bring 'b' into scope+ result = maybe gdefault id cust+ where++ -- The worker, also used for type disambiguation+ gdefault :: b+ gdefault = case con of+ Just (con, Just _) -> fromConstrB (shallowTerm cust) con+ _ -> error "no shallow term!"++ -- The type to be constructed+ typeVal :: TypeVal b+ typeVal = val2type gdefault++ -- The most shallow constructor if any + con :: Maybe (Constr, Maybe Int)+ con = depthOfType (const True) typeVal++++-- For testing shallowTerm+shallowTermBase :: GenericR Maybe+shallowTermBase = Nothing + `extR` Just (1.23::Float)+ `extR` Just ("foo"::String)++++-- Sample datatypes+data T1 = T1a deriving (Typeable, Data) -- just a constant+data T2 = T2 T1 deriving (Typeable, Data) -- little detour+data T3 = T3a T3 | T3b T2 deriving (Typeable, Data) -- recursive case+data T4 = T4 T3 T3 deriving (Typeable, Data) -- sum matters++++-- Sample type arguments+t0 = typeVal :: TypeVal Int+t1 = typeVal :: TypeVal T1+t2 = typeVal :: TypeVal T2+t3 = typeVal :: TypeVal T3+t4 = typeVal :: TypeVal T4+tCompany = typeVal :: TypeVal Company+tPerson = typeVal :: TypeVal Person+tEmployee = typeVal :: TypeVal Employee+tDept = typeVal :: TypeVal Dept++++-- Test cases+test0 = t1 `reachableType` t1 -- True+test1 = t1 `reachableType` t2 -- True+test2 = t2 `reachableType` t1 -- False+test3 = t1 `reachableType` t3+test4 = tPerson `reachableType` tCompany+test5 = gcountSubtermTypes tPerson+test6 = gcountSubtermTypes tEmployee+test7 = gcountSubtermTypes tDept+test8 = shallowTerm shallowTermBase :: Person+test9 = shallowTerm shallowTermBase :: Employee+test10 = shallowTerm shallowTermBase :: Dept++++tests = ( test0+ , ( test1+ , ( test2+ , ( test3+ , ( test4+ , ( test5+ , ( test6+ , ( test7+ , ( test8+ , ( test9+ , ( test10+ ))))))))))) ~=? output++output = (True,(True,(False,(True,(True,(1,(2,(3,(P "foo" "foo",+ (E (P "foo" "foo") (S 1.23),+ D "foo" (E (P "foo" "foo") (S 1.23)) []))))))))))
tests/Strings.hs view
@@ -1,21 +1,21 @@-{-# OPTIONS -fglasgow-exts #-} - -module Strings (tests) where - -{- - -This test exercices GENERIC read, show, and eq for the company -datatypes which we use a lot. The output of the program should be -"True" which means that "gread" reads what "gshow" shows while the -read term is equal to the original term in terms of "geq". - --} - -import Test.HUnit - -import Data.Generics -import CompanyDatatypes - -tests = (case gread (gshow genCom) of - [(x,_)] -> geq genCom x - _ -> False) ~=? True +{-# OPTIONS -fglasgow-exts #-}++module Strings (tests) where++{-++This test exercices GENERIC read, show, and eq for the company+datatypes which we use a lot. The output of the program should be+"True" which means that "gread" reads what "gshow" shows while the+read term is equal to the original term in terms of "geq".++-}++import Test.HUnit++import Data.Generics+import CompanyDatatypes++tests = (case gread (gshow genCom) of+ [(x,_)] -> geq genCom x+ _ -> False) ~=? True
tests/Tree.hs view
@@ -1,62 +1,62 @@-{-# OPTIONS -fglasgow-exts #-} - -module Tree (tests) where - -{- - -This example illustrates serialisation and de-serialisation, -but we replace *series* by *trees* so to say. - --} - -import Test.HUnit - -import Control.Monad.Reader -import Data.Generics -import Data.Maybe -import Data.Tree -import CompanyDatatypes - - --- Trealise Data to Tree -data2tree :: Data a => a -> Tree String -data2tree = gdefault `extQ` atString - where - atString (x::String) = Node x [] - gdefault x = Node (showConstr (toConstr x)) (gmapQ data2tree x) - - --- De-trealise Tree to Data -tree2data :: Data a => Tree String -> Maybe a -tree2data = gdefault `extR` atString - where - atString (Node x []) = Just x - gdefault (Node x ts) = res - where - - -- a helper for type capture - res = maybe Nothing (kids . fromConstr) con - - -- the type to constructed - ta = fromJust res - - -- construct constructor - con = readConstr (dataTypeOf ta) x - - -- recursion per kid with accumulation - perkid ts = const (tail ts, tree2data (head ts)) - - -- recurse into kids - kids x = - do guard (glength x == length ts) - snd (gmapAccumM perkid ts x) - - --- Main function for testing -tests = ( genCom - , ( data2tree genCom - , ( (tree2data (data2tree genCom)) :: Maybe Company - , ( Just genCom == tree2data (data2tree genCom) - )))) ~=? output - -output = (C [D "Research" (E (P "Laemmel" "Amsterdam") (S 8000.0)) [PU (E (P "Joost" "Amsterdam") (S 1000.0)),PU (E (P "Marlow" "Cambridge") (S 2000.0))],D "Strategy" (E (P "Blair" "London") (S 100000.0)) []],(Node {rootLabel = "C", subForest = [Node {rootLabel = "(:)", subForest = [Node {rootLabel = "D", subForest = [Node {rootLabel = "Research", subForest = []},Node {rootLabel = "E", subForest = [Node {rootLabel = "P", subForest = [Node {rootLabel = "Laemmel", subForest = []},Node {rootLabel = "Amsterdam", subForest = []}]},Node {rootLabel = "S", subForest = [Node {rootLabel = "8000.0", subForest = []}]}]},Node {rootLabel = "(:)", subForest = [Node {rootLabel = "PU", subForest = [Node {rootLabel = "E", subForest = [Node {rootLabel = "P", subForest = [Node {rootLabel = "Joost", subForest = []},Node {rootLabel = "Amsterdam", subForest = []}]},Node {rootLabel = "S", subForest = [Node {rootLabel = "1000.0", subForest = []}]}]}]},Node {rootLabel = "(:)", subForest = [Node {rootLabel = "PU", subForest = [Node {rootLabel = "E", subForest = [Node {rootLabel = "P", subForest = [Node {rootLabel = "Marlow", subForest = []},Node {rootLabel = "Cambridge", subForest = []}]},Node {rootLabel = "S", subForest = [Node {rootLabel = "2000.0", subForest = []}]}]}]},Node {rootLabel = "[]", subForest = []}]}]}]},Node {rootLabel = "(:)", subForest = [Node {rootLabel = "D", subForest = [Node {rootLabel = "Strategy", subForest = []},Node {rootLabel = "E", subForest = [Node {rootLabel = "P", subForest = [Node {rootLabel = "Blair", subForest = []},Node {rootLabel = "London", subForest = []}]},Node {rootLabel = "S", subForest = [Node {rootLabel = "100000.0", subForest = []}]}]},Node {rootLabel = "[]", subForest = []}]},Node {rootLabel = "[]", subForest = []}]}]}]},(Just (C [D "Research" (E (P "Laemmel" "Amsterdam") (S 8000.0)) [PU (E (P "Joost" "Amsterdam") (S 1000.0)),PU (E (P "Marlow" "Cambridge") (S 2000.0))],D "Strategy" (E (P "Blair" "London") (S 100000.0)) []]),True))) +{-# OPTIONS -fglasgow-exts #-}++module Tree (tests) where++{-++This example illustrates serialisation and de-serialisation,+but we replace *series* by *trees* so to say.++-}++import Test.HUnit++import Control.Monad.Reader+import Data.Generics+import Data.Maybe+import Data.Tree+import CompanyDatatypes+++-- Trealise Data to Tree+data2tree :: Data a => a -> Tree String+data2tree = gdefault `extQ` atString+ where+ atString (x::String) = Node x []+ gdefault x = Node (showConstr (toConstr x)) (gmapQ data2tree x)+++-- De-trealise Tree to Data+tree2data :: Data a => Tree String -> Maybe a+tree2data = gdefault `extR` atString+ where+ atString (Node x []) = Just x+ gdefault (Node x ts) = res+ where++ -- a helper for type capture+ res = maybe Nothing (kids . fromConstr) con++ -- the type to constructed+ ta = fromJust res++ -- construct constructor+ con = readConstr (dataTypeOf ta) x++ -- recursion per kid with accumulation+ perkid ts = const (tail ts, tree2data (head ts)) ++ -- recurse into kids+ kids x =+ do guard (glength x == length ts)+ snd (gmapAccumM perkid ts x)+++-- Main function for testing+tests = ( genCom+ , ( data2tree genCom + , ( (tree2data (data2tree genCom)) :: Maybe Company + , ( Just genCom == tree2data (data2tree genCom)+ )))) ~=? output++output = (C [D "Research" (E (P "Laemmel" "Amsterdam") (S 8000.0)) [PU (E (P "Joost" "Amsterdam") (S 1000.0)),PU (E (P "Marlow" "Cambridge") (S 2000.0))],D "Strategy" (E (P "Blair" "London") (S 100000.0)) []],(Node {rootLabel = "C", subForest = [Node {rootLabel = "(:)", subForest = [Node {rootLabel = "D", subForest = [Node {rootLabel = "Research", subForest = []},Node {rootLabel = "E", subForest = [Node {rootLabel = "P", subForest = [Node {rootLabel = "Laemmel", subForest = []},Node {rootLabel = "Amsterdam", subForest = []}]},Node {rootLabel = "S", subForest = [Node {rootLabel = "8000.0", subForest = []}]}]},Node {rootLabel = "(:)", subForest = [Node {rootLabel = "PU", subForest = [Node {rootLabel = "E", subForest = [Node {rootLabel = "P", subForest = [Node {rootLabel = "Joost", subForest = []},Node {rootLabel = "Amsterdam", subForest = []}]},Node {rootLabel = "S", subForest = [Node {rootLabel = "1000.0", subForest = []}]}]}]},Node {rootLabel = "(:)", subForest = [Node {rootLabel = "PU", subForest = [Node {rootLabel = "E", subForest = [Node {rootLabel = "P", subForest = [Node {rootLabel = "Marlow", subForest = []},Node {rootLabel = "Cambridge", subForest = []}]},Node {rootLabel = "S", subForest = [Node {rootLabel = "2000.0", subForest = []}]}]}]},Node {rootLabel = "[]", subForest = []}]}]}]},Node {rootLabel = "(:)", subForest = [Node {rootLabel = "D", subForest = [Node {rootLabel = "Strategy", subForest = []},Node {rootLabel = "E", subForest = [Node {rootLabel = "P", subForest = [Node {rootLabel = "Blair", subForest = []},Node {rootLabel = "London", subForest = []}]},Node {rootLabel = "S", subForest = [Node {rootLabel = "100000.0", subForest = []}]}]},Node {rootLabel = "[]", subForest = []}]},Node {rootLabel = "[]", subForest = []}]}]}]},(Just (C [D "Research" (E (P "Laemmel" "Amsterdam") (S 8000.0)) [PU (E (P "Joost" "Amsterdam") (S 1000.0)),PU (E (P "Marlow" "Cambridge") (S 2000.0))],D "Strategy" (E (P "Blair" "London") (S 100000.0)) []]),True)))
tests/Twin.hs view
@@ -1,90 +1,90 @@-{-# OPTIONS -fglasgow-exts #-} - -module Twin (tests) where - -{- - -For the discussion in the 2nd boilerplate paper, -we favour some simplified development of twin traversal. -So the full general, stepwise story is in Data.Generics.Twin, -but the short version from the paper is turned into a test -case below. - -See the paper for an explanation. - --} - -import Test.HUnit - -import Data.Generics hiding (GQ,gzipWithQ,geq) - -geq' :: GenericQ (GenericQ Bool) -geq' x y = toConstr x == toConstr y - && and (gzipWithQ geq' x y) - -geq :: Data a => a -> a -> Bool -geq = geq' - -newtype GQ r = GQ (GenericQ r) - -gzipWithQ :: GenericQ (GenericQ r) - -> GenericQ (GenericQ [r]) -gzipWithQ f t1 t2 - = gApplyQ (gmapQ (\x -> GQ (f x)) t1) t2 - -gApplyQ :: Data a => [GQ r] -> a -> [r] -gApplyQ qs t = reverse (snd (gfoldlQ k z t)) - where - k :: ([GQ r], [r]) -> GenericQ ([GQ r], [r]) - k (GQ q : qs, rs) child = (qs, q child : rs) - z = (qs, []) - -newtype R r x = R { unR :: r } - -gfoldlQ :: (r -> GenericQ r) - -> r - -> GenericQ r - -gfoldlQ k z t = unR (gfoldl k' z' t) - where - z' _ = R z - k' (R r) c = R (k r c) - ------------------------------------------------------------------------------ - --- A dependently polymorphic geq -geq'' :: Data a => a -> a -> Bool -geq'' x y = toConstr x == toConstr y - && and (gzipWithQ' geq'' x y) - --- A helper type for existentially quantified queries -data XQ r = forall a. Data a => XQ (a -> r) - --- A dependently polymorphic gzipWithQ -gzipWithQ' :: (forall a. Data a => a -> a -> r) - -> (forall a. Data a => a -> a -> [r]) -gzipWithQ' f t1 t2 - = gApplyQ' (gmapQ (\x -> XQ (f x)) t1) t2 - --- Apply existentially quantified queries --- Insist on equal types! --- -gApplyQ' :: Data a => [XQ r] -> a -> [r] -gApplyQ' qs t = reverse (snd (gfoldlQ k z t)) - where - z = (qs, []) - k :: ([XQ r], [r]) -> GenericQ ([XQ r], [r]) - k (XQ q : qs, rs) child = (qs, q' child : rs) - where - q' = error "Twin mismatch" `extQ` q - - ------------------------------------------------------------------------------ - -tests = ( geq [True,True] [True,True] - , geq [True,True] [True,False] - , geq'' [True,True] [True,True] - , geq'' [True,True] [True,False] - ) ~=? output - -output = (True,False,True,False) +{-# OPTIONS -fglasgow-exts #-}+ +module Twin (tests) where++{-++For the discussion in the 2nd boilerplate paper,+we favour some simplified development of twin traversal.+So the full general, stepwise story is in Data.Generics.Twin,+but the short version from the paper is turned into a test+case below. ++See the paper for an explanation.+ +-}++import Test.HUnit++import Data.Generics hiding (GQ,gzipWithQ,geq)++geq' :: GenericQ (GenericQ Bool)+geq' x y = toConstr x == toConstr y+ && and (gzipWithQ geq' x y)++geq :: Data a => a -> a -> Bool+geq = geq'++newtype GQ r = GQ (GenericQ r)++gzipWithQ :: GenericQ (GenericQ r)+ -> GenericQ (GenericQ [r])+gzipWithQ f t1 t2 + = gApplyQ (gmapQ (\x -> GQ (f x)) t1) t2++gApplyQ :: Data a => [GQ r] -> a -> [r]+gApplyQ qs t = reverse (snd (gfoldlQ k z t))+ where+ k :: ([GQ r], [r]) -> GenericQ ([GQ r], [r])+ k (GQ q : qs, rs) child = (qs, q child : rs)+ z = (qs, [])++newtype R r x = R { unR :: r }++gfoldlQ :: (r -> GenericQ r)+ -> r + -> GenericQ r++gfoldlQ k z t = unR (gfoldl k' z' t)+ where+ z' _ = R z+ k' (R r) c = R (k r c)++-----------------------------------------------------------------------------++-- A dependently polymorphic geq+geq'' :: Data a => a -> a -> Bool+geq'' x y = toConstr x == toConstr y+ && and (gzipWithQ' geq'' x y)++-- A helper type for existentially quantified queries+data XQ r = forall a. Data a => XQ (a -> r)++-- A dependently polymorphic gzipWithQ+gzipWithQ' :: (forall a. Data a => a -> a -> r)+ -> (forall a. Data a => a -> a -> [r])+gzipWithQ' f t1 t2+ = gApplyQ' (gmapQ (\x -> XQ (f x)) t1) t2++-- Apply existentially quantified queries+-- Insist on equal types!+--+gApplyQ' :: Data a => [XQ r] -> a -> [r]+gApplyQ' qs t = reverse (snd (gfoldlQ k z t))+ where+ z = (qs, [])+ k :: ([XQ r], [r]) -> GenericQ ([XQ r], [r])+ k (XQ q : qs, rs) child = (qs, q' child : rs)+ where+ q' = error "Twin mismatch" `extQ` q+++-----------------------------------------------------------------------------++tests = ( geq [True,True] [True,True]+ , geq [True,True] [True,False]+ , geq'' [True,True] [True,True]+ , geq'' [True,True] [True,False]+ ) ~=? output++output = (True,False,True,False)
− tests/Typeable.hs
@@ -1,19 +0,0 @@-{-# OPTIONS -fglasgow-exts #-} - -module Typeable (tests) where - -import Test.HUnit - -import Data.Typeable - -newtype Y e = Y { unY :: (e (Y e)) } - -instance Typeable1 e => Typeable (Y e) where - typeOf _ = mkTyConApp yTc [typeOf1 (undefined :: e ())] - -yTc :: TyCon -yTc = mkTyCon "Typeable.Y" - -tests = show (typeOf (undefined :: Y [])) ~=? output - -output = "Typeable.Y []"
tests/Typecase1.hs view
@@ -1,59 +1,59 @@-{-# OPTIONS -fglasgow-exts #-} - -module Typecase1 (tests) where - -{- - -This test demonstrates type case as it lives in Data.Typeable. -We define a function f that converts typeables into strings in some way. -Note: we only need Data.Typeable. Say: Dynamics are NOT involved. - --} - -import Test.HUnit - -import Data.Typeable -import Data.Maybe - --- Some datatype. -data MyTypeable = MyCons String deriving (Show, Typeable) - --- --- Some function that performs type case. --- -f :: (Show a, Typeable a) => a -> String -f a = (maybe (maybe (maybe others - mytys (cast a) ) - float (cast a) ) - int (cast a) ) - - where - - -- do something with ints - int :: Int -> String - int a = "got an int, incremented: " ++ show (a + 1) - - -- do something with floats - float :: Float -> String - float a = "got a float, multiplied by .42: " ++ show (a * 0.42) - - -- do something with my typeables - mytys :: MyTypeable -> String - mytys a = "got a term: " ++ show a - - -- do something with all other typeables - others = "got something else: " ++ show a - - --- --- Test the type case --- -tests = ( f (41::Int) - , f (88::Float) - , f (MyCons "42") - , f True) ~=? output - -output = ( "got an int, incremented: 42" - , "got a float, multiplied by .42: 36.96" - , "got a term: MyCons \"42\"" +{-# OPTIONS -fglasgow-exts #-}++module Typecase1 (tests) where++{-++This test demonstrates type case as it lives in Data.Typeable.+We define a function f that converts typeables into strings in some way.+Note: we only need Data.Typeable. Say: Dynamics are NOT involved.++-}++import Test.HUnit++import Data.Typeable+import Data.Maybe++-- Some datatype.+data MyTypeable = MyCons String deriving (Show, Typeable)++--+-- Some function that performs type case.+--+f :: (Show a, Typeable a) => a -> String+f a = (maybe (maybe (maybe others + mytys (cast a) )+ float (cast a) )+ int (cast a) )++ where++ -- do something with ints+ int :: Int -> String+ int a = "got an int, incremented: " ++ show (a + 1)+ + -- do something with floats+ float :: Float -> String+ float a = "got a float, multiplied by .42: " ++ show (a * 0.42)++ -- do something with my typeables+ mytys :: MyTypeable -> String+ mytys a = "got a term: " ++ show a++ -- do something with all other typeables+ others = "got something else: " ++ show a+++--+-- Test the type case+--+tests = ( f (41::Int)+ , f (88::Float)+ , f (MyCons "42")+ , f True) ~=? output++output = ( "got an int, incremented: 42"+ , "got a float, multiplied by .42: 36.96"+ , "got a term: MyCons \"42\"" , "got something else: True")
tests/Typecase2.hs view
@@ -1,61 +1,61 @@-{-# OPTIONS -fglasgow-exts #-} - -module Typecase2 (tests) where - -{- - -This test provides a variation on typecase1.hs. -This time, we use generic show as defined for all instances of Data. -Thereby, we get rid of the Show constraint in our functions. -So we only keep a single constraint: the one for class Data. - --} - -import Test.HUnit - -import Data.Generics -import Data.Maybe - --- Some datatype. -data MyData = MyCons String deriving (Typeable, Data) - --- --- Some function that performs type case. --- -f :: Data a => a -> String -f a = (maybe (maybe (maybe others - mytys (cast a) ) - float (cast a) ) - int (cast a) ) - - where - - -- do something with ints - int :: Int -> String - int a = "got an int, incremented: " ++ show (a + 1) - - -- do something with floats - float :: Float -> String - float a = "got a float, multiplied by .42: " ++ show (a * 0.42) - - -- do something with my data - mytys :: MyData -> String - mytys a = "got my data: " ++ gshow a - - -- do something with all other data - others = "got something else: " ++ gshow a - - --- --- Test the type case --- -tests = ( f (41::Int) - , f (88::Float) - , f (MyCons "42") - , f True) ~=? output - -output = ( "got an int, incremented: 42" - , "got a float, multiplied by .42: 36.96" - , "got my data: (MyCons \"42\")" - , "got something else: (True)") - +{-# OPTIONS -fglasgow-exts #-}++module Typecase2 (tests) where++{-++This test provides a variation on typecase1.hs.+This time, we use generic show as defined for all instances of Data.+Thereby, we get rid of the Show constraint in our functions.+So we only keep a single constraint: the one for class Data.++-}++import Test.HUnit++import Data.Generics+import Data.Maybe++-- Some datatype.+data MyData = MyCons String deriving (Typeable, Data)++--+-- Some function that performs type case.+--+f :: Data a => a -> String+f a = (maybe (maybe (maybe others + mytys (cast a) )+ float (cast a) )+ int (cast a) )++ where++ -- do something with ints+ int :: Int -> String+ int a = "got an int, incremented: " ++ show (a + 1)+ + -- do something with floats+ float :: Float -> String+ float a = "got a float, multiplied by .42: " ++ show (a * 0.42)++ -- do something with my data+ mytys :: MyData -> String+ mytys a = "got my data: " ++ gshow a++ -- do something with all other data+ others = "got something else: " ++ gshow a+++--+-- Test the type case+--+tests = ( f (41::Int)+ , f (88::Float)+ , f (MyCons "42")+ , f True) ~=? output++output = ( "got an int, incremented: 42"+ , "got a float, multiplied by .42: 36.96"+ , "got my data: (MyCons \"42\")"+ , "got something else: (True)")+
tests/Where.hs view
@@ -1,125 +1,125 @@-{-# OPTIONS -fglasgow-exts #-} - -module Where (tests) where - -{- - -This example illustrates some differences between certain traversal -schemes. To this end, we use a simple system of datatypes, and the -running example shall be to replace "T1a 42" by "T1a 88". It is our -intention to illustrate a few dimensions of designing traversals. - -1. We can decide on whether we prefer "rewrite steps" (i.e., -monomorphic functions on data) that succeed either for all input -patterns or only if the encounter a term pattern to be replaced. In -the first case, the catch-all equation of such a function describes -identity (see "stepid" below). In the second case, the catch-call -equation describes failure using the Maybe type constructor (see -"stepfail" below). As an intermediate assessment, the failure approach -is more general because it allows one to observe if a rewrite step was -meaningful or not. Often the identity approach is more convenient and -sufficient. - -2. We can now also decide on whether we want monadic or simple -traversals; recall monadic generic functions GenericM from -Data.Generics. The monad can serve for success/failure, state, -environment and others. One can now subdivide monadic traversal -schemes with respect to the question whether they simply support -monadic style of whether they even interact with the relevant -monad. The scheme "everywereM" from the library belongs to the first -category while "somewhere" belongs to the second category as it uses -the operation "mplus" of a monad with addition. So while "everywhereM" -makes very well sense without a monad --- as demonstrated by -"everywhere", the scheme "somewhere" is immediately monadic. - -3. We can now also decide on whether we want rewrite steps to succeed -for all possible subterms, at least for one subterm, exactly for one -subterm, and others. The various traversal schemes make different -assumptions in this respect. - -a) everywhere - - By its type, succeeds and requires non-failing rewrite steps. - However, we do not get any feedback on whether terms were actually - rewritten. (Say, we might have performed accidentally the identity - function on all nodes.) - -b) everywhereM - - Attempts to reach all nodes where all the sub-traversals are performed - in monadic bind-sequence. Failure of the traversal for a given subterm - implies failure of the entire traversal. Hence, the argument of - "everywhereM" should be designed in a way that it tends to succeed - except for the purpose of propagating a proper error in the sense of - violating a pre-/post-condition. For example, "mkM stepfail" should - not be passed to "everywhereM" as it will fail for all but one term - pattern; see "recovered" for a way to massage "stepfail" accordingly. - -c) somewhere - - Descends into term in a top-down manner, and stops in a given - branch when the argument succeeds for the subterm at hand. To this - end, it takes an argument that is perfectly intended to fail for - certain term patterns. Thanks to the employment of gmapF, the - traversal scheme recovers from failure when mapping over the immediate - subterms while insisting success for at least one subterm (say, branch). - This scheme is appropriate if you want to make sure that a given - rewrite step was actually used in a traversal. So failure of the - traversal would mean that the argument failed for all subterms. - -Contributed by Ralf Laemmel, ralf@cwi.nl - --} - -import Test.HUnit - -import Data.Generics -import Control.Monad - - --- Two mutually recursive datatypes -data T1 = T1a Int | T1b T2 deriving (Typeable, Data) -data T2 = T2 T1 deriving (Typeable, Data) - - --- A rewrite step with identity as catch-all case -stepid (T1a 42) = T1a 88 -stepid x = x - - --- The same rewrite step but now with failure as catch-all case -stepfail (T1a 42) = Just (T1a 88) -stepfail _ = Nothing - - --- We can let recover potentially failing generic functions from failure; --- this is illustrated for a generic made from stepfail via mkM. -recovered x = mkM stepfail x `mplus` Just x - - --- A test term that comprehends a redex -term42 = T1b (T2 (T1a 42)) - - --- A test term that does not comprehend a redex -term37 = T1b (T2 (T1a 37)) - - --- A number of traversals -result1 = everywhere (mkT stepid) term42 -- rewrites term accordingly -result2 = everywhere (mkT stepid) term37 -- preserves term without notice -result3 = everywhereM (mkM stepfail) term42 -- fails in a harsh manner -result4 = everywhereM (mkM stepfail) term37 -- fails rather early -result5 = everywhereM recovered term37 -- preserves term without notice -result6 = somewhere (mkMp stepfail) term42 -- rewrites term accordingly -result7 = somewhere (mkMp stepfail) term37 -- fails to notice lack of redex - -tests = gshow ( result1, - ( result2, - ( result3, - ( result4, - ( result5, - ( result6, - ( result7 ))))))) ~=? output - -output = "((,) (T1b (T2 (T1a (88)))) ((,) (T1b (T2 (T1a (37)))) ((,) (Nothing) ((,) (Nothing) ((,) (Just (T1b (T2 (T1a (37))))) ((,) (Just (T1b (T2 (T1a (88))))) (Nothing)))))))" +{-# OPTIONS -fglasgow-exts #-}++module Where (tests) where++{-++This example illustrates some differences between certain traversal+schemes. To this end, we use a simple system of datatypes, and the+running example shall be to replace "T1a 42" by "T1a 88". It is our+intention to illustrate a few dimensions of designing traversals.++1. We can decide on whether we prefer "rewrite steps" (i.e.,+monomorphic functions on data) that succeed either for all input+patterns or only if the encounter a term pattern to be replaced. In+the first case, the catch-all equation of such a function describes+identity (see "stepid" below). In the second case, the catch-call+equation describes failure using the Maybe type constructor (see+"stepfail" below). As an intermediate assessment, the failure approach+is more general because it allows one to observe if a rewrite step was+meaningful or not. Often the identity approach is more convenient and+sufficient.++2. We can now also decide on whether we want monadic or simple+traversals; recall monadic generic functions GenericM from+Data.Generics. The monad can serve for success/failure, state,+environment and others. One can now subdivide monadic traversal+schemes with respect to the question whether they simply support+monadic style of whether they even interact with the relevant+monad. The scheme "everywereM" from the library belongs to the first+category while "somewhere" belongs to the second category as it uses+the operation "mplus" of a monad with addition. So while "everywhereM"+makes very well sense without a monad --- as demonstrated by+"everywhere", the scheme "somewhere" is immediately monadic.++3. We can now also decide on whether we want rewrite steps to succeed+for all possible subterms, at least for one subterm, exactly for one+subterm, and others. The various traversal schemes make different+assumptions in this respect.++a) everywhere++ By its type, succeeds and requires non-failing rewrite steps.+ However, we do not get any feedback on whether terms were actually+ rewritten. (Say, we might have performed accidentally the identity+ function on all nodes.)++b) everywhereM++ Attempts to reach all nodes where all the sub-traversals are performed+ in monadic bind-sequence. Failure of the traversal for a given subterm+ implies failure of the entire traversal. Hence, the argument of + "everywhereM" should be designed in a way that it tends to succeed+ except for the purpose of propagating a proper error in the sense of+ violating a pre-/post-condition. For example, "mkM stepfail" should+ not be passed to "everywhereM" as it will fail for all but one term + pattern; see "recovered" for a way to massage "stepfail" accordingly.++c) somewhere++ Descends into term in a top-down manner, and stops in a given+ branch when the argument succeeds for the subterm at hand. To this+ end, it takes an argument that is perfectly intended to fail for+ certain term patterns. Thanks to the employment of gmapF, the+ traversal scheme recovers from failure when mapping over the immediate+ subterms while insisting success for at least one subterm (say, branch).+ This scheme is appropriate if you want to make sure that a given+ rewrite step was actually used in a traversal. So failure of the+ traversal would mean that the argument failed for all subterms.++Contributed by Ralf Laemmel, ralf@cwi.nl++-}++import Test.HUnit++import Data.Generics+import Control.Monad+++-- Two mutually recursive datatypes+data T1 = T1a Int | T1b T2 deriving (Typeable, Data)+data T2 = T2 T1 deriving (Typeable, Data)+++-- A rewrite step with identity as catch-all case+stepid (T1a 42) = T1a 88+stepid x = x+++-- The same rewrite step but now with failure as catch-all case+stepfail (T1a 42) = Just (T1a 88)+stepfail _ = Nothing+++-- We can let recover potentially failing generic functions from failure;+-- this is illustrated for a generic made from stepfail via mkM.+recovered x = mkM stepfail x `mplus` Just x+++-- A test term that comprehends a redex+term42 = T1b (T2 (T1a 42))+++-- A test term that does not comprehend a redex+term37 = T1b (T2 (T1a 37))+++-- A number of traversals+result1 = everywhere (mkT stepid) term42 -- rewrites term accordingly+result2 = everywhere (mkT stepid) term37 -- preserves term without notice+result3 = everywhereM (mkM stepfail) term42 -- fails in a harsh manner+result4 = everywhereM (mkM stepfail) term37 -- fails rather early+result5 = everywhereM recovered term37 -- preserves term without notice+result6 = somewhere (mkMp stepfail) term42 -- rewrites term accordingly+result7 = somewhere (mkMp stepfail) term37 -- fails to notice lack of redex++tests = gshow ( result1,+ ( result2,+ ( result3,+ ( result4,+ ( result5,+ ( result6,+ ( result7 ))))))) ~=? output++output = "((,) (T1b (T2 (T1a (88)))) ((,) (T1b (T2 (T1a (37)))) ((,) (Nothing) ((,) (Nothing) ((,) (Just (T1b (T2 (T1a (37))))) ((,) (Just (T1b (T2 (T1a (88))))) (Nothing)))))))"
tests/XML.hs view
@@ -1,195 +1,195 @@-{-# OPTIONS -fglasgow-exts #-} - -module XML (tests) where - -{- - -This example illustrates XMLish services -to trealise (say, "serialise") heterogenous -Haskell data as homogeneous tree structures -(say, XMLish elements) and vice versa. - --} - -import Test.HUnit - -import Control.Monad -import Data.Maybe -import Data.Generics -import CompanyDatatypes - - --- HaXml-like types for XML elements -data Element = Elem Name [Attribute] [Content] - deriving (Show, Eq, Typeable, Data) - -data Content = CElem Element - | CString Bool CharData - -- ^ bool is whether whitespace is significant - | CRef Reference - | CMisc Misc - deriving (Show, Eq, Typeable, Data) - -type CharData = String - - --- In this simple example we disable some parts of XML -type Attribute = () -type Reference = () -type Misc = () - - --- Trealisation -data2content :: Data a => a -> [Content] -data2content = element - `ext1Q` list - `extQ` string - `extQ` float - - where - - -- Handle an element - element x = [CElem (Elem (tyconUQname (dataTypeName (dataTypeOf x))) - [] -- no attributes - (concat (gmapQ data2content x)))] - - -- A special case for lists - list :: Data a => [a] -> [Content] - list = concat . map data2content - - -- A special case for strings - string :: String -> [Content] - string x = [CString True x] - - -- A special case for floats - float :: Float -> [Content] - float x = [CString True (show x)] - - --- De-trealisation -content2data :: forall a. Data a => ReadX a -content2data = result - - where - - -- Case-discriminating worker - result = element - `ext1R` list - `extR` string - `extR` float - - - -- Determine type of data to be constructed - myType = myTypeOf result - where - myTypeOf :: forall a. ReadX a -> a - myTypeOf = undefined - - -- Handle an element - element = do c <- readX - case c of - (CElem (Elem x as cs)) - | as == [] -- no attributes - && x == (tyconUQname (dataTypeName (dataTypeOf myType))) - -> alts cs - _ -> mzero - - - -- A special case for lists - list :: forall a. Data a => ReadX [a] - list = ( do h <- content2data - t <- list - return (h:t) ) - `mplus` return [] - - -- Fold over all alternatives, say constructors - alts cs = foldr (mplus . recurse cs) mzero shapes - - -- Possible top-level shapes - shapes = map fromConstr consOf - - -- Retrieve all constructors of the requested type - consOf = dataTypeConstrs - $ dataTypeOf - $ myType - - -- Recurse into subterms - recurse cs x = maybe mzero - return - (runReadX (gmapM (const content2data) x) cs) - - -- A special case for strings - string :: ReadX String - string = do c <- readX - case c of - (CString _ x) -> return x - _ -> mzero - - -- A special case for floats - float :: ReadX Float - float = do c <- readX - case c of - (CString _ x) -> return (read x) - _ -> mzero - - - ------------------------------------------------------------------------------ --- --- An XML-hungry parser-like monad --- ------------------------------------------------------------------------------ - --- Type constructor -newtype ReadX a = - ReadX { unReadX :: [Content] - -> Maybe ([Content], a) } - --- Run a computation -runReadX x y = case unReadX x y of - Just ([],y) -> Just y - _ -> Nothing - --- Read one content particle -readX :: ReadX Content -readX = ReadX (\x -> if null x - then Nothing - else Just (tail x, head x) - ) - --- ReadX is a monad! -instance Monad ReadX where - return x = ReadX (\y -> Just (y,x)) - c >>= f = ReadX (\x -> case unReadX c x of - Nothing -> Nothing - Just (x', a) -> unReadX (f a) x' - ) - --- ReadX also accommodates mzero and mplus! -instance MonadPlus ReadX where - mzero = ReadX (const Nothing) - f `mplus` g = ReadX (\x -> case unReadX f x of - Nothing -> unReadX g x - y -> y - ) - - - ------------------------------------------------------------------------------ --- --- Main function for testing --- ------------------------------------------------------------------------------ - -tests = ( genCom - , ( data2content genCom - , ( zigzag person1 :: Maybe Person - , ( zigzag genCom :: Maybe Company - , ( zigzag genCom == Just genCom - ))))) ~=? output - where - -- Trealise back and forth - zigzag :: Data a => a -> Maybe a - zigzag = runReadX content2data . data2content - -output = (C [D "Research" (E (P "Laemmel" "Amsterdam") (S 8000.0)) [PU (E (P "Joost" "Amsterdam") (S 1000.0)),PU (E (P "Marlow" "Cambridge") (S 2000.0))],D "Strategy" (E (P "Blair" "London") (S 100000.0)) []],([CElem (Elem "Company" [] [CElem (Elem "Dept" [] [CString True "Research",CElem (Elem "Employee" [] [CElem (Elem "Person" [] [CString True "Laemmel",CString True "Amsterdam"]),CElem (Elem "Salary" [] [CString True "8000.0"])]),CElem (Elem "Unit" [] [CElem (Elem "Employee" [] [CElem (Elem "Person" [] [CString True "Joost",CString True "Amsterdam"]),CElem (Elem "Salary" [] [CString True "1000.0"])])]),CElem (Elem "Unit" [] [CElem (Elem "Employee" [] [CElem (Elem "Person" [] [CString True "Marlow",CString True "Cambridge"]),CElem (Elem "Salary" [] [CString True "2000.0"])])])]),CElem (Elem "Dept" [] [CString True "Strategy",CElem (Elem "Employee" [] [CElem (Elem "Person" [] [CString True "Blair",CString True "London"]),CElem (Elem "Salary" [] [CString True "100000.0"])])])])],(Just (P "Lazy" "Home"),(Just (C [D "Research" (E (P "Laemmel" "Amsterdam") (S 8000.0)) [PU (E (P "Joost" "Amsterdam") (S 1000.0)),PU (E (P "Marlow" "Cambridge") (S 2000.0))],D "Strategy" (E (P "Blair" "London") (S 100000.0)) []]),True)))) +{-# OPTIONS -fglasgow-exts #-}++module XML (tests) where++{-++This example illustrates XMLish services+to trealise (say, "serialise") heterogenous+Haskell data as homogeneous tree structures+(say, XMLish elements) and vice versa.++-}++import Test.HUnit++import Control.Monad+import Data.Maybe+import Data.Generics+import CompanyDatatypes+++-- HaXml-like types for XML elements+data Element = Elem Name [Attribute] [Content]+ deriving (Show, Eq, Typeable, Data)++data Content = CElem Element+ | CString Bool CharData+ -- ^ bool is whether whitespace is significant+ | CRef Reference+ | CMisc Misc+ deriving (Show, Eq, Typeable, Data)++type CharData = String+++-- In this simple example we disable some parts of XML+type Attribute = ()+type Reference = ()+type Misc = ()+++-- Trealisation+data2content :: Data a => a -> [Content]+data2content = element+ `ext1Q` list+ `extQ` string + `extQ` float++ where++ -- Handle an element+ element x = [CElem (Elem (tyconUQname (dataTypeName (dataTypeOf x)))+ [] -- no attributes + (concat (gmapQ data2content x)))]++ -- A special case for lists+ list :: Data a => [a] -> [Content]+ list = concat . map data2content++ -- A special case for strings+ string :: String -> [Content]+ string x = [CString True x]++ -- A special case for floats+ float :: Float -> [Content]+ float x = [CString True (show x)]+++-- De-trealisation+content2data :: forall a. Data a => ReadX a+content2data = result++ where+ + -- Case-discriminating worker+ result = element+ `ext1R` list+ `extR` string+ `extR` float+++ -- Determine type of data to be constructed+ myType = myTypeOf result+ where+ myTypeOf :: forall a. ReadX a -> a+ myTypeOf = undefined++ -- Handle an element+ element = do c <- readX+ case c of+ (CElem (Elem x as cs))+ | as == [] -- no attributes+ && x == (tyconUQname (dataTypeName (dataTypeOf myType)))+ -> alts cs+ _ -> mzero+++ -- A special case for lists+ list :: forall a. Data a => ReadX [a]+ list = ( do h <- content2data+ t <- list+ return (h:t) )+ `mplus` return []++ -- Fold over all alternatives, say constructors+ alts cs = foldr (mplus . recurse cs) mzero shapes++ -- Possible top-level shapes+ shapes = map fromConstr consOf++ -- Retrieve all constructors of the requested type+ consOf = dataTypeConstrs+ $ dataTypeOf + $ myType++ -- Recurse into subterms+ recurse cs x = maybe mzero+ return+ (runReadX (gmapM (const content2data) x) cs)++ -- A special case for strings+ string :: ReadX String+ string = do c <- readX+ case c of+ (CString _ x) -> return x+ _ -> mzero++ -- A special case for floats+ float :: ReadX Float+ float = do c <- readX+ case c of+ (CString _ x) -> return (read x)+ _ -> mzero++++-----------------------------------------------------------------------------+--+-- An XML-hungry parser-like monad+--+-----------------------------------------------------------------------------++-- Type constructor+newtype ReadX a =+ ReadX { unReadX :: [Content]+ -> Maybe ([Content], a) }++-- Run a computation+runReadX x y = case unReadX x y of + Just ([],y) -> Just y+ _ -> Nothing++-- Read one content particle+readX :: ReadX Content+readX = ReadX (\x -> if null x + then Nothing+ else Just (tail x, head x)+ )++-- ReadX is a monad!+instance Monad ReadX where+ return x = ReadX (\y -> Just (y,x))+ c >>= f = ReadX (\x -> case unReadX c x of+ Nothing -> Nothing+ Just (x', a) -> unReadX (f a) x'+ )++-- ReadX also accommodates mzero and mplus!+instance MonadPlus ReadX where+ mzero = ReadX (const Nothing)+ f `mplus` g = ReadX (\x -> case unReadX f x of+ Nothing -> unReadX g x+ y -> y+ )++++-----------------------------------------------------------------------------+--+-- Main function for testing+--+-----------------------------------------------------------------------------++tests = ( genCom+ , ( data2content genCom+ , ( zigzag person1 :: Maybe Person+ , ( zigzag genCom :: Maybe Company+ , ( zigzag genCom == Just genCom+ ))))) ~=? output+ where + -- Trealise back and forth+ zigzag :: Data a => a -> Maybe a+ zigzag = runReadX content2data . data2content++output = (C [D "Research" (E (P "Laemmel" "Amsterdam") (S 8000.0)) [PU (E (P "Joost" "Amsterdam") (S 1000.0)),PU (E (P "Marlow" "Cambridge") (S 2000.0))],D "Strategy" (E (P "Blair" "London") (S 100000.0)) []],([CElem (Elem "Company" [] [CElem (Elem "Dept" [] [CString True "Research",CElem (Elem "Employee" [] [CElem (Elem "Person" [] [CString True "Laemmel",CString True "Amsterdam"]),CElem (Elem "Salary" [] [CString True "8000.0"])]),CElem (Elem "Unit" [] [CElem (Elem "Employee" [] [CElem (Elem "Person" [] [CString True "Joost",CString True "Amsterdam"]),CElem (Elem "Salary" [] [CString True "1000.0"])])]),CElem (Elem "Unit" [] [CElem (Elem "Employee" [] [CElem (Elem "Person" [] [CString True "Marlow",CString True "Cambridge"]),CElem (Elem "Salary" [] [CString True "2000.0"])])])]),CElem (Elem "Dept" [] [CString True "Strategy",CElem (Elem "Employee" [] [CElem (Elem "Person" [] [CString True "Blair",CString True "London"]),CElem (Elem "Salary" [] [CString True "100000.0"])])])])],(Just (P "Lazy" "Home"),(Just (C [D "Research" (E (P "Laemmel" "Amsterdam") (S 8000.0)) [PU (E (P "Joost" "Amsterdam") (S 1000.0)),PU (E (P "Marlow" "Cambridge") (S 2000.0))],D "Strategy" (E (P "Blair" "London") (S 100000.0)) []]),True))))
− tests/out.hs
@@ -1,8506 +0,0 @@-[1 of 1] Compiling CompanyDatatypes ( CompanyDatatypes.hs, CompanyDatatypes.o ) - -==================== Tidy Core ==================== -Result size of Tidy Core - = {terms: 4,139, types: 6,499, coercions: 296} - -a_r3dn :: [GHC.Types.Char] -[GblId, Str=DmdType] -a_r3dn = GHC.CString.unpackCString# "CompanyDatatypes.Company" - -CompanyDatatypes.$fDataCompany3 :: GHC.Types.Char -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.$fDataCompany3 = GHC.Types.C# 'C' - -CompanyDatatypes.$fDataCompany_w1 :: GHC.Base.String -[GblId, - Caf=NoCafRefs, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.$fDataCompany_w1 = - GHC.Types.: - @ GHC.Types.Char - CompanyDatatypes.$fDataCompany3 - (GHC.Types.[] @ GHC.Types.Char) - -lvl_r3do - :: Data.Data.Constr - -> GHC.Types.Int -> GHC.Types.Int -> GHC.Types.Int -[GblId, Arity=3, Caf=NoCafRefs] -lvl_r3do = - \ (x_a17I :: Data.Data.Constr) - (y_a17J :: GHC.Types.Int) - (r_a17K :: GHC.Types.Int) -> - case x_a17I - of _ - { Data.Data.Constr ds2_a17P ds3_a17Q ds4_a17R ds5_a17S ds6_a17T -> - case GHC.Base.eqString ds3_a17Q CompanyDatatypes.$fDataCompany_w1 - of _ { - GHC.Types.False -> r_a17K; - GHC.Types.True -> y_a17J - } - } - -Rec { -CompanyDatatypes.$fDataCompany4 :: Data.Data.ConstrRep -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.$fDataCompany4 = - Data.Data.AlgConstr CompanyDatatypes.$fDataCompany5 - -CompanyDatatypes.$cC :: Data.Data.Constr -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 60}] -CompanyDatatypes.$cC = - Data.Data.Constr - CompanyDatatypes.$fDataCompany4 - CompanyDatatypes.$fDataCompany_w1 - (GHC.Types.[] @ GHC.Base.String) - Data.Data.Prefix - CompanyDatatypes.$tCompany - -a1_r3dp :: [Data.Data.Constr] -[GblId, Str=DmdType] -a1_r3dp = - GHC.Types.: - @ Data.Data.Constr - CompanyDatatypes.$cC - (GHC.Types.[] @ Data.Data.Constr) - -a2_r3dq :: Data.Data.DataRep -[GblId, Str=DmdType] -a2_r3dq = Data.Data.AlgRep a1_r3dp - -CompanyDatatypes.$tCompany [Occ=LoopBreaker] :: Data.Data.DataType -[GblId, Str=DmdType m] -CompanyDatatypes.$tCompany = Data.Data.DataType a_r3dn a2_r3dq - -CompanyDatatypes.$fDataCompany5 [Occ=LoopBreaker] :: GHC.Types.Int -[GblId, Str=DmdType] -CompanyDatatypes.$fDataCompany5 = - GHC.List.foldr2 - @ Data.Data.Constr - @ GHC.Types.Int - @ GHC.Types.Int - lvl_r3do - (GHC.List.badHead @ GHC.Types.Int) - a1_r3dp - Data.Data.mkConstr1 -end Rec } - -a3_r3dr :: [GHC.Types.Char] -[GblId, Str=DmdType] -a3_r3dr = GHC.CString.unpackCString# "CompanyDatatypes.Dept" - -CompanyDatatypes.$fDataDept2 :: GHC.Types.Char -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.$fDataDept2 = GHC.Types.C# 'D' - -CompanyDatatypes.$fDataDept_w1 :: GHC.Base.String -[GblId, - Caf=NoCafRefs, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.$fDataDept_w1 = - GHC.Types.: - @ GHC.Types.Char - CompanyDatatypes.$fDataDept2 - (GHC.Types.[] @ GHC.Types.Char) - -lvl1_r3ds - :: Data.Data.Constr - -> GHC.Types.Int -> GHC.Types.Int -> GHC.Types.Int -[GblId, Arity=3, Caf=NoCafRefs] -lvl1_r3ds = - \ (x_a17I :: Data.Data.Constr) - (y_a17J :: GHC.Types.Int) - (r_a17K :: GHC.Types.Int) -> - case x_a17I - of _ - { Data.Data.Constr ds2_a17P ds3_a17Q ds4_a17R ds5_a17S ds6_a17T -> - case GHC.Base.eqString ds3_a17Q CompanyDatatypes.$fDataDept_w1 - of _ { - GHC.Types.False -> r_a17K; - GHC.Types.True -> y_a17J - } - } - -Rec { -CompanyDatatypes.$fDataDept3 :: Data.Data.ConstrRep -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.$fDataDept3 = - Data.Data.AlgConstr CompanyDatatypes.$fDataDept4 - -CompanyDatatypes.$cD :: Data.Data.Constr -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 60}] -CompanyDatatypes.$cD = - Data.Data.Constr - CompanyDatatypes.$fDataDept3 - CompanyDatatypes.$fDataDept_w1 - (GHC.Types.[] @ GHC.Base.String) - Data.Data.Prefix - CompanyDatatypes.$tDept - -a4_r3dt :: [Data.Data.Constr] -[GblId, Str=DmdType] -a4_r3dt = - GHC.Types.: - @ Data.Data.Constr - CompanyDatatypes.$cD - (GHC.Types.[] @ Data.Data.Constr) - -a5_r3du :: Data.Data.DataRep -[GblId, Str=DmdType] -a5_r3du = Data.Data.AlgRep a4_r3dt - -CompanyDatatypes.$tDept [Occ=LoopBreaker] :: Data.Data.DataType -[GblId, Str=DmdType m] -CompanyDatatypes.$tDept = Data.Data.DataType a3_r3dr a5_r3du - -CompanyDatatypes.$fDataDept4 [Occ=LoopBreaker] :: GHC.Types.Int -[GblId, Str=DmdType] -CompanyDatatypes.$fDataDept4 = - GHC.List.foldr2 - @ Data.Data.Constr - @ GHC.Types.Int - @ GHC.Types.Int - lvl1_r3ds - (GHC.List.badHead @ GHC.Types.Int) - a4_r3dt - Data.Data.mkConstr1 -end Rec } - -a6_r3dv :: [GHC.Types.Char] -[GblId, Str=DmdType] -a6_r3dv = GHC.CString.unpackCString# "CompanyDatatypes.Unit" - -w1_r3dw :: GHC.Base.String -[GblId, Str=DmdType] -w1_r3dw = GHC.CString.unpackCString# "PU" - -w2_r3dx :: GHC.Base.String -[GblId, Str=DmdType] -w2_r3dx = GHC.CString.unpackCString# "DU" - -lvl2_r3dy - :: Data.Data.Constr - -> GHC.Types.Int -> GHC.Types.Int -> GHC.Types.Int -[GblId, Arity=3] -lvl2_r3dy = - \ (x_a17I :: Data.Data.Constr) - (y_a17J :: GHC.Types.Int) - (r_a17K :: GHC.Types.Int) -> - case x_a17I - of _ - { Data.Data.Constr ds2_a17P ds3_a17Q ds4_a17R ds5_a17S ds6_a17T -> - case GHC.Base.eqString ds3_a17Q w2_r3dx of _ { - GHC.Types.False -> r_a17K; - GHC.Types.True -> y_a17J - } - } - -lvl3_r3dz - :: Data.Data.Constr - -> GHC.Types.Int -> GHC.Types.Int -> GHC.Types.Int -[GblId, Arity=3] -lvl3_r3dz = - \ (x_a17I :: Data.Data.Constr) - (y_a17J :: GHC.Types.Int) - (r_a17K :: GHC.Types.Int) -> - case x_a17I - of _ - { Data.Data.Constr ds2_a17P ds3_a17Q ds4_a17R ds5_a17S ds6_a17T -> - case GHC.Base.eqString ds3_a17Q w1_r3dw of _ { - GHC.Types.False -> r_a17K; - GHC.Types.True -> y_a17J - } - } - -Rec { -a7_r3dA :: Data.Data.ConstrRep -[GblId, Str=DmdType] -a7_r3dA = Data.Data.AlgConstr a12_r3dG - -a8_r3dB :: Data.Data.ConstrRep -[GblId, Str=DmdType] -a8_r3dB = Data.Data.AlgConstr a11_r3dF - -CompanyDatatypes.$cDU [Occ=LoopBreaker] :: Data.Data.Constr -[GblId, Str=DmdType m] -CompanyDatatypes.$cDU = - Data.Data.Constr - a8_r3dB - w2_r3dx - (GHC.Types.[] @ GHC.Base.String) - Data.Data.Prefix - CompanyDatatypes.$tUnit - -lvl4_r3dC :: [Data.Data.Constr] -[GblId, Str=DmdType] -lvl4_r3dC = - GHC.Types.: - @ Data.Data.Constr - CompanyDatatypes.$cDU - (GHC.Types.[] @ Data.Data.Constr) - -CompanyDatatypes.$cPU [Occ=LoopBreaker] :: Data.Data.Constr -[GblId, Str=DmdType m] -CompanyDatatypes.$cPU = - Data.Data.Constr - a7_r3dA - w1_r3dw - (GHC.Types.[] @ GHC.Base.String) - Data.Data.Prefix - CompanyDatatypes.$tUnit - -a9_r3dD :: [Data.Data.Constr] -[GblId, Str=DmdType] -a9_r3dD = - GHC.Types.: @ Data.Data.Constr CompanyDatatypes.$cPU lvl4_r3dC - -a10_r3dE :: Data.Data.DataRep -[GblId, Str=DmdType] -a10_r3dE = Data.Data.AlgRep a9_r3dD - -CompanyDatatypes.$tUnit [Occ=LoopBreaker] :: Data.Data.DataType -[GblId, Str=DmdType m] -CompanyDatatypes.$tUnit = Data.Data.DataType a6_r3dv a10_r3dE - -a11_r3dF :: GHC.Types.Int -[GblId, Str=DmdType] -a11_r3dF = - GHC.List.foldr2 - @ Data.Data.Constr - @ GHC.Types.Int - @ GHC.Types.Int - lvl2_r3dy - (GHC.List.badHead @ GHC.Types.Int) - a9_r3dD - Data.Data.mkConstr1 - -a12_r3dG :: GHC.Types.Int -[GblId, Str=DmdType] -a12_r3dG = - GHC.List.foldr2 - @ Data.Data.Constr - @ GHC.Types.Int - @ GHC.Types.Int - lvl3_r3dz - (GHC.List.badHead @ GHC.Types.Int) - a9_r3dD - Data.Data.mkConstr1 -end Rec } - -a13_r3dH :: [GHC.Types.Char] -[GblId, Str=DmdType] -a13_r3dH = GHC.CString.unpackCString# "CompanyDatatypes.Employee" - -CompanyDatatypes.$fDataEmployee2 :: GHC.Types.Char -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.$fDataEmployee2 = GHC.Types.C# 'E' - -CompanyDatatypes.$fDataEmployee_w1 :: GHC.Base.String -[GblId, - Caf=NoCafRefs, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.$fDataEmployee_w1 = - GHC.Types.: - @ GHC.Types.Char - CompanyDatatypes.$fDataEmployee2 - (GHC.Types.[] @ GHC.Types.Char) - -lvl5_r3dI - :: Data.Data.Constr - -> GHC.Types.Int -> GHC.Types.Int -> GHC.Types.Int -[GblId, Arity=3, Caf=NoCafRefs] -lvl5_r3dI = - \ (x_a17I :: Data.Data.Constr) - (y_a17J :: GHC.Types.Int) - (r_a17K :: GHC.Types.Int) -> - case x_a17I - of _ - { Data.Data.Constr ds2_a17P ds3_a17Q ds4_a17R ds5_a17S ds6_a17T -> - case GHC.Base.eqString ds3_a17Q CompanyDatatypes.$fDataEmployee_w1 - of _ { - GHC.Types.False -> r_a17K; - GHC.Types.True -> y_a17J - } - } - -Rec { -CompanyDatatypes.$fDataEmployee3 :: Data.Data.ConstrRep -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.$fDataEmployee3 = - Data.Data.AlgConstr CompanyDatatypes.$fDataEmployee4 - -CompanyDatatypes.$cE :: Data.Data.Constr -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 60}] -CompanyDatatypes.$cE = - Data.Data.Constr - CompanyDatatypes.$fDataEmployee3 - CompanyDatatypes.$fDataEmployee_w1 - (GHC.Types.[] @ GHC.Base.String) - Data.Data.Prefix - CompanyDatatypes.$tEmployee - -a14_r3dJ :: [Data.Data.Constr] -[GblId, Str=DmdType] -a14_r3dJ = - GHC.Types.: - @ Data.Data.Constr - CompanyDatatypes.$cE - (GHC.Types.[] @ Data.Data.Constr) - -a15_r3dK :: Data.Data.DataRep -[GblId, Str=DmdType] -a15_r3dK = Data.Data.AlgRep a14_r3dJ - -CompanyDatatypes.$tEmployee [Occ=LoopBreaker] :: Data.Data.DataType -[GblId, Str=DmdType m] -CompanyDatatypes.$tEmployee = Data.Data.DataType a13_r3dH a15_r3dK - -CompanyDatatypes.$fDataEmployee4 [Occ=LoopBreaker] :: GHC.Types.Int -[GblId, Str=DmdType] -CompanyDatatypes.$fDataEmployee4 = - GHC.List.foldr2 - @ Data.Data.Constr - @ GHC.Types.Int - @ GHC.Types.Int - lvl5_r3dI - (GHC.List.badHead @ GHC.Types.Int) - a14_r3dJ - Data.Data.mkConstr1 -end Rec } - -a16_r3dL :: [GHC.Types.Char] -[GblId, Str=DmdType] -a16_r3dL = GHC.CString.unpackCString# "CompanyDatatypes.Person" - -CompanyDatatypes.$fDataPerson3 :: GHC.Types.Char -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.$fDataPerson3 = GHC.Types.C# 'P' - -CompanyDatatypes.$fDataPerson_w1 :: GHC.Base.String -[GblId, - Caf=NoCafRefs, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.$fDataPerson_w1 = - GHC.Types.: - @ GHC.Types.Char - CompanyDatatypes.$fDataPerson3 - (GHC.Types.[] @ GHC.Types.Char) - -lvl6_r3dM - :: Data.Data.Constr - -> GHC.Types.Int -> GHC.Types.Int -> GHC.Types.Int -[GblId, Arity=3, Caf=NoCafRefs] -lvl6_r3dM = - \ (x_a17I :: Data.Data.Constr) - (y_a17J :: GHC.Types.Int) - (r_a17K :: GHC.Types.Int) -> - case x_a17I - of _ - { Data.Data.Constr ds2_a17P ds3_a17Q ds4_a17R ds5_a17S ds6_a17T -> - case GHC.Base.eqString ds3_a17Q CompanyDatatypes.$fDataPerson_w1 - of _ { - GHC.Types.False -> r_a17K; - GHC.Types.True -> y_a17J - } - } - -Rec { -CompanyDatatypes.$fDataPerson4 :: Data.Data.ConstrRep -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.$fDataPerson4 = - Data.Data.AlgConstr CompanyDatatypes.$fDataPerson5 - -CompanyDatatypes.$cP :: Data.Data.Constr -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 60}] -CompanyDatatypes.$cP = - Data.Data.Constr - CompanyDatatypes.$fDataPerson4 - CompanyDatatypes.$fDataPerson_w1 - (GHC.Types.[] @ GHC.Base.String) - Data.Data.Prefix - CompanyDatatypes.$tPerson - -a17_r3dN :: [Data.Data.Constr] -[GblId, Str=DmdType] -a17_r3dN = - GHC.Types.: - @ Data.Data.Constr - CompanyDatatypes.$cP - (GHC.Types.[] @ Data.Data.Constr) - -a18_r3dO :: Data.Data.DataRep -[GblId, Str=DmdType] -a18_r3dO = Data.Data.AlgRep a17_r3dN - -CompanyDatatypes.$tPerson [Occ=LoopBreaker] :: Data.Data.DataType -[GblId, Str=DmdType m] -CompanyDatatypes.$tPerson = Data.Data.DataType a16_r3dL a18_r3dO - -CompanyDatatypes.$fDataPerson5 [Occ=LoopBreaker] :: GHC.Types.Int -[GblId, Str=DmdType] -CompanyDatatypes.$fDataPerson5 = - GHC.List.foldr2 - @ Data.Data.Constr - @ GHC.Types.Int - @ GHC.Types.Int - lvl6_r3dM - (GHC.List.badHead @ GHC.Types.Int) - a17_r3dN - Data.Data.mkConstr1 -end Rec } - -a19_r3dP :: [GHC.Types.Char] -[GblId, Str=DmdType] -a19_r3dP = GHC.CString.unpackCString# "CompanyDatatypes.Salary" - -CompanyDatatypes.$fDataSalary2 :: GHC.Types.Char -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.$fDataSalary2 = GHC.Types.C# 'S' - -CompanyDatatypes.$fDataSalary_w1 :: GHC.Base.String -[GblId, - Caf=NoCafRefs, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.$fDataSalary_w1 = - GHC.Types.: - @ GHC.Types.Char - CompanyDatatypes.$fDataSalary2 - (GHC.Types.[] @ GHC.Types.Char) - -lvl7_r3dQ - :: Data.Data.Constr - -> GHC.Types.Int -> GHC.Types.Int -> GHC.Types.Int -[GblId, Arity=3, Caf=NoCafRefs] -lvl7_r3dQ = - \ (x_a17I :: Data.Data.Constr) - (y_a17J :: GHC.Types.Int) - (r_a17K :: GHC.Types.Int) -> - case x_a17I - of _ - { Data.Data.Constr ds2_a17P ds3_a17Q ds4_a17R ds5_a17S ds6_a17T -> - case GHC.Base.eqString ds3_a17Q CompanyDatatypes.$fDataSalary_w1 - of _ { - GHC.Types.False -> r_a17K; - GHC.Types.True -> y_a17J - } - } - -Rec { -CompanyDatatypes.$fDataSalary3 :: Data.Data.ConstrRep -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.$fDataSalary3 = - Data.Data.AlgConstr CompanyDatatypes.$fDataSalary4 - -CompanyDatatypes.$cS :: Data.Data.Constr -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 60}] -CompanyDatatypes.$cS = - Data.Data.Constr - CompanyDatatypes.$fDataSalary3 - CompanyDatatypes.$fDataSalary_w1 - (GHC.Types.[] @ GHC.Base.String) - Data.Data.Prefix - CompanyDatatypes.$tSalary - -a20_r3dR :: [Data.Data.Constr] -[GblId, Str=DmdType] -a20_r3dR = - GHC.Types.: - @ Data.Data.Constr - CompanyDatatypes.$cS - (GHC.Types.[] @ Data.Data.Constr) - -a21_r3dS :: Data.Data.DataRep -[GblId, Str=DmdType] -a21_r3dS = Data.Data.AlgRep a20_r3dR - -CompanyDatatypes.$tSalary [Occ=LoopBreaker] :: Data.Data.DataType -[GblId, Str=DmdType m] -CompanyDatatypes.$tSalary = Data.Data.DataType a19_r3dP a21_r3dS - -CompanyDatatypes.$fDataSalary4 [Occ=LoopBreaker] :: GHC.Types.Int -[GblId, Str=DmdType] -CompanyDatatypes.$fDataSalary4 = - GHC.List.foldr2 - @ Data.Data.Constr - @ GHC.Types.Int - @ GHC.Types.Int - lvl7_r3dQ - (GHC.List.badHead @ GHC.Types.Int) - a20_r3dR - Data.Data.mkConstr1 -end Rec } - -CompanyDatatypes.person3 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 40 0}] -CompanyDatatypes.person3 = GHC.CString.unpackCString# "Lazy" - -CompanyDatatypes.person2 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 40 0}] -CompanyDatatypes.person2 = GHC.CString.unpackCString# "Home" - -CompanyDatatypes.person1 :: CompanyDatatypes.Person -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.person1 = - CompanyDatatypes.P - CompanyDatatypes.person3 CompanyDatatypes.person2 - -CompanyDatatypes.dept3 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 50 0}] -CompanyDatatypes.dept3 = GHC.CString.unpackCString# "Useless" - -CompanyDatatypes.dept2 :: CompanyDatatypes.Employee -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.dept2 = - CompanyDatatypes.E - CompanyDatatypes.person1 - (GHC.Err.undefined @ CompanyDatatypes.Salary) - -CompanyDatatypes.dept1 :: CompanyDatatypes.Dept -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 40}] -CompanyDatatypes.dept1 = - CompanyDatatypes.D - CompanyDatatypes.dept3 - CompanyDatatypes.dept2 - (GHC.Types.[] @ CompanyDatatypes.Unit) - -CompanyDatatypes.blair5 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 50 0}] -CompanyDatatypes.blair5 = GHC.CString.unpackCString# "Blair" - -CompanyDatatypes.blair4 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 50 0}] -CompanyDatatypes.blair4 = GHC.CString.unpackCString# "London" - -CompanyDatatypes.blair3 :: CompanyDatatypes.Person -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.blair3 = - CompanyDatatypes.P CompanyDatatypes.blair5 CompanyDatatypes.blair4 - -CompanyDatatypes.blair2 :: GHC.Types.Float -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.blair2 = GHC.Types.F# (__float 100000.0) - -CompanyDatatypes.blair1 :: CompanyDatatypes.Salary -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.blair1 = - CompanyDatatypes.S CompanyDatatypes.blair2 - -CompanyDatatypes.blair :: CompanyDatatypes.Employee -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.blair = - CompanyDatatypes.E CompanyDatatypes.blair3 CompanyDatatypes.blair1 - -CompanyDatatypes.marlow5 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 50 0}] -CompanyDatatypes.marlow5 = GHC.CString.unpackCString# "Marlow" - -CompanyDatatypes.marlow4 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 60 0}] -CompanyDatatypes.marlow4 = GHC.CString.unpackCString# "Cambridge" - -CompanyDatatypes.marlow3 :: CompanyDatatypes.Person -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.marlow3 = - CompanyDatatypes.P - CompanyDatatypes.marlow5 CompanyDatatypes.marlow4 - -CompanyDatatypes.marlow2 :: GHC.Types.Float -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.marlow2 = GHC.Types.F# (__float 2000.0) - -CompanyDatatypes.marlow1 :: CompanyDatatypes.Salary -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.marlow1 = - CompanyDatatypes.S CompanyDatatypes.marlow2 - -CompanyDatatypes.marlow :: CompanyDatatypes.Employee -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.marlow = - CompanyDatatypes.E - CompanyDatatypes.marlow3 CompanyDatatypes.marlow1 - -CompanyDatatypes.joost5 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 50 0}] -CompanyDatatypes.joost5 = GHC.CString.unpackCString# "Joost" - -CompanyDatatypes.joost4 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 60 0}] -CompanyDatatypes.joost4 = GHC.CString.unpackCString# "Amsterdam" - -CompanyDatatypes.joost3 :: CompanyDatatypes.Person -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.joost3 = - CompanyDatatypes.P CompanyDatatypes.joost5 CompanyDatatypes.joost4 - -CompanyDatatypes.joost2 :: GHC.Types.Float -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.joost2 = GHC.Types.F# (__float 1000.0) - -CompanyDatatypes.joost1 :: CompanyDatatypes.Salary -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.joost1 = - CompanyDatatypes.S CompanyDatatypes.joost2 - -CompanyDatatypes.joost :: CompanyDatatypes.Employee -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.joost = - CompanyDatatypes.E CompanyDatatypes.joost3 CompanyDatatypes.joost1 - -CompanyDatatypes.laemmel4 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 50 0}] -CompanyDatatypes.laemmel4 = GHC.CString.unpackCString# "Laemmel" - -CompanyDatatypes.laemmel3 :: CompanyDatatypes.Person -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.laemmel3 = - CompanyDatatypes.P - CompanyDatatypes.laemmel4 CompanyDatatypes.joost4 - -CompanyDatatypes.laemmel2 :: GHC.Types.Float -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.laemmel2 = GHC.Types.F# (__float 8000.0) - -CompanyDatatypes.laemmel1 :: CompanyDatatypes.Salary -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.laemmel1 = - CompanyDatatypes.S CompanyDatatypes.laemmel2 - -CompanyDatatypes.laemmel :: CompanyDatatypes.Employee -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.laemmel = - CompanyDatatypes.E - CompanyDatatypes.laemmel3 CompanyDatatypes.laemmel1 - -CompanyDatatypes.lammel3 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 50 0}] -CompanyDatatypes.lammel3 = GHC.CString.unpackCString# "Lammel" - -CompanyDatatypes.lammel2 :: CompanyDatatypes.Person -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.lammel2 = - CompanyDatatypes.P CompanyDatatypes.lammel3 CompanyDatatypes.joost4 - -CompanyDatatypes.lammel1 :: CompanyDatatypes.Salary -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.lammel1 = - CompanyDatatypes.S CompanyDatatypes.laemmel2 - -CompanyDatatypes.lammel :: CompanyDatatypes.Employee -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.lammel = - CompanyDatatypes.E - CompanyDatatypes.lammel2 CompanyDatatypes.lammel1 - -CompanyDatatypes.genCom10 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 50 0}] -CompanyDatatypes.genCom10 = GHC.CString.unpackCString# "Research" - -CompanyDatatypes.genCom9 :: CompanyDatatypes.Unit -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.genCom9 = - CompanyDatatypes.PU CompanyDatatypes.joost - -CompanyDatatypes.genCom8 :: CompanyDatatypes.Unit -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.genCom8 = - CompanyDatatypes.PU CompanyDatatypes.marlow - -CompanyDatatypes.genCom'6 :: [CompanyDatatypes.Unit] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.genCom'6 = - GHC.Types.: - @ CompanyDatatypes.Unit - CompanyDatatypes.genCom8 - (GHC.Types.[] @ CompanyDatatypes.Unit) - -CompanyDatatypes.genCom'5 :: [CompanyDatatypes.Unit] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.genCom'5 = - GHC.Types.: - @ CompanyDatatypes.Unit - CompanyDatatypes.genCom9 - CompanyDatatypes.genCom'6 - -CompanyDatatypes.genCom'4 :: CompanyDatatypes.Dept -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 40}] -CompanyDatatypes.genCom'4 = - CompanyDatatypes.D - CompanyDatatypes.genCom10 - CompanyDatatypes.lammel - CompanyDatatypes.genCom'5 - -CompanyDatatypes.genCom4 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 50 0}] -CompanyDatatypes.genCom4 = GHC.CString.unpackCString# "Strategy" - -CompanyDatatypes.genCom'3 :: CompanyDatatypes.Dept -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 40}] -CompanyDatatypes.genCom'3 = - CompanyDatatypes.D - CompanyDatatypes.genCom4 - CompanyDatatypes.blair - (GHC.Types.[] @ CompanyDatatypes.Unit) - -CompanyDatatypes.genCom'2 :: [CompanyDatatypes.Dept] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.genCom'2 = - GHC.Types.: - @ CompanyDatatypes.Dept - CompanyDatatypes.genCom'3 - (GHC.Types.[] @ CompanyDatatypes.Dept) - -CompanyDatatypes.genCom'1 :: [CompanyDatatypes.Dept] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.genCom'1 = - GHC.Types.: - @ CompanyDatatypes.Dept - CompanyDatatypes.genCom'4 - CompanyDatatypes.genCom'2 - -CompanyDatatypes.genCom' :: CompanyDatatypes.Company -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.genCom' = - CompanyDatatypes.C CompanyDatatypes.genCom'1 - -CompanyDatatypes.genCom7 :: [CompanyDatatypes.Unit] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.genCom7 = - GHC.Types.: - @ CompanyDatatypes.Unit - CompanyDatatypes.genCom8 - (GHC.Types.[] @ CompanyDatatypes.Unit) - -CompanyDatatypes.genCom6 :: [CompanyDatatypes.Unit] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.genCom6 = - GHC.Types.: - @ CompanyDatatypes.Unit - CompanyDatatypes.genCom9 - CompanyDatatypes.genCom7 - -CompanyDatatypes.genCom5 :: CompanyDatatypes.Dept -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 40}] -CompanyDatatypes.genCom5 = - CompanyDatatypes.D - CompanyDatatypes.genCom10 - CompanyDatatypes.laemmel - CompanyDatatypes.genCom6 - -CompanyDatatypes.genCom3 :: CompanyDatatypes.Dept -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 40}] -CompanyDatatypes.genCom3 = - CompanyDatatypes.D - CompanyDatatypes.genCom4 - CompanyDatatypes.blair - (GHC.Types.[] @ CompanyDatatypes.Unit) - -CompanyDatatypes.genCom2 :: [CompanyDatatypes.Dept] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.genCom2 = - GHC.Types.: - @ CompanyDatatypes.Dept - CompanyDatatypes.genCom3 - (GHC.Types.[] @ CompanyDatatypes.Dept) - -CompanyDatatypes.genCom1 :: [CompanyDatatypes.Dept] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.genCom1 = - GHC.Types.: - @ CompanyDatatypes.Dept - CompanyDatatypes.genCom5 - CompanyDatatypes.genCom2 - -CompanyDatatypes.genCom :: CompanyDatatypes.Company -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.genCom = - CompanyDatatypes.C CompanyDatatypes.genCom1 - -CompanyDatatypes.$fDataCompany_$cdataTypeOf - :: CompanyDatatypes.Company -> Data.Data.DataType -[GblId, - Arity=1, - Str=DmdType Am, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ _ -> CompanyDatatypes.$tCompany}] -CompanyDatatypes.$fDataCompany_$cdataTypeOf = - \ _ -> CompanyDatatypes.$tCompany - -CompanyDatatypes.$fDataCompany_$ctoConstr - :: CompanyDatatypes.Company -> Data.Data.Constr -[GblId, - Arity=1, - Str=DmdType U(A)m, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (ds_d16f [Occ=Once!] :: CompanyDatatypes.Company) -> - case ds_d16f of _ { CompanyDatatypes.C _ -> - CompanyDatatypes.$cC - }}] -CompanyDatatypes.$fDataCompany_$ctoConstr = - \ (ds_d16f :: CompanyDatatypes.Company) -> - case ds_d16f of _ { CompanyDatatypes.C ds1_d16g -> - CompanyDatatypes.$cC - } - -CompanyDatatypes.$fDataDept_$cdataTypeOf - :: CompanyDatatypes.Dept -> Data.Data.DataType -[GblId, - Arity=1, - Str=DmdType Am, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ _ -> CompanyDatatypes.$tDept}] -CompanyDatatypes.$fDataDept_$cdataTypeOf = - \ _ -> CompanyDatatypes.$tDept - -CompanyDatatypes.$fDataDept_$ctoConstr - :: CompanyDatatypes.Dept -> Data.Data.Constr -[GblId, - Arity=1, - Str=DmdType U(AAA)m, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (ds_d160 [Occ=Once!] :: CompanyDatatypes.Dept) -> - case ds_d160 of _ { CompanyDatatypes.D _ _ _ -> - CompanyDatatypes.$cD - }}] -CompanyDatatypes.$fDataDept_$ctoConstr = - \ (ds_d160 :: CompanyDatatypes.Dept) -> - case ds_d160 - of _ { CompanyDatatypes.D ds1_d161 ds2_d162 ds3_d163 -> - CompanyDatatypes.$cD - } - -CompanyDatatypes.$fDataUnit_$cdataTypeOf - :: CompanyDatatypes.Unit -> Data.Data.DataType -[GblId, - Arity=1, - Str=DmdType Am, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ _ -> CompanyDatatypes.$tUnit}] -CompanyDatatypes.$fDataUnit_$cdataTypeOf = - \ _ -> CompanyDatatypes.$tUnit - -CompanyDatatypes.$fDataUnit_$ctoConstr - :: CompanyDatatypes.Unit -> Data.Data.Constr -[GblId, - Arity=1, - Str=DmdType Sm, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (ds_d15L [Occ=Once!] :: CompanyDatatypes.Unit) -> - case ds_d15L of _ { - CompanyDatatypes.PU _ -> CompanyDatatypes.$cPU; - CompanyDatatypes.DU _ -> CompanyDatatypes.$cDU - }}] -CompanyDatatypes.$fDataUnit_$ctoConstr = - \ (ds_d15L :: CompanyDatatypes.Unit) -> - case ds_d15L of _ { - CompanyDatatypes.PU ds1_d15N -> CompanyDatatypes.$cPU; - CompanyDatatypes.DU ds1_d15M -> CompanyDatatypes.$cDU - } - -CompanyDatatypes.$fDataEmployee_$cdataTypeOf - :: CompanyDatatypes.Employee -> Data.Data.DataType -[GblId, - Arity=1, - Str=DmdType Am, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ _ -> CompanyDatatypes.$tEmployee}] -CompanyDatatypes.$fDataEmployee_$cdataTypeOf = - \ _ -> CompanyDatatypes.$tEmployee - -CompanyDatatypes.$fDataEmployee_$ctoConstr - :: CompanyDatatypes.Employee -> Data.Data.Constr -[GblId, - Arity=1, - Str=DmdType U(AA)m, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (ds_d15n [Occ=Once!] :: CompanyDatatypes.Employee) -> - case ds_d15n of _ { CompanyDatatypes.E _ _ -> - CompanyDatatypes.$cE - }}] -CompanyDatatypes.$fDataEmployee_$ctoConstr = - \ (ds_d15n :: CompanyDatatypes.Employee) -> - case ds_d15n of _ { CompanyDatatypes.E ds1_d15o ds2_d15p -> - CompanyDatatypes.$cE - } - -CompanyDatatypes.$fDataPerson_$cdataTypeOf - :: CompanyDatatypes.Person -> Data.Data.DataType -[GblId, - Arity=1, - Str=DmdType Am, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ _ -> CompanyDatatypes.$tPerson}] -CompanyDatatypes.$fDataPerson_$cdataTypeOf = - \ _ -> CompanyDatatypes.$tPerson - -CompanyDatatypes.$fDataPerson_$ctoConstr - :: CompanyDatatypes.Person -> Data.Data.Constr -[GblId, - Arity=1, - Str=DmdType U(AA)m, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (ds_d159 [Occ=Once!] :: CompanyDatatypes.Person) -> - case ds_d159 of _ { CompanyDatatypes.P _ _ -> - CompanyDatatypes.$cP - }}] -CompanyDatatypes.$fDataPerson_$ctoConstr = - \ (ds_d159 :: CompanyDatatypes.Person) -> - case ds_d159 of _ { CompanyDatatypes.P ds1_d15a ds2_d15b -> - CompanyDatatypes.$cP - } - -CompanyDatatypes.$fDataPerson2 - :: [GHC.Types.Char] -> Data.Typeable.Internal.TypeRep -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 30 0}] -CompanyDatatypes.$fDataPerson2 = - Data.Typeable.Internal.typeOfDefault - @ [] - @ GHC.Types.Char - (Data.Typeable.Internal.$fTypeable1[]_$ctypeOf1 - `cast` (Sym <(Data.Typeable.Internal.NTCo:Typeable1 <[]>)> - :: (forall a_a1GP. [a_a1GP] -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable1 [])) - (Data.Typeable.Internal.$fTypeableChar_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <GHC.Types.Char>)> - :: (GHC.Types.Char -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable GHC.Types.Char)) - -CompanyDatatypes.$fDataPerson_$dData1 - :: Data.Data.Data CompanyDatatypes.Address -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 30 0}] -CompanyDatatypes.$fDataPerson_$dData1 = - Data.Data.$fData[] - @ GHC.Types.Char - (CompanyDatatypes.$fDataPerson2 - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <[GHC.Types.Char]>)> - :: ([GHC.Types.Char] -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable [GHC.Types.Char])) - Data.Data.$fDataChar - -CompanyDatatypes.$fDataPerson_$cgunfold - :: forall (c_aV9 :: * -> *). - (forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_aV9 (b_aVa -> r_aVb) -> c_aV9 r_aVb) - -> (forall r_aVc. r_aVc -> c_aV9 r_aVc) - -> Data.Data.Constr - -> c_aV9 CompanyDatatypes.Person -[GblId, - Arity=3, - Str=DmdType C(C(S))LA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (c_t1p :: * -> *)) - (k_XWB - :: forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_t1p (b_aVa -> r_aVb) -> c_t1p r_aVb) - (z_XWD [Occ=Once!] :: forall r_aVc. r_aVc -> c_t1p r_aVc) - _ -> - k_XWB - @ CompanyDatatypes.Address - @ CompanyDatatypes.Person - CompanyDatatypes.$fDataPerson_$dData1 - (k_XWB - @ CompanyDatatypes.Name - @ (CompanyDatatypes.Address -> CompanyDatatypes.Person) - CompanyDatatypes.$fDataPerson_$dData1 - (z_XWD - @ (CompanyDatatypes.Name - -> CompanyDatatypes.Address -> CompanyDatatypes.Person) - CompanyDatatypes.P))}] -CompanyDatatypes.$fDataPerson_$cgunfold = - \ (@ (c_t1p :: * -> *)) - (k_XWB - :: forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_t1p (b_aVa -> r_aVb) -> c_t1p r_aVb) - (z_XWD :: forall r_aVc. r_aVc -> c_t1p r_aVc) - _ -> - k_XWB - @ CompanyDatatypes.Address - @ CompanyDatatypes.Person - CompanyDatatypes.$fDataPerson_$dData1 - (k_XWB - @ CompanyDatatypes.Name - @ (CompanyDatatypes.Address -> CompanyDatatypes.Person) - CompanyDatatypes.$fDataPerson_$dData1 - (z_XWD - @ (CompanyDatatypes.Name - -> CompanyDatatypes.Address -> CompanyDatatypes.Person) - CompanyDatatypes.P)) - -CompanyDatatypes.$fDataPerson_$dData - :: Data.Data.Data CompanyDatatypes.Address -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 30 0}] -CompanyDatatypes.$fDataPerson_$dData = - Data.Data.$fData[] - @ GHC.Types.Char - (CompanyDatatypes.$fDataPerson2 - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <[GHC.Types.Char]>)> - :: ([GHC.Types.Char] -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable [GHC.Types.Char])) - Data.Data.$fDataChar - -CompanyDatatypes.$w$cgfoldl - :: forall (c_aV0 :: * -> *). - (forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - -> (forall g_aV3. g_aV3 -> c_aV0 g_aV3) - -> CompanyDatatypes.Name - -> CompanyDatatypes.Address - -> c_aV0 CompanyDatatypes.Person -[GblId, - Arity=4, - Str=DmdType C(C(C(S)))LLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=4, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [120 60 0 0] 100 0}] -CompanyDatatypes.$w$cgfoldl = - \ (@ (c_aV0 :: * -> *)) - (w_s2bX - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - (w3_s2bY :: forall g_aV3. g_aV3 -> c_aV0 g_aV3) - (ww_s2c1 :: CompanyDatatypes.Name) - (ww1_s2c2 :: CompanyDatatypes.Address) -> - w_s2bX - @ CompanyDatatypes.Address - @ CompanyDatatypes.Person - CompanyDatatypes.$fDataPerson_$dData - (w_s2bX - @ CompanyDatatypes.Name - @ (CompanyDatatypes.Address -> CompanyDatatypes.Person) - CompanyDatatypes.$fDataPerson_$dData - (w3_s2bY - @ (CompanyDatatypes.Name - -> CompanyDatatypes.Address -> CompanyDatatypes.Person) - CompanyDatatypes.P) - ww_s2c1) - ww1_s2c2 - -CompanyDatatypes.$fDataPerson_$cgfoldl [InlPrag=INLINE[0]] - :: forall (c_aV0 :: * -> *). - (forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - -> (forall g_aV3. g_aV3 -> c_aV0 g_aV3) - -> CompanyDatatypes.Person - -> c_aV0 CompanyDatatypes.Person -[GblId, - Arity=3, - Str=DmdType C(C(C(S)))LU(LL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgfoldl, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (c_aV0 :: * -> *)) - (w_s2bX [Occ=Once] - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - (w3_s2bY [Occ=Once] :: forall g_aV3. g_aV3 -> c_aV0 g_aV3) - (w4_s2bZ [Occ=Once!] :: CompanyDatatypes.Person) -> - case w4_s2bZ - of _ { CompanyDatatypes.P ww_s2c1 [Occ=Once] ww1_s2c2 [Occ=Once] -> - CompanyDatatypes.$w$cgfoldl @ c_aV0 w_s2bX w3_s2bY ww_s2c1 ww1_s2c2 - }}] -CompanyDatatypes.$fDataPerson_$cgfoldl = - \ (@ (c_aV0 :: * -> *)) - (w_s2bX - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - (w3_s2bY :: forall g_aV3. g_aV3 -> c_aV0 g_aV3) - (w4_s2bZ :: CompanyDatatypes.Person) -> - case w4_s2bZ of _ { CompanyDatatypes.P ww_s2c1 ww1_s2c2 -> - CompanyDatatypes.$w$cgfoldl @ c_aV0 w_s2bX w3_s2bY ww_s2c1 ww1_s2c2 - } - -CompanyDatatypes.$w$c==2 - :: CompanyDatatypes.Name - -> CompanyDatatypes.Address - -> CompanyDatatypes.Name - -> CompanyDatatypes.Address - -> GHC.Types.Bool -[GblId, - Arity=4, - Caf=NoCafRefs, - Str=DmdType SLSL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=4, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [0 0 0 0] 80 10}] -CompanyDatatypes.$w$c==2 = - \ (ww_s2c9 :: CompanyDatatypes.Name) - (ww1_s2ca :: CompanyDatatypes.Address) - (ww2_s2ce :: CompanyDatatypes.Name) - (ww3_s2cf :: CompanyDatatypes.Address) -> - case GHC.Base.eqString ww_s2c9 ww2_s2ce of _ { - GHC.Types.False -> GHC.Types.False; - GHC.Types.True -> GHC.Base.eqString ww1_s2ca ww3_s2cf - } - -CompanyDatatypes.$fEqPerson_$c== [InlPrag=INLINE[0]] - :: CompanyDatatypes.Person - -> CompanyDatatypes.Person -> GHC.Types.Bool -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType U(SL)U(SL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$c==2, TopLvl=True, Arity=2, - Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (w_s2c7 [Occ=Once!] :: CompanyDatatypes.Person) - (w3_s2cc [Occ=Once!] :: CompanyDatatypes.Person) -> - case w_s2c7 - of _ { CompanyDatatypes.P ww_s2c9 [Occ=Once] ww1_s2ca [Occ=Once] -> - case w3_s2cc - of _ - { CompanyDatatypes.P ww2_s2ce [Occ=Once] ww3_s2cf [Occ=Once] -> - CompanyDatatypes.$w$c==2 ww_s2c9 ww1_s2ca ww2_s2ce ww3_s2cf - } - }}] -CompanyDatatypes.$fEqPerson_$c== = - \ (w_s2c7 :: CompanyDatatypes.Person) - (w3_s2cc :: CompanyDatatypes.Person) -> - case w_s2c7 of _ { CompanyDatatypes.P ww_s2c9 ww1_s2ca -> - case w3_s2cc of _ { CompanyDatatypes.P ww2_s2ce ww3_s2cf -> - CompanyDatatypes.$w$c==2 ww_s2c9 ww1_s2ca ww2_s2ce ww3_s2cf - } - } - -CompanyDatatypes.$w$c/= - :: CompanyDatatypes.Name - -> CompanyDatatypes.Address - -> CompanyDatatypes.Name - -> CompanyDatatypes.Address - -> GHC.Types.Bool -[GblId, - Arity=4, - Caf=NoCafRefs, - Str=DmdType SLSL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=4, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [0 0 0 0] 100 30}] -CompanyDatatypes.$w$c/= = - \ (ww_s2cm :: CompanyDatatypes.Name) - (ww1_s2cn :: CompanyDatatypes.Address) - (ww2_s2cr :: CompanyDatatypes.Name) - (ww3_s2cs :: CompanyDatatypes.Address) -> - case GHC.Base.eqString ww_s2cm ww2_s2cr of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> - case GHC.Base.eqString ww1_s2cn ww3_s2cs of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> GHC.Types.False - } - } - -CompanyDatatypes.$fEqPerson_$c/= [InlPrag=INLINE[0]] - :: CompanyDatatypes.Person - -> CompanyDatatypes.Person -> GHC.Types.Bool -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType U(SL)U(SL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$c/=, TopLvl=True, Arity=2, - Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (w_s2ck [Occ=Once!] :: CompanyDatatypes.Person) - (w3_s2cp [Occ=Once!] :: CompanyDatatypes.Person) -> - case w_s2ck - of _ { CompanyDatatypes.P ww_s2cm [Occ=Once] ww1_s2cn [Occ=Once] -> - case w3_s2cp - of _ - { CompanyDatatypes.P ww2_s2cr [Occ=Once] ww3_s2cs [Occ=Once] -> - CompanyDatatypes.$w$c/= ww_s2cm ww1_s2cn ww2_s2cr ww3_s2cs - } - }}] -CompanyDatatypes.$fEqPerson_$c/= = - \ (w_s2ck :: CompanyDatatypes.Person) - (w3_s2cp :: CompanyDatatypes.Person) -> - case w_s2ck of _ { CompanyDatatypes.P ww_s2cm ww1_s2cn -> - case w3_s2cp of _ { CompanyDatatypes.P ww2_s2cr ww3_s2cs -> - CompanyDatatypes.$w$c/= ww_s2cm ww1_s2cn ww2_s2cr ww3_s2cs - } - } - -CompanyDatatypes.$fEqPerson [InlPrag=[ALWAYS] CONLIKE] - :: GHC.Classes.Eq CompanyDatatypes.Person -[GblId[DFunId], - Caf=NoCafRefs, - Str=DmdType m, - Unf=DFun(arity=0) GHC.Classes.D:Eq [{CompanyDatatypes.$fEqPerson_$c==}, - {CompanyDatatypes.$fEqPerson_$c/=}]] -CompanyDatatypes.$fEqPerson = - GHC.Classes.D:Eq - @ CompanyDatatypes.Person - CompanyDatatypes.$fEqPerson_$c== - CompanyDatatypes.$fEqPerson_$c/= - -CompanyDatatypes.$fDataSalary_$cdataTypeOf - :: CompanyDatatypes.Salary -> Data.Data.DataType -[GblId, - Arity=1, - Str=DmdType Am, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ _ -> CompanyDatatypes.$tSalary}] -CompanyDatatypes.$fDataSalary_$cdataTypeOf = - \ _ -> CompanyDatatypes.$tSalary - -CompanyDatatypes.$fDataSalary_$ctoConstr - :: CompanyDatatypes.Salary -> Data.Data.Constr -[GblId, - Arity=1, - Str=DmdType U(A)m, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (ds_d14W [Occ=Once!] :: CompanyDatatypes.Salary) -> - case ds_d14W of _ { CompanyDatatypes.S _ -> - CompanyDatatypes.$cS - }}] -CompanyDatatypes.$fDataSalary_$ctoConstr = - \ (ds_d14W :: CompanyDatatypes.Salary) -> - case ds_d14W of _ { CompanyDatatypes.S ds1_d14X -> - CompanyDatatypes.$cS - } - -CompanyDatatypes.$fDataSalary_$cgunfold - :: forall (c_aV9 :: * -> *). - (forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_aV9 (b_aVa -> r_aVb) -> c_aV9 r_aVb) - -> (forall r_aVc. r_aVc -> c_aV9 r_aVc) - -> Data.Data.Constr - -> c_aV9 CompanyDatatypes.Salary -[GblId, - Arity=3, - Str=DmdType C(C(S))LA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (c_tL :: * -> *)) - (k_aS8 [Occ=Once!] - :: forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_tL (b_aVa -> r_aVb) -> c_tL r_aVb) - (z_aS9 [Occ=Once!] :: forall r_aVc. r_aVc -> c_tL r_aVc) - _ -> - k_aS8 - @ GHC.Types.Float - @ CompanyDatatypes.Salary - Data.Data.$fDataFloat - (z_aS9 - @ (GHC.Types.Float -> CompanyDatatypes.Salary) - CompanyDatatypes.S)}] -CompanyDatatypes.$fDataSalary_$cgunfold = - \ (@ (c_tL :: * -> *)) - (k_aS8 - :: forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_tL (b_aVa -> r_aVb) -> c_tL r_aVb) - (z_aS9 :: forall r_aVc. r_aVc -> c_tL r_aVc) - _ -> - k_aS8 - @ GHC.Types.Float - @ CompanyDatatypes.Salary - Data.Data.$fDataFloat - (z_aS9 - @ (GHC.Types.Float -> CompanyDatatypes.Salary) CompanyDatatypes.S) - -CompanyDatatypes.$fDataSalary_$cgfoldl - :: forall (c_aV0 :: * -> *). - (forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - -> (forall g_aV3. g_aV3 -> c_aV0 g_aV3) - -> CompanyDatatypes.Salary - -> c_aV0 CompanyDatatypes.Salary -[GblId, - Arity=3, - Str=DmdType C(C(C(S)))LU(L), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (c_tH :: * -> *)) - (k_aS5 [Occ=Once!] - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_tH (d_aV1 -> b_aV2) -> d_aV1 -> c_tH b_aV2) - (z_aS6 [Occ=Once!] :: forall g_aV3. g_aV3 -> c_tH g_aV3) - (ds_d14T [Occ=Once!] :: CompanyDatatypes.Salary) -> - case ds_d14T of _ { CompanyDatatypes.S a22_aS7 [Occ=Once] -> - k_aS5 - @ GHC.Types.Float - @ CompanyDatatypes.Salary - Data.Data.$fDataFloat - (z_aS6 - @ (GHC.Types.Float -> CompanyDatatypes.Salary) CompanyDatatypes.S) - a22_aS7 - }}] -CompanyDatatypes.$fDataSalary_$cgfoldl = - \ (@ (c_tH :: * -> *)) - (k_aS5 - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_tH (d_aV1 -> b_aV2) -> d_aV1 -> c_tH b_aV2) - (z_aS6 :: forall g_aV3. g_aV3 -> c_tH g_aV3) - (ds_d14T :: CompanyDatatypes.Salary) -> - case ds_d14T of _ { CompanyDatatypes.S a22_aS7 -> - k_aS5 - @ GHC.Types.Float - @ CompanyDatatypes.Salary - Data.Data.$fDataFloat - (z_aS6 - @ (GHC.Types.Float -> CompanyDatatypes.Salary) CompanyDatatypes.S) - a22_aS7 - } - -CompanyDatatypes.$fShowCompany5 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 40 0}] -CompanyDatatypes.$fShowCompany5 = GHC.CString.unpackCString# "P " - -CompanyDatatypes.$w$cshowsPrec3 - :: GHC.Prim.Int# - -> CompanyDatatypes.Name - -> CompanyDatatypes.Address - -> GHC.Base.String - -> GHC.Base.String -[GblId, - Arity=4, - Str=DmdType LLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=4, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [0 0 0 0] 241 30}] -CompanyDatatypes.$w$cshowsPrec3 = - \ (ww_s2cA :: GHC.Prim.Int#) - (ww1_s2cE :: CompanyDatatypes.Name) - (ww2_s2cF :: CompanyDatatypes.Address) - (w_s2cH :: GHC.Base.String) -> - let { - p_a1ck :: GHC.Show.ShowS - [LclId, Arity=1, Str=DmdType L] - p_a1ck = - \ (x_a1cM :: GHC.Base.String) -> - GHC.Base.++ - @ GHC.Types.Char - CompanyDatatypes.$fShowCompany5 - (GHC.Types.: - @ GHC.Types.Char - GHC.Show.$fShowChar1 - (GHC.Show.showLitString - ww1_s2cE - (GHC.Types.: - @ GHC.Types.Char - GHC.Show.$fShowChar1 - (GHC.Types.: - @ GHC.Types.Char - GHC.Show.showSpace1 - (GHC.Types.: - @ GHC.Types.Char - GHC.Show.$fShowChar1 - (GHC.Show.showLitString - ww2_s2cF - (GHC.Types.: - @ GHC.Types.Char GHC.Show.$fShowChar1 x_a1cM))))))) } in - case GHC.Prim.>=# ww_s2cA 11 of _ { - GHC.Types.False -> p_a1ck w_s2cH; - GHC.Types.True -> - GHC.Types.: - @ GHC.Types.Char - GHC.Show.shows11 - (p_a1ck (GHC.Types.: @ GHC.Types.Char GHC.Show.shows10 w_s2cH)) - } - -CompanyDatatypes.$fShowPerson_$cshowsPrec [InlPrag=INLINE[0]] - :: GHC.Types.Int -> CompanyDatatypes.Person -> GHC.Show.ShowS -[GblId, - Arity=3, - Str=DmdType U(L)U(LL)L, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cshowsPrec3, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (w_s2cy [Occ=Once!] :: GHC.Types.Int) - (w3_s2cC [Occ=Once!] :: CompanyDatatypes.Person) - (w4_s2cH [Occ=Once] :: GHC.Base.String) -> - case w_s2cy of _ { GHC.Types.I# ww_s2cA [Occ=Once] -> - case w3_s2cC - of _ - { CompanyDatatypes.P ww1_s2cE [Occ=Once] ww2_s2cF [Occ=Once] -> - CompanyDatatypes.$w$cshowsPrec3 ww_s2cA ww1_s2cE ww2_s2cF w4_s2cH - } - }}] -CompanyDatatypes.$fShowPerson_$cshowsPrec = - \ (w_s2cy :: GHC.Types.Int) - (w3_s2cC :: CompanyDatatypes.Person) - (w4_s2cH :: GHC.Base.String) -> - case w_s2cy of _ { GHC.Types.I# ww_s2cA -> - case w3_s2cC of _ { CompanyDatatypes.P ww1_s2cE ww2_s2cF -> - CompanyDatatypes.$w$cshowsPrec3 ww_s2cA ww1_s2cE ww2_s2cF w4_s2cH - } - } - -CompanyDatatypes.$fShowPerson1 - :: CompanyDatatypes.Person -> GHC.Show.ShowS -[GblId, - Arity=2, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [20 0] 60 0}] -CompanyDatatypes.$fShowPerson1 = - \ (w_s2cC :: CompanyDatatypes.Person) - (w3_s2cH :: GHC.Base.String) -> - case w_s2cC of _ { CompanyDatatypes.P ww_s2cE ww1_s2cF -> - CompanyDatatypes.$w$cshowsPrec3 0 ww_s2cE ww1_s2cF w3_s2cH - } - -CompanyDatatypes.$fShowPerson_$cshowList - :: [CompanyDatatypes.Person] -> GHC.Show.ShowS -[GblId, - Arity=2, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [] 20 60}] -CompanyDatatypes.$fShowPerson_$cshowList = - GHC.Show.showList__ - @ CompanyDatatypes.Person CompanyDatatypes.$fShowPerson1 - -CompanyDatatypes.$fShowPerson_$cshow - :: CompanyDatatypes.Person -> GHC.Base.String -[GblId, - Arity=1, - Str=DmdType U(LL), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (x_a1dj [Occ=Once] :: CompanyDatatypes.Person) -> - CompanyDatatypes.$fShowPerson_$cshowsPrec - GHC.Show.shows26 x_a1dj (GHC.Types.[] @ GHC.Types.Char)}] -CompanyDatatypes.$fShowPerson_$cshow = - \ (x_a1dj :: CompanyDatatypes.Person) -> - case x_a1dj of _ { CompanyDatatypes.P ww_s2cE ww1_s2cF -> - CompanyDatatypes.$w$cshowsPrec3 - 0 ww_s2cE ww1_s2cF (GHC.Types.[] @ GHC.Types.Char) - } - -CompanyDatatypes.$fShowPerson [InlPrag=[ALWAYS] CONLIKE] - :: GHC.Show.Show CompanyDatatypes.Person -[GblId[DFunId], - Str=DmdType m, - Unf=DFun(arity=0) GHC.Show.D:Show [{CompanyDatatypes.$fShowPerson_$cshowsPrec}, - {CompanyDatatypes.$fShowPerson_$cshow}, - {CompanyDatatypes.$fShowPerson_$cshowList}]] -CompanyDatatypes.$fShowPerson = - GHC.Show.D:Show - @ CompanyDatatypes.Person - CompanyDatatypes.$fShowPerson_$cshowsPrec - CompanyDatatypes.$fShowPerson_$cshow - CompanyDatatypes.$fShowPerson_$cshowList - -CompanyDatatypes.$fShowCompany7 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 40 0}] -CompanyDatatypes.$fShowCompany7 = GHC.CString.unpackCString# "S " - -CompanyDatatypes.$fShowCompany8 :: GHC.Types.Int -[GblId, - Caf=NoCafRefs, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 20}] -CompanyDatatypes.$fShowCompany8 = GHC.Types.I# 11 - -CompanyDatatypes.$w$cshowsPrec4 - :: GHC.Prim.Int# -> GHC.Types.Float -> GHC.Show.ShowS -[GblId, - Arity=2, - Str=DmdType LL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [0 20] 221 120}] -CompanyDatatypes.$w$cshowsPrec4 = - \ (ww_s2cN :: GHC.Prim.Int#) (ww1_s2cR :: GHC.Types.Float) -> - let { - g_a1cL [Dmd=Just L] :: GHC.Base.String -> GHC.Base.String - [LclId, Str=DmdType] - g_a1cL = - case ww1_s2cR of _ { GHC.Types.F# ww2_a25X -> - GHC.Float.$w$sshowSignedFloat1 - GHC.Float.$fShowFloat_$sshowFloat - CompanyDatatypes.$fShowCompany8 - ww2_a25X - } } in - case GHC.Prim.>=# ww_s2cN 11 of _ { - GHC.Types.False -> - \ (x_a1cM :: GHC.Base.String) -> - GHC.Base.++ - @ GHC.Types.Char CompanyDatatypes.$fShowCompany7 (g_a1cL x_a1cM); - GHC.Types.True -> - \ (x_a1cp :: GHC.Base.String) -> - GHC.Types.: - @ GHC.Types.Char - GHC.Show.shows11 - (GHC.Base.++ - @ GHC.Types.Char - CompanyDatatypes.$fShowCompany7 - (g_a1cL (GHC.Types.: @ GHC.Types.Char GHC.Show.shows10 x_a1cp))) - } - -CompanyDatatypes.$fShowSalary_$cshowsPrec [InlPrag=INLINE[0]] - :: GHC.Types.Int -> CompanyDatatypes.Salary -> GHC.Show.ShowS -[GblId, - Arity=2, - Str=DmdType U(L)U(L), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cshowsPrec4, TopLvl=True, - Arity=2, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (w_s2cL [Occ=Once!] :: GHC.Types.Int) - (w3_s2cP [Occ=Once!] :: CompanyDatatypes.Salary) -> - case w_s2cL of _ { GHC.Types.I# ww_s2cN [Occ=Once] -> - case w3_s2cP of _ { CompanyDatatypes.S ww1_s2cR [Occ=Once] -> - CompanyDatatypes.$w$cshowsPrec4 ww_s2cN ww1_s2cR - } - }}] -CompanyDatatypes.$fShowSalary_$cshowsPrec = - \ (w_s2cL :: GHC.Types.Int) (w3_s2cP :: CompanyDatatypes.Salary) -> - case w_s2cL of _ { GHC.Types.I# ww_s2cN -> - case w3_s2cP of _ { CompanyDatatypes.S ww1_s2cR -> - CompanyDatatypes.$w$cshowsPrec4 ww_s2cN ww1_s2cR - } - } - -CompanyDatatypes.$fShowSalary1 - :: CompanyDatatypes.Salary -> GHC.Show.ShowS -[GblId, - Arity=1, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [20] 40 0}] -CompanyDatatypes.$fShowSalary1 = - \ (w_s2cP :: CompanyDatatypes.Salary) -> - case w_s2cP of _ { CompanyDatatypes.S ww_s2cR -> - CompanyDatatypes.$w$cshowsPrec4 0 ww_s2cR - } - -CompanyDatatypes.$fShowSalary_$cshowList - :: [CompanyDatatypes.Salary] -> GHC.Show.ShowS -[GblId, - Arity=2, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [] 20 60}] -CompanyDatatypes.$fShowSalary_$cshowList = - GHC.Show.showList__ - @ CompanyDatatypes.Salary CompanyDatatypes.$fShowSalary1 - -CompanyDatatypes.$fShowSalary_$cshow - :: CompanyDatatypes.Salary -> GHC.Base.String -[GblId, - Arity=1, - Str=DmdType U(L), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (x_a1dj [Occ=Once] :: CompanyDatatypes.Salary) -> - CompanyDatatypes.$fShowSalary_$cshowsPrec - GHC.Show.shows26 x_a1dj (GHC.Types.[] @ GHC.Types.Char)}] -CompanyDatatypes.$fShowSalary_$cshow = - \ (x_a1dj :: CompanyDatatypes.Salary) -> - case x_a1dj of _ { CompanyDatatypes.S ww_s2cR -> - CompanyDatatypes.$w$cshowsPrec4 - 0 ww_s2cR (GHC.Types.[] @ GHC.Types.Char) - } - -CompanyDatatypes.$fShowSalary [InlPrag=[ALWAYS] CONLIKE] - :: GHC.Show.Show CompanyDatatypes.Salary -[GblId[DFunId], - Str=DmdType m, - Unf=DFun(arity=0) GHC.Show.D:Show [{CompanyDatatypes.$fShowSalary_$cshowsPrec}, - {CompanyDatatypes.$fShowSalary_$cshow}, - {CompanyDatatypes.$fShowSalary_$cshowList}]] -CompanyDatatypes.$fShowSalary = - GHC.Show.D:Show - @ CompanyDatatypes.Salary - CompanyDatatypes.$fShowSalary_$cshowsPrec - CompanyDatatypes.$fShowSalary_$cshow - CompanyDatatypes.$fShowSalary_$cshowList - -CompanyDatatypes.$fShowCompany6 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 40 0}] -CompanyDatatypes.$fShowCompany6 = GHC.CString.unpackCString# "E " - -CompanyDatatypes.$w$cshowsPrec2 - :: GHC.Prim.Int# - -> CompanyDatatypes.Person - -> CompanyDatatypes.Salary - -> GHC.Show.ShowS -[GblId, - Arity=3, - Str=DmdType LLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [0 20 20] 261 120}] -CompanyDatatypes.$w$cshowsPrec2 = - \ (ww_s2cY :: GHC.Prim.Int#) - (ww1_s2d2 :: CompanyDatatypes.Person) - (ww2_s2d3 :: CompanyDatatypes.Salary) -> - let { - g_X1m6 [Dmd=Just L] :: GHC.Base.String -> GHC.Base.String - [LclId, Str=DmdType] - g_X1m6 = - case ww2_s2d3 of _ { CompanyDatatypes.S ww3_s2cR -> - CompanyDatatypes.$w$cshowsPrec4 11 ww3_s2cR - } } in - let { - p_a1ck :: GHC.Show.ShowS - [LclId, Arity=1, Str=DmdType L] - p_a1ck = - \ (x_X1mc :: GHC.Base.String) -> - GHC.Base.++ - @ GHC.Types.Char - CompanyDatatypes.$fShowCompany6 - (case ww1_s2d2 of _ { CompanyDatatypes.P ww3_s2cE ww4_s2cF -> - CompanyDatatypes.$w$cshowsPrec3 - 11 - ww3_s2cE - ww4_s2cF - (GHC.Types.: @ GHC.Types.Char GHC.Show.showSpace1 (g_X1m6 x_X1mc)) - }) } in - case GHC.Prim.>=# ww_s2cY 11 of _ { - GHC.Types.False -> p_a1ck; - GHC.Types.True -> - \ (x_a1cp :: GHC.Base.String) -> - GHC.Types.: - @ GHC.Types.Char - GHC.Show.shows11 - (p_a1ck (GHC.Types.: @ GHC.Types.Char GHC.Show.shows10 x_a1cp)) - } - -CompanyDatatypes.$fShowEmployee_$cshowsPrec [InlPrag=INLINE[0]] - :: GHC.Types.Int -> CompanyDatatypes.Employee -> GHC.Show.ShowS -[GblId, - Arity=2, - Str=DmdType U(L)U(LL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cshowsPrec2, TopLvl=True, - Arity=2, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (w_s2cW [Occ=Once!] :: GHC.Types.Int) - (w3_s2d0 [Occ=Once!] :: CompanyDatatypes.Employee) -> - case w_s2cW of _ { GHC.Types.I# ww_s2cY [Occ=Once] -> - case w3_s2d0 - of _ - { CompanyDatatypes.E ww1_s2d2 [Occ=Once] ww2_s2d3 [Occ=Once] -> - CompanyDatatypes.$w$cshowsPrec2 ww_s2cY ww1_s2d2 ww2_s2d3 - } - }}] -CompanyDatatypes.$fShowEmployee_$cshowsPrec = - \ (w_s2cW :: GHC.Types.Int) - (w3_s2d0 :: CompanyDatatypes.Employee) -> - case w_s2cW of _ { GHC.Types.I# ww_s2cY -> - case w3_s2d0 of _ { CompanyDatatypes.E ww1_s2d2 ww2_s2d3 -> - CompanyDatatypes.$w$cshowsPrec2 ww_s2cY ww1_s2d2 ww2_s2d3 - } - } - -CompanyDatatypes.$fShowEmployee1 - :: CompanyDatatypes.Employee -> GHC.Show.ShowS -[GblId, - Arity=1, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [20] 50 0}] -CompanyDatatypes.$fShowEmployee1 = - \ (w_s2d0 :: CompanyDatatypes.Employee) -> - case w_s2d0 of _ { CompanyDatatypes.E ww_s2d2 ww1_s2d3 -> - CompanyDatatypes.$w$cshowsPrec2 0 ww_s2d2 ww1_s2d3 - } - -CompanyDatatypes.$fShowEmployee_$cshowList - :: [CompanyDatatypes.Employee] -> GHC.Show.ShowS -[GblId, - Arity=2, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [] 20 60}] -CompanyDatatypes.$fShowEmployee_$cshowList = - GHC.Show.showList__ - @ CompanyDatatypes.Employee CompanyDatatypes.$fShowEmployee1 - -CompanyDatatypes.$fShowEmployee_$cshow - :: CompanyDatatypes.Employee -> GHC.Base.String -[GblId, - Arity=1, - Str=DmdType U(LL), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (x_a1dj [Occ=Once] :: CompanyDatatypes.Employee) -> - CompanyDatatypes.$fShowEmployee_$cshowsPrec - GHC.Show.shows26 x_a1dj (GHC.Types.[] @ GHC.Types.Char)}] -CompanyDatatypes.$fShowEmployee_$cshow = - \ (x_a1dj :: CompanyDatatypes.Employee) -> - case x_a1dj of _ { CompanyDatatypes.E ww_s2d2 ww1_s2d3 -> - CompanyDatatypes.$w$cshowsPrec2 - 0 ww_s2d2 ww1_s2d3 (GHC.Types.[] @ GHC.Types.Char) - } - -CompanyDatatypes.$fShowEmployee [InlPrag=[ALWAYS] CONLIKE] - :: GHC.Show.Show CompanyDatatypes.Employee -[GblId[DFunId], - Str=DmdType m, - Unf=DFun(arity=0) GHC.Show.D:Show [{CompanyDatatypes.$fShowEmployee_$cshowsPrec}, - {CompanyDatatypes.$fShowEmployee_$cshow}, - {CompanyDatatypes.$fShowEmployee_$cshowList}]] -CompanyDatatypes.$fShowEmployee = - GHC.Show.D:Show - @ CompanyDatatypes.Employee - CompanyDatatypes.$fShowEmployee_$cshowsPrec - CompanyDatatypes.$fShowEmployee_$cshow - CompanyDatatypes.$fShowEmployee_$cshowList - -CompanyDatatypes.$fShowUnit1 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 40 0}] -CompanyDatatypes.$fShowUnit1 = GHC.CString.unpackCString# "DU " - -CompanyDatatypes.$fShowUnit2 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 40 0}] -CompanyDatatypes.$fShowUnit2 = GHC.CString.unpackCString# "PU " - -CompanyDatatypes.$fShowCompany3 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 40 0}] -CompanyDatatypes.$fShowCompany3 = GHC.CString.unpackCString# "D " - -Rec { -CompanyDatatypes.$w$cshowsPrec1 - :: GHC.Prim.Int# - -> CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> GHC.Show.ShowS -[GblId, - Arity=4, - Str=DmdType LLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=4, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [0 0 20 0] 371 120}] -CompanyDatatypes.$w$cshowsPrec1 = - \ (ww_s2da :: GHC.Prim.Int#) - (ww1_s2de :: CompanyDatatypes.Name) - (ww2_s2df :: CompanyDatatypes.Manager) - (ww3_s2dg :: [CompanyDatatypes.Unit]) -> - let { - f_X1wk [Dmd=Just L] :: GHC.Base.String -> GHC.Base.String - [LclId, Str=DmdType] - f_X1wk = - case ww2_s2df of _ { CompanyDatatypes.E ww4_s2d2 ww5_s2d3 -> - CompanyDatatypes.$w$cshowsPrec2 11 ww4_s2d2 ww5_s2d3 - } } in - let { - g_a1cL :: GHC.Base.String -> GHC.Base.String - [LclId, Arity=1, Str=DmdType L] - g_a1cL = - \ (x_X1mG :: GHC.Base.String) -> - GHC.Types.: - @ GHC.Types.Char - GHC.Show.$fShowChar1 - (GHC.Show.showLitString - ww1_s2de - (GHC.Types.: - @ GHC.Types.Char - GHC.Show.$fShowChar1 - (GHC.Types.: - @ GHC.Types.Char - GHC.Show.showSpace1 - (f_X1wk - (GHC.Types.: - @ GHC.Types.Char - GHC.Show.showSpace1 - (GHC.Show.showList__ - @ CompanyDatatypes.Unit - CompanyDatatypes.$fShowCompany4 - ww3_s2dg - x_X1mG)))))) } in - case GHC.Prim.>=# ww_s2da 11 of _ { - GHC.Types.False -> - \ (x_X1mI :: GHC.Base.String) -> - GHC.Base.++ - @ GHC.Types.Char CompanyDatatypes.$fShowCompany3 (g_a1cL x_X1mI); - GHC.Types.True -> - \ (x_a1cp :: GHC.Base.String) -> - GHC.Types.: - @ GHC.Types.Char - GHC.Show.shows11 - (GHC.Base.++ - @ GHC.Types.Char - CompanyDatatypes.$fShowCompany3 - (g_a1cL (GHC.Types.: @ GHC.Types.Char GHC.Show.shows10 x_a1cp))) - } - -CompanyDatatypes.$w$cshowsPrec5 - :: GHC.Prim.Int# -> CompanyDatatypes.Unit -> GHC.Show.ShowS -[GblId, - Arity=2, - Str=DmdType LS, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [0 251] 472 240}] -CompanyDatatypes.$w$cshowsPrec5 = - \ (ww_s2dn :: GHC.Prim.Int#) (w_s2dp :: CompanyDatatypes.Unit) -> - case w_s2dp of _ { - CompanyDatatypes.PU b1_aSL -> - let { - g_a1cL [Dmd=Just L] :: GHC.Base.String -> GHC.Base.String - [LclId, Str=DmdType] - g_a1cL = - case b1_aSL of _ { CompanyDatatypes.E ww1_s2d2 ww2_s2d3 -> - CompanyDatatypes.$w$cshowsPrec2 11 ww1_s2d2 ww2_s2d3 - } } in - case GHC.Prim.>=# ww_s2dn 11 of _ { - GHC.Types.False -> - \ (x_a1cM :: GHC.Base.String) -> - GHC.Base.++ - @ GHC.Types.Char CompanyDatatypes.$fShowUnit2 (g_a1cL x_a1cM); - GHC.Types.True -> - \ (x_a1cp :: GHC.Base.String) -> - GHC.Types.: - @ GHC.Types.Char - GHC.Show.shows11 - (GHC.Base.++ - @ GHC.Types.Char - CompanyDatatypes.$fShowUnit2 - (g_a1cL (GHC.Types.: @ GHC.Types.Char GHC.Show.shows10 x_a1cp))) - }; - CompanyDatatypes.DU b1_aSN -> - let { - g_a1cL [Dmd=Just L] :: GHC.Base.String -> GHC.Base.String - [LclId, Str=DmdType] - g_a1cL = - case b1_aSN of _ { CompanyDatatypes.D ww1_s2de ww2_s2df ww3_s2dg -> - CompanyDatatypes.$w$cshowsPrec1 11 ww1_s2de ww2_s2df ww3_s2dg - } } in - case GHC.Prim.>=# ww_s2dn 11 of _ { - GHC.Types.False -> - \ (x_a1cM :: GHC.Base.String) -> - GHC.Base.++ - @ GHC.Types.Char CompanyDatatypes.$fShowUnit1 (g_a1cL x_a1cM); - GHC.Types.True -> - \ (x_a1cp :: GHC.Base.String) -> - GHC.Types.: - @ GHC.Types.Char - GHC.Show.shows11 - (GHC.Base.++ - @ GHC.Types.Char - CompanyDatatypes.$fShowUnit1 - (g_a1cL (GHC.Types.: @ GHC.Types.Char GHC.Show.shows10 x_a1cp))) - } - } - -CompanyDatatypes.$fShowCompany4 [Occ=LoopBreaker] - :: CompanyDatatypes.Unit -> GHC.Show.ShowS -[GblId, Arity=1, Str=DmdType] -CompanyDatatypes.$fShowCompany4 = - \ (w_s2dp :: CompanyDatatypes.Unit) -> - CompanyDatatypes.$w$cshowsPrec5 0 w_s2dp -end Rec } - -CompanyDatatypes.$fShowDept_$cshowsPrec [InlPrag=INLINE[0]] - :: GHC.Types.Int -> CompanyDatatypes.Dept -> GHC.Show.ShowS -[GblId, - Arity=2, - Str=DmdType U(L)U(LLL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cshowsPrec1, TopLvl=True, - Arity=2, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (w_s2d8 [Occ=Once!] :: GHC.Types.Int) - (w3_s2dc [Occ=Once!] :: CompanyDatatypes.Dept) -> - case w_s2d8 of _ { GHC.Types.I# ww_s2da [Occ=Once] -> - case w3_s2dc - of _ - { CompanyDatatypes.D ww1_s2de [Occ=Once] - ww2_s2df [Occ=Once] - ww3_s2dg [Occ=Once] -> - CompanyDatatypes.$w$cshowsPrec1 ww_s2da ww1_s2de ww2_s2df ww3_s2dg - } - }}] -CompanyDatatypes.$fShowDept_$cshowsPrec = - \ (w_s2d8 :: GHC.Types.Int) (w3_s2dc :: CompanyDatatypes.Dept) -> - case w_s2d8 of _ { GHC.Types.I# ww_s2da -> - case w3_s2dc - of _ { CompanyDatatypes.D ww1_s2de ww2_s2df ww3_s2dg -> - CompanyDatatypes.$w$cshowsPrec1 ww_s2da ww1_s2de ww2_s2df ww3_s2dg - } - } - -CompanyDatatypes.$fShowUnit_$cshowsPrec [InlPrag=INLINE[0]] - :: GHC.Types.Int -> CompanyDatatypes.Unit -> GHC.Show.ShowS -[GblId, - Arity=2, - Str=DmdType U(L)S, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cshowsPrec5, TopLvl=True, - Arity=2, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (w_s2dl [Occ=Once!] :: GHC.Types.Int) - (w3_s2dp [Occ=Once] :: CompanyDatatypes.Unit) -> - case w_s2dl of _ { GHC.Types.I# ww_s2dn [Occ=Once] -> - CompanyDatatypes.$w$cshowsPrec5 ww_s2dn w3_s2dp - }}] -CompanyDatatypes.$fShowUnit_$cshowsPrec = - \ (w_s2dl :: GHC.Types.Int) (w3_s2dp :: CompanyDatatypes.Unit) -> - case w_s2dl of _ { GHC.Types.I# ww_s2dn -> - CompanyDatatypes.$w$cshowsPrec5 ww_s2dn w3_s2dp - } - -CompanyDatatypes.$fShowUnit_$cshow - :: CompanyDatatypes.Unit -> GHC.Base.String -[GblId, - Arity=1, - Str=DmdType S, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [0] 40 0}] -CompanyDatatypes.$fShowUnit_$cshow = - \ (x_a1dj :: CompanyDatatypes.Unit) -> - CompanyDatatypes.$w$cshowsPrec5 - 0 x_a1dj (GHC.Types.[] @ GHC.Types.Char) - -CompanyDatatypes.$fShowUnit_$cshowList - :: [CompanyDatatypes.Unit] -> GHC.Show.ShowS -[GblId, - Arity=2, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [] 20 60}] -CompanyDatatypes.$fShowUnit_$cshowList = - GHC.Show.showList__ - @ CompanyDatatypes.Unit CompanyDatatypes.$fShowCompany4 - -CompanyDatatypes.$fShowUnit [InlPrag=[ALWAYS] CONLIKE] - :: GHC.Show.Show CompanyDatatypes.Unit -[GblId[DFunId], - Str=DmdType m, - Unf=DFun(arity=0) GHC.Show.D:Show [{CompanyDatatypes.$fShowUnit_$cshowsPrec}, - {CompanyDatatypes.$fShowUnit_$cshow}, - {CompanyDatatypes.$fShowUnit_$cshowList}]] -CompanyDatatypes.$fShowUnit = - GHC.Show.D:Show - @ CompanyDatatypes.Unit - CompanyDatatypes.$fShowUnit_$cshowsPrec - CompanyDatatypes.$fShowUnit_$cshow - CompanyDatatypes.$fShowUnit_$cshowList - -CompanyDatatypes.$fShowCompany2 - :: CompanyDatatypes.Dept -> GHC.Show.ShowS -[GblId, - Arity=1, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [20] 60 0}] -CompanyDatatypes.$fShowCompany2 = - \ (w_s2dc :: CompanyDatatypes.Dept) -> - case w_s2dc of _ { CompanyDatatypes.D ww_s2de ww1_s2df ww2_s2dg -> - CompanyDatatypes.$w$cshowsPrec1 0 ww_s2de ww1_s2df ww2_s2dg - } - -CompanyDatatypes.$fShowDept_$cshowList - :: [CompanyDatatypes.Dept] -> GHC.Show.ShowS -[GblId, - Arity=2, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [] 20 60}] -CompanyDatatypes.$fShowDept_$cshowList = - GHC.Show.showList__ - @ CompanyDatatypes.Dept CompanyDatatypes.$fShowCompany2 - -CompanyDatatypes.$fShowDept_$cshow - :: CompanyDatatypes.Dept -> GHC.Base.String -[GblId, - Arity=1, - Str=DmdType U(LLL), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (x_a1dj [Occ=Once] :: CompanyDatatypes.Dept) -> - CompanyDatatypes.$fShowDept_$cshowsPrec - GHC.Show.shows26 x_a1dj (GHC.Types.[] @ GHC.Types.Char)}] -CompanyDatatypes.$fShowDept_$cshow = - \ (x_a1dj :: CompanyDatatypes.Dept) -> - case x_a1dj of _ { CompanyDatatypes.D ww_s2de ww1_s2df ww2_s2dg -> - CompanyDatatypes.$w$cshowsPrec1 - 0 ww_s2de ww1_s2df ww2_s2dg (GHC.Types.[] @ GHC.Types.Char) - } - -CompanyDatatypes.$fShowDept [InlPrag=[ALWAYS] CONLIKE] - :: GHC.Show.Show CompanyDatatypes.Dept -[GblId[DFunId], - Str=DmdType m, - Unf=DFun(arity=0) GHC.Show.D:Show [{CompanyDatatypes.$fShowDept_$cshowsPrec}, - {CompanyDatatypes.$fShowDept_$cshow}, - {CompanyDatatypes.$fShowDept_$cshowList}]] -CompanyDatatypes.$fShowDept = - GHC.Show.D:Show - @ CompanyDatatypes.Dept - CompanyDatatypes.$fShowDept_$cshowsPrec - CompanyDatatypes.$fShowDept_$cshow - CompanyDatatypes.$fShowDept_$cshowList - -CompanyDatatypes.$fShowCompany9 :: [GHC.Types.Char] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 40 0}] -CompanyDatatypes.$fShowCompany9 = GHC.CString.unpackCString# "C " - -CompanyDatatypes.$w$cshowsPrec - :: GHC.Prim.Int# - -> [CompanyDatatypes.Dept] -> GHC.Base.String -> GHC.Base.String -[GblId, - Arity=3, - Str=DmdType LLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [0 0 0] 181 30}] -CompanyDatatypes.$w$cshowsPrec = - \ (ww_s2dw :: GHC.Prim.Int#) - (ww1_s2dA :: [CompanyDatatypes.Dept]) - (w_s2dC :: GHC.Base.String) -> - case GHC.Prim.>=# ww_s2dw 11 of _ { - GHC.Types.False -> - GHC.Base.++ - @ GHC.Types.Char - CompanyDatatypes.$fShowCompany9 - (GHC.Show.showList__ - @ CompanyDatatypes.Dept - CompanyDatatypes.$fShowCompany2 - ww1_s2dA - w_s2dC); - GHC.Types.True -> - GHC.Types.: - @ GHC.Types.Char - GHC.Show.shows11 - (GHC.Base.++ - @ GHC.Types.Char - CompanyDatatypes.$fShowCompany9 - (GHC.Show.showList__ - @ CompanyDatatypes.Dept - CompanyDatatypes.$fShowCompany2 - ww1_s2dA - (GHC.Types.: @ GHC.Types.Char GHC.Show.shows10 w_s2dC))) - } - -CompanyDatatypes.$fShowCompany_$cshowsPrec [InlPrag=INLINE[0]] - :: GHC.Types.Int -> CompanyDatatypes.Company -> GHC.Show.ShowS -[GblId, - Arity=3, - Str=DmdType U(L)U(L)L, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cshowsPrec, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (w_s2du [Occ=Once!] :: GHC.Types.Int) - (w3_s2dy [Occ=Once!] :: CompanyDatatypes.Company) - (w4_s2dC [Occ=Once] :: GHC.Base.String) -> - case w_s2du of _ { GHC.Types.I# ww_s2dw [Occ=Once] -> - case w3_s2dy of _ { CompanyDatatypes.C ww1_s2dA [Occ=Once] -> - CompanyDatatypes.$w$cshowsPrec ww_s2dw ww1_s2dA w4_s2dC - } - }}] -CompanyDatatypes.$fShowCompany_$cshowsPrec = - \ (w_s2du :: GHC.Types.Int) - (w3_s2dy :: CompanyDatatypes.Company) - (w4_s2dC :: GHC.Base.String) -> - case w_s2du of _ { GHC.Types.I# ww_s2dw -> - case w3_s2dy of _ { CompanyDatatypes.C ww1_s2dA -> - CompanyDatatypes.$w$cshowsPrec ww_s2dw ww1_s2dA w4_s2dC - } - } - -CompanyDatatypes.$fShowCompany1 - :: CompanyDatatypes.Company -> GHC.Show.ShowS -[GblId, - Arity=2, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [20 0] 50 0}] -CompanyDatatypes.$fShowCompany1 = - \ (w_s2dy :: CompanyDatatypes.Company) - (w3_s2dC :: GHC.Base.String) -> - case w_s2dy of _ { CompanyDatatypes.C ww_s2dA -> - CompanyDatatypes.$w$cshowsPrec 0 ww_s2dA w3_s2dC - } - -CompanyDatatypes.$fShowCompany_$cshowList - :: [CompanyDatatypes.Company] -> GHC.Show.ShowS -[GblId, - Arity=2, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [] 20 60}] -CompanyDatatypes.$fShowCompany_$cshowList = - GHC.Show.showList__ - @ CompanyDatatypes.Company CompanyDatatypes.$fShowCompany1 - -CompanyDatatypes.$fShowCompany_$cshow - :: CompanyDatatypes.Company -> GHC.Base.String -[GblId, - Arity=1, - Str=DmdType U(L), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (x_a1dj [Occ=Once] :: CompanyDatatypes.Company) -> - CompanyDatatypes.$fShowCompany_$cshowsPrec - GHC.Show.shows26 x_a1dj (GHC.Types.[] @ GHC.Types.Char)}] -CompanyDatatypes.$fShowCompany_$cshow = - \ (x_a1dj :: CompanyDatatypes.Company) -> - case x_a1dj of _ { CompanyDatatypes.C ww_s2dA -> - CompanyDatatypes.$w$cshowsPrec - 0 ww_s2dA (GHC.Types.[] @ GHC.Types.Char) - } - -CompanyDatatypes.$fShowCompany [InlPrag=[ALWAYS] CONLIKE] - :: GHC.Show.Show CompanyDatatypes.Company -[GblId[DFunId], - Str=DmdType m, - Unf=DFun(arity=0) GHC.Show.D:Show [{CompanyDatatypes.$fShowCompany_$cshowsPrec}, - {CompanyDatatypes.$fShowCompany_$cshow}, - {CompanyDatatypes.$fShowCompany_$cshowList}]] -CompanyDatatypes.$fShowCompany = - GHC.Show.D:Show - @ CompanyDatatypes.Company - CompanyDatatypes.$fShowCompany_$cshowsPrec - CompanyDatatypes.$fShowCompany_$cshow - CompanyDatatypes.$fShowCompany_$cshowList - -CompanyDatatypes.$fEqEmployee_$c==1 - :: CompanyDatatypes.Salary - -> CompanyDatatypes.Salary -> GHC.Types.Bool -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType U(U(L))U(U(L)), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (ds_d14N [Occ=Once!] :: CompanyDatatypes.Salary) - (ds1_d14O [Occ=Once!] :: CompanyDatatypes.Salary) -> - case ds_d14N of _ { CompanyDatatypes.S a22_aRZ [Occ=Once] -> - case ds1_d14O of _ { CompanyDatatypes.S b1_aS0 [Occ=Once] -> - GHC.Classes.$fEqFloat_$c== a22_aRZ b1_aS0 - } - }}] -CompanyDatatypes.$fEqEmployee_$c==1 = - \ (ds_d14N :: CompanyDatatypes.Salary) - (ds1_d14O :: CompanyDatatypes.Salary) -> - case ds_d14N of _ { CompanyDatatypes.S a22_aRZ -> - case ds1_d14O of _ { CompanyDatatypes.S b1_aS0 -> - GHC.Classes.$fEqFloat_$c== a22_aRZ b1_aS0 - } - } - -CompanyDatatypes.$fEqSalary_$c/= - :: CompanyDatatypes.Salary - -> CompanyDatatypes.Salary -> GHC.Types.Bool -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType U(U(L))U(U(L)), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (a22_aS1 [Occ=Once!] :: CompanyDatatypes.Salary) - (b_aS2 [Occ=Once!] :: CompanyDatatypes.Salary) -> - case a22_aS1 of _ { CompanyDatatypes.S a23_aRZ [Occ=Once!] -> - case b_aS2 of _ { CompanyDatatypes.S b1_aS0 [Occ=Once!] -> - case a23_aRZ of _ { GHC.Types.F# x_a1dT [Occ=Once] -> - case b1_aS0 of _ { GHC.Types.F# y_a1dX [Occ=Once] -> - case GHC.Prim.eqFloat# x_a1dT y_a1dX of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> GHC.Types.False - } - } - } - } - }}] -CompanyDatatypes.$fEqSalary_$c/= = - \ (a22_aS1 :: CompanyDatatypes.Salary) - (b_aS2 :: CompanyDatatypes.Salary) -> - case a22_aS1 of _ { CompanyDatatypes.S a23_aRZ -> - case b_aS2 of _ { CompanyDatatypes.S b1_aS0 -> - case a23_aRZ of _ { GHC.Types.F# x_a1dT -> - case b1_aS0 of _ { GHC.Types.F# y_a1dX -> - case GHC.Prim.eqFloat# x_a1dT y_a1dX of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> GHC.Types.False - } - } - } - } - } - -CompanyDatatypes.$fEqSalary [InlPrag=[ALWAYS] CONLIKE] - :: GHC.Classes.Eq CompanyDatatypes.Salary -[GblId[DFunId], - Caf=NoCafRefs, - Str=DmdType m, - Unf=DFun(arity=0) GHC.Classes.D:Eq [{CompanyDatatypes.$fEqEmployee_$c==1}, - {CompanyDatatypes.$fEqSalary_$c/=}]] -CompanyDatatypes.$fEqSalary = - GHC.Classes.D:Eq - @ CompanyDatatypes.Salary - CompanyDatatypes.$fEqEmployee_$c==1 - CompanyDatatypes.$fEqSalary_$c/= - -CompanyDatatypes.$w$c==1 - :: CompanyDatatypes.Name - -> CompanyDatatypes.Address - -> CompanyDatatypes.Salary - -> CompanyDatatypes.Name - -> CompanyDatatypes.Address - -> CompanyDatatypes.Salary - -> GHC.Types.Bool -[GblId, - Arity=6, - Caf=NoCafRefs, - Str=DmdType SLLSLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=6, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [0 0 0 0 0 0] 130 20}] -CompanyDatatypes.$w$c==1 = - \ (ww_s2dK :: CompanyDatatypes.Name) - (ww1_s2dL :: CompanyDatatypes.Address) - (ww2_s2dN :: CompanyDatatypes.Salary) - (ww3_s2dT :: CompanyDatatypes.Name) - (ww4_s2dU :: CompanyDatatypes.Address) - (ww5_s2dW :: CompanyDatatypes.Salary) -> - case GHC.Base.eqString ww_s2dK ww3_s2dT of _ { - GHC.Types.False -> GHC.Types.False; - GHC.Types.True -> - case GHC.Base.eqString ww1_s2dL ww4_s2dU of _ { - GHC.Types.False -> GHC.Types.False; - GHC.Types.True -> - CompanyDatatypes.$fEqEmployee_$c==1 ww2_s2dN ww5_s2dW - } - } - -CompanyDatatypes.$fEqEmployee_$c== [InlPrag=INLINE[0]] - :: CompanyDatatypes.Employee - -> CompanyDatatypes.Employee -> GHC.Types.Bool -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType U(U(SL)L)U(U(SL)L), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$c==1, TopLvl=True, Arity=2, - Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (w_s2dG [Occ=Once!] :: CompanyDatatypes.Employee) - (w3_s2dP [Occ=Once!] :: CompanyDatatypes.Employee) -> - case w_s2dG - of _ - { CompanyDatatypes.E ww_s2dI [Occ=Once!] ww1_s2dN [Occ=Once] -> - case ww_s2dI - of _ - { CompanyDatatypes.P ww3_s2dK [Occ=Once] ww4_s2dL [Occ=Once] -> - case w3_s2dP - of _ - { CompanyDatatypes.E ww5_s2dR [Occ=Once!] ww6_s2dW [Occ=Once] -> - case ww5_s2dR - of _ - { CompanyDatatypes.P ww8_s2dT [Occ=Once] ww9_s2dU [Occ=Once] -> - CompanyDatatypes.$w$c==1 - ww3_s2dK ww4_s2dL ww1_s2dN ww8_s2dT ww9_s2dU ww6_s2dW - } - } - } - }}] -CompanyDatatypes.$fEqEmployee_$c== = - \ (w_s2dG :: CompanyDatatypes.Employee) - (w3_s2dP :: CompanyDatatypes.Employee) -> - case w_s2dG of _ { CompanyDatatypes.E ww_s2dI ww1_s2dN -> - case ww_s2dI of _ { CompanyDatatypes.P ww3_s2dK ww4_s2dL -> - case w3_s2dP of _ { CompanyDatatypes.E ww5_s2dR ww6_s2dW -> - case ww5_s2dR of _ { CompanyDatatypes.P ww8_s2dT ww9_s2dU -> - CompanyDatatypes.$w$c==1 - ww3_s2dK ww4_s2dL ww1_s2dN ww8_s2dT ww9_s2dU ww6_s2dW - } - } - } - } - -CompanyDatatypes.$fEqEmployee_$c/= - :: CompanyDatatypes.Employee - -> CompanyDatatypes.Employee -> GHC.Types.Bool -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType U(U(SL)L)U(U(SL)L), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (a22_aSt [Occ=Once] :: CompanyDatatypes.Employee) - (b_aSu [Occ=Once] :: CompanyDatatypes.Employee) -> - case CompanyDatatypes.$fEqEmployee_$c== a22_aSt b_aSu of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> GHC.Types.False - }}] -CompanyDatatypes.$fEqEmployee_$c/= = - \ (a22_aSt :: CompanyDatatypes.Employee) - (b_aSu :: CompanyDatatypes.Employee) -> - case a22_aSt of _ { CompanyDatatypes.E ww_s2dI ww1_s2dN -> - case ww_s2dI of _ { CompanyDatatypes.P ww3_s2dK ww4_s2dL -> - case b_aSu of _ { CompanyDatatypes.E ww5_s2dR ww6_s2dW -> - case ww5_s2dR of _ { CompanyDatatypes.P ww8_s2dT ww9_s2dU -> - case GHC.Base.eqString ww3_s2dK ww8_s2dT of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> - case GHC.Base.eqString ww4_s2dL ww9_s2dU of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> - case ww1_s2dN of _ { CompanyDatatypes.S a23_aRZ -> - case ww6_s2dW of _ { CompanyDatatypes.S b1_aS0 -> - case a23_aRZ of _ { GHC.Types.F# x_a1dT -> - case b1_aS0 of _ { GHC.Types.F# y_a1dX -> - case GHC.Prim.eqFloat# x_a1dT y_a1dX of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> GHC.Types.False - } - } - } - } - } - } - } - } - } - } - } - -CompanyDatatypes.$fEqEmployee [InlPrag=[ALWAYS] CONLIKE] - :: GHC.Classes.Eq CompanyDatatypes.Employee -[GblId[DFunId], - Caf=NoCafRefs, - Str=DmdType m, - Unf=DFun(arity=0) GHC.Classes.D:Eq [{CompanyDatatypes.$fEqEmployee_$c==}, - {CompanyDatatypes.$fEqEmployee_$c/=}]] -CompanyDatatypes.$fEqEmployee = - GHC.Classes.D:Eq - @ CompanyDatatypes.Employee - CompanyDatatypes.$fEqEmployee_$c== - CompanyDatatypes.$fEqEmployee_$c/= - -Rec { -CompanyDatatypes.$fEqUnit [InlPrag=[ALWAYS] CONLIKE] - :: GHC.Classes.Eq CompanyDatatypes.Unit -[GblId[DFunId], - Caf=NoCafRefs, - Str=DmdType m, - Unf=DFun(arity=0) GHC.Classes.D:Eq [{CompanyDatatypes.$fEqUnit_$c==}, - {CompanyDatatypes.$fEqUnit_$c/=}]] -CompanyDatatypes.$fEqUnit = - GHC.Classes.D:Eq - @ CompanyDatatypes.Unit - CompanyDatatypes.$fEqUnit_$c== - CompanyDatatypes.$fEqUnit_$c/= - -CompanyDatatypes.$w$c== - :: CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> GHC.Types.Bool -[GblId, - Arity=6, - Caf=NoCafRefs, - Str=DmdType SLLSLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=6, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [0 20 0 0 20 0] 291 40}] -CompanyDatatypes.$w$c== = - \ (ww_s2e3 :: CompanyDatatypes.Name) - (ww1_s2e4 :: CompanyDatatypes.Manager) - (ww2_s2e5 :: [CompanyDatatypes.Unit]) - (ww3_s2e9 :: CompanyDatatypes.Name) - (ww4_s2ea :: CompanyDatatypes.Manager) - (ww5_s2eb :: [CompanyDatatypes.Unit]) -> - case GHC.Base.eqString ww_s2e3 ww3_s2e9 of _ { - GHC.Types.False -> GHC.Types.False; - GHC.Types.True -> - case ww1_s2e4 of _ { CompanyDatatypes.E ww6_s2dI ww7_s2dN -> - case ww6_s2dI of _ { CompanyDatatypes.P ww9_s2dK ww10_s2dL -> - case ww4_s2ea of _ { CompanyDatatypes.E ww11_s2dR ww12_s2dW -> - case ww11_s2dR of _ { CompanyDatatypes.P ww14_s2dT ww15_s2dU -> - case GHC.Base.eqString ww9_s2dK ww14_s2dT of _ { - GHC.Types.False -> GHC.Types.False; - GHC.Types.True -> - case GHC.Base.eqString ww10_s2dL ww15_s2dU of _ { - GHC.Types.False -> GHC.Types.False; - GHC.Types.True -> - case ww7_s2dN of _ { CompanyDatatypes.S a22_aRZ -> - case ww12_s2dW of _ { CompanyDatatypes.S b1_aS0 -> - case a22_aRZ of _ { GHC.Types.F# x_a1dT -> - case b1_aS0 of _ { GHC.Types.F# y_a1dX -> - case GHC.Prim.eqFloat# x_a1dT y_a1dX of _ { - GHC.Types.False -> GHC.Types.False; - GHC.Types.True -> - GHC.Classes.$fEq[]_$c== - @ CompanyDatatypes.Unit CompanyDatatypes.$fEqUnit ww2_s2e5 ww5_s2eb - } - } - } - } - } - } - } - } - } - } - } - } - -CompanyDatatypes.$fEqUnit_$c/= [Occ=LoopBreaker] - :: CompanyDatatypes.Unit -> CompanyDatatypes.Unit -> GHC.Types.Bool -[GblId, Arity=2, Caf=NoCafRefs, Str=DmdType SS] -CompanyDatatypes.$fEqUnit_$c/= = - \ (a22_aSI :: CompanyDatatypes.Unit) - (b_aSJ :: CompanyDatatypes.Unit) -> - case a22_aSI of _ { - CompanyDatatypes.PU a23_aSE -> - case b_aSJ of _ { - CompanyDatatypes.PU b1_aSF -> - case a23_aSE of _ { CompanyDatatypes.E ww_s2dI ww1_s2dN -> - case ww_s2dI of _ { CompanyDatatypes.P ww3_s2dK ww4_s2dL -> - case b1_aSF of _ { CompanyDatatypes.E ww5_s2dR ww6_s2dW -> - case ww5_s2dR of _ { CompanyDatatypes.P ww8_s2dT ww9_s2dU -> - case GHC.Base.eqString ww3_s2dK ww8_s2dT of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> - case GHC.Base.eqString ww4_s2dL ww9_s2dU of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> - case ww1_s2dN of _ { CompanyDatatypes.S a24_aRZ -> - case ww6_s2dW of _ { CompanyDatatypes.S b2_aS0 -> - case a24_aRZ of _ { GHC.Types.F# x_a1dT -> - case b2_aS0 of _ { GHC.Types.F# y_a1dX -> - case GHC.Prim.eqFloat# x_a1dT y_a1dX of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> GHC.Types.False - } - } - } - } - } - } - } - } - } - } - }; - CompanyDatatypes.DU ipv_s1e5 -> GHC.Types.True - }; - CompanyDatatypes.DU a23_aSG -> - case b_aSJ of _ { - CompanyDatatypes.PU ipv_s1e8 -> GHC.Types.True; - CompanyDatatypes.DU b1_aSH -> - case a23_aSG of _ { CompanyDatatypes.D ww_s2e3 ww1_s2e4 ww2_s2e5 -> - case b1_aSH of _ { CompanyDatatypes.D ww3_s2e9 ww4_s2ea ww5_s2eb -> - case CompanyDatatypes.$w$c== - ww_s2e3 ww1_s2e4 ww2_s2e5 ww3_s2e9 ww4_s2ea ww5_s2eb - of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> GHC.Types.False - } - } - } - } - } - -CompanyDatatypes.$fEqDept_$c== [InlPrag=INLINE[0]] - :: CompanyDatatypes.Dept -> CompanyDatatypes.Dept -> GHC.Types.Bool -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType U(SLL)U(SLL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$c==, TopLvl=True, Arity=2, - Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (w_s2e1 [Occ=Once!] :: CompanyDatatypes.Dept) - (w3_s2e7 [Occ=Once!] :: CompanyDatatypes.Dept) -> - case w_s2e1 - of _ - { CompanyDatatypes.D ww_s2e3 [Occ=Once] - ww1_s2e4 [Occ=Once] - ww2_s2e5 [Occ=Once] -> - case w3_s2e7 - of _ - { CompanyDatatypes.D ww3_s2e9 [Occ=Once] - ww4_s2ea [Occ=Once] - ww5_s2eb [Occ=Once] -> - CompanyDatatypes.$w$c== - ww_s2e3 ww1_s2e4 ww2_s2e5 ww3_s2e9 ww4_s2ea ww5_s2eb - } - }}] -CompanyDatatypes.$fEqDept_$c== = - \ (w_s2e1 :: CompanyDatatypes.Dept) - (w3_s2e7 :: CompanyDatatypes.Dept) -> - case w_s2e1 of _ { CompanyDatatypes.D ww_s2e3 ww1_s2e4 ww2_s2e5 -> - case w3_s2e7 - of _ { CompanyDatatypes.D ww3_s2e9 ww4_s2ea ww5_s2eb -> - CompanyDatatypes.$w$c== - ww_s2e3 ww1_s2e4 ww2_s2e5 ww3_s2e9 ww4_s2ea ww5_s2eb - } - } - -CompanyDatatypes.$fEqUnit_$c== [Occ=LoopBreaker] - :: CompanyDatatypes.Unit -> CompanyDatatypes.Unit -> GHC.Types.Bool -[GblId, Arity=2, Caf=NoCafRefs, Str=DmdType SS] -CompanyDatatypes.$fEqUnit_$c== = - \ (ds_d15s :: CompanyDatatypes.Unit) - (ds1_d15t :: CompanyDatatypes.Unit) -> - case ds_d15s of _ { - CompanyDatatypes.PU a22_aSE -> - case ds1_d15t of _ { - CompanyDatatypes.PU b1_aSF -> - CompanyDatatypes.$fEqEmployee_$c== a22_aSE b1_aSF; - CompanyDatatypes.DU ipv_s1e5 -> GHC.Types.False - }; - CompanyDatatypes.DU a22_aSG -> - case ds1_d15t of _ { - CompanyDatatypes.PU ipv_s1e8 -> GHC.Types.False; - CompanyDatatypes.DU b1_aSH -> - CompanyDatatypes.$fEqDept_$c== a22_aSG b1_aSH - } - } -end Rec } - -CompanyDatatypes.$fEqDept_$c/= - :: CompanyDatatypes.Dept -> CompanyDatatypes.Dept -> GHC.Types.Bool -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType U(SLL)U(SLL), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (a22_aT3 [Occ=Once] :: CompanyDatatypes.Dept) - (b_aT4 [Occ=Once] :: CompanyDatatypes.Dept) -> - case CompanyDatatypes.$fEqDept_$c== a22_aT3 b_aT4 of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> GHC.Types.False - }}] -CompanyDatatypes.$fEqDept_$c/= = - \ (a22_aT3 :: CompanyDatatypes.Dept) - (b_aT4 :: CompanyDatatypes.Dept) -> - case a22_aT3 of _ { CompanyDatatypes.D ww_s2e3 ww1_s2e4 ww2_s2e5 -> - case b_aT4 of _ { CompanyDatatypes.D ww3_s2e9 ww4_s2ea ww5_s2eb -> - case CompanyDatatypes.$w$c== - ww_s2e3 ww1_s2e4 ww2_s2e5 ww3_s2e9 ww4_s2ea ww5_s2eb - of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> GHC.Types.False - } - } - } - -CompanyDatatypes.$fEqDept [InlPrag=[ALWAYS] CONLIKE] - :: GHC.Classes.Eq CompanyDatatypes.Dept -[GblId[DFunId], - Caf=NoCafRefs, - Str=DmdType m, - Unf=DFun(arity=0) GHC.Classes.D:Eq [{CompanyDatatypes.$fEqDept_$c==}, - {CompanyDatatypes.$fEqDept_$c/=}]] -CompanyDatatypes.$fEqDept = - GHC.Classes.D:Eq - @ CompanyDatatypes.Dept - CompanyDatatypes.$fEqDept_$c== - CompanyDatatypes.$fEqDept_$c/= - -CompanyDatatypes.$fEqCompany_$c== - :: CompanyDatatypes.Company - -> CompanyDatatypes.Company -> GHC.Types.Bool -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType U(S)U(S), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (ds_d166 [Occ=Once!] :: CompanyDatatypes.Company) - (ds1_d167 [Occ=Once!] :: CompanyDatatypes.Company) -> - case ds_d166 of _ { CompanyDatatypes.C a22_aTg [Occ=Once] -> - case ds1_d167 of _ { CompanyDatatypes.C b1_aTh [Occ=Once] -> - GHC.Classes.$fEq[]_$c== - @ CompanyDatatypes.Dept CompanyDatatypes.$fEqDept a22_aTg b1_aTh - } - }}] -CompanyDatatypes.$fEqCompany_$c== = - \ (ds_d166 :: CompanyDatatypes.Company) - (ds1_d167 :: CompanyDatatypes.Company) -> - case ds_d166 of _ { CompanyDatatypes.C a22_aTg -> - case ds1_d167 of _ { CompanyDatatypes.C b1_aTh -> - GHC.Classes.$fEq[]_$c== - @ CompanyDatatypes.Dept CompanyDatatypes.$fEqDept a22_aTg b1_aTh - } - } - -CompanyDatatypes.$fEqCompany_$c/= - :: CompanyDatatypes.Company - -> CompanyDatatypes.Company -> GHC.Types.Bool -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType U(S)U(S), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (a22_aTi [Occ=Once!] :: CompanyDatatypes.Company) - (b_aTj [Occ=Once!] :: CompanyDatatypes.Company) -> - case a22_aTi of _ { CompanyDatatypes.C a23_aTg [Occ=Once] -> - case b_aTj of _ { CompanyDatatypes.C b1_aTh [Occ=Once] -> - case GHC.Classes.$fEq[]_$c== - @ CompanyDatatypes.Dept CompanyDatatypes.$fEqDept a23_aTg b1_aTh - of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> GHC.Types.False - } - } - }}] -CompanyDatatypes.$fEqCompany_$c/= = - \ (a22_aTi :: CompanyDatatypes.Company) - (b_aTj :: CompanyDatatypes.Company) -> - case a22_aTi of _ { CompanyDatatypes.C a23_aTg -> - case b_aTj of _ { CompanyDatatypes.C b1_aTh -> - case GHC.Classes.$fEq[]_$c== - @ CompanyDatatypes.Dept CompanyDatatypes.$fEqDept a23_aTg b1_aTh - of _ { - GHC.Types.False -> GHC.Types.True; - GHC.Types.True -> GHC.Types.False - } - } - } - -CompanyDatatypes.$fEqCompany [InlPrag=[ALWAYS] CONLIKE] - :: GHC.Classes.Eq CompanyDatatypes.Company -[GblId[DFunId], - Caf=NoCafRefs, - Str=DmdType m, - Unf=DFun(arity=0) GHC.Classes.D:Eq [{CompanyDatatypes.$fEqCompany_$c==}, - {CompanyDatatypes.$fEqCompany_$c/=}]] -CompanyDatatypes.$fEqCompany = - GHC.Classes.D:Eq - @ CompanyDatatypes.Company - CompanyDatatypes.$fEqCompany_$c== - CompanyDatatypes.$fEqCompany_$c/= - -CompanyDatatypes.$fTypeableUnit_ds :: GHC.Base.String -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 40 0}] -CompanyDatatypes.$fTypeableUnit_ds = - GHC.CString.unpackCString# "main" - -CompanyDatatypes.$fTypeableUnit_ds1 :: GHC.Base.String -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 70 0}] -CompanyDatatypes.$fTypeableUnit_ds1 = - GHC.CString.unpackCString# "CompanyDatatypes" - -CompanyDatatypes.$fTypeableCompany_ds2 :: GHC.Base.String -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 50 0}] -CompanyDatatypes.$fTypeableCompany_ds2 = - GHC.CString.unpackCString# "Company" - -CompanyDatatypes.$fTypeableCompany_wild - :: Data.Typeable.Internal.TyCon -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 60}] -CompanyDatatypes.$fTypeableCompany_wild = - Data.Typeable.Internal.TyCon - (__word64 2504153764752067400) - (__word64 10373911117495283324) - CompanyDatatypes.$fTypeableUnit_ds - CompanyDatatypes.$fTypeableUnit_ds1 - CompanyDatatypes.$fTypeableCompany_ds2 - -CompanyDatatypes.$fTypeableCompany1 - :: Data.Typeable.Internal.TypeRep -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 50}] -CompanyDatatypes.$fTypeableCompany1 = - Data.Typeable.Internal.TypeRep - (__word64 2504153764752067400) - (__word64 10373911117495283324) - CompanyDatatypes.$fTypeableCompany_wild - (GHC.Types.[] @ Data.Typeable.Internal.TypeRep) - -CompanyDatatypes.$fTypeableCompany_$ctypeOf - :: CompanyDatatypes.Company -> Data.Typeable.Internal.TypeRep -[GblId, - Arity=1, - Str=DmdType Am, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ _ -> CompanyDatatypes.$fTypeableCompany1}] -CompanyDatatypes.$fTypeableCompany_$ctypeOf = - \ _ -> CompanyDatatypes.$fTypeableCompany1 - -CompanyDatatypes.$fTypeableCompany [InlPrag=INLINE (sat-args=0)] - :: Data.Typeable.Internal.Typeable CompanyDatatypes.Company -[GblId[DFunId(nt)], - Str=DmdType, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=True) - Tmpl= CompanyDatatypes.$fTypeableCompany_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Company>)> - :: (CompanyDatatypes.Company -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Company)}] -CompanyDatatypes.$fTypeableCompany = - CompanyDatatypes.$fTypeableCompany_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Company>)> - :: (CompanyDatatypes.Company -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Company) - -CompanyDatatypes.$fTypeableDept_ds2 :: GHC.Base.String -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 40 0}] -CompanyDatatypes.$fTypeableDept_ds2 = - GHC.CString.unpackCString# "Dept" - -CompanyDatatypes.$fTypeableDept_wild - :: Data.Typeable.Internal.TyCon -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 60}] -CompanyDatatypes.$fTypeableDept_wild = - Data.Typeable.Internal.TyCon - (__word64 5193093341809168841) - (__word64 7344728000398417852) - CompanyDatatypes.$fTypeableUnit_ds - CompanyDatatypes.$fTypeableUnit_ds1 - CompanyDatatypes.$fTypeableDept_ds2 - -CompanyDatatypes.$fTypeableDept1 :: Data.Typeable.Internal.TypeRep -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 50}] -CompanyDatatypes.$fTypeableDept1 = - Data.Typeable.Internal.TypeRep - (__word64 5193093341809168841) - (__word64 7344728000398417852) - CompanyDatatypes.$fTypeableDept_wild - (GHC.Types.[] @ Data.Typeable.Internal.TypeRep) - -CompanyDatatypes.$fTypeableDept_$ctypeOf - :: CompanyDatatypes.Dept -> Data.Typeable.Internal.TypeRep -[GblId, - Arity=1, - Str=DmdType Am, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ _ -> CompanyDatatypes.$fTypeableDept1}] -CompanyDatatypes.$fTypeableDept_$ctypeOf = - \ _ -> CompanyDatatypes.$fTypeableDept1 - -CompanyDatatypes.$fTypeableDept [InlPrag=INLINE (sat-args=0)] - :: Data.Typeable.Internal.Typeable CompanyDatatypes.Dept -[GblId[DFunId(nt)], - Str=DmdType, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=True) - Tmpl= CompanyDatatypes.$fTypeableDept_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Dept>)> - :: (CompanyDatatypes.Dept -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Dept)}] -CompanyDatatypes.$fTypeableDept = - CompanyDatatypes.$fTypeableDept_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Dept>)> - :: (CompanyDatatypes.Dept -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Dept) - -CompanyDatatypes.$fTypeableUnit_ds2 :: GHC.Base.String -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 40 0}] -CompanyDatatypes.$fTypeableUnit_ds2 = - GHC.CString.unpackCString# "Unit" - -CompanyDatatypes.$fTypeableUnit_wild - :: Data.Typeable.Internal.TyCon -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 60}] -CompanyDatatypes.$fTypeableUnit_wild = - Data.Typeable.Internal.TyCon - (__word64 16894050643156401805) - (__word64 6854564727116554803) - CompanyDatatypes.$fTypeableUnit_ds - CompanyDatatypes.$fTypeableUnit_ds1 - CompanyDatatypes.$fTypeableUnit_ds2 - -CompanyDatatypes.$fTypeableUnit1 :: Data.Typeable.Internal.TypeRep -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 50}] -CompanyDatatypes.$fTypeableUnit1 = - Data.Typeable.Internal.TypeRep - (__word64 16894050643156401805) - (__word64 6854564727116554803) - CompanyDatatypes.$fTypeableUnit_wild - (GHC.Types.[] @ Data.Typeable.Internal.TypeRep) - -CompanyDatatypes.$fTypeableUnit_$ctypeOf - :: CompanyDatatypes.Unit -> Data.Typeable.Internal.TypeRep -[GblId, - Arity=1, - Str=DmdType Am, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ _ -> CompanyDatatypes.$fTypeableUnit1}] -CompanyDatatypes.$fTypeableUnit_$ctypeOf = - \ _ -> CompanyDatatypes.$fTypeableUnit1 - -CompanyDatatypes.$fTypeableUnit [InlPrag=INLINE (sat-args=0)] - :: Data.Typeable.Internal.Typeable CompanyDatatypes.Unit -[GblId[DFunId(nt)], - Str=DmdType, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=True) - Tmpl= CompanyDatatypes.$fTypeableUnit_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Unit>)> - :: (CompanyDatatypes.Unit -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Unit)}] -CompanyDatatypes.$fTypeableUnit = - CompanyDatatypes.$fTypeableUnit_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Unit>)> - :: (CompanyDatatypes.Unit -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Unit) - -CompanyDatatypes.$fTypeableEmployee_ds2 :: GHC.Base.String -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 50 0}] -CompanyDatatypes.$fTypeableEmployee_ds2 = - GHC.CString.unpackCString# "Employee" - -CompanyDatatypes.$fTypeableEmployee_wild - :: Data.Typeable.Internal.TyCon -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 60}] -CompanyDatatypes.$fTypeableEmployee_wild = - Data.Typeable.Internal.TyCon - (__word64 912757362657419687) - (__word64 13064721439508405479) - CompanyDatatypes.$fTypeableUnit_ds - CompanyDatatypes.$fTypeableUnit_ds1 - CompanyDatatypes.$fTypeableEmployee_ds2 - -CompanyDatatypes.$fTypeableEmployee1 - :: Data.Typeable.Internal.TypeRep -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 50}] -CompanyDatatypes.$fTypeableEmployee1 = - Data.Typeable.Internal.TypeRep - (__word64 912757362657419687) - (__word64 13064721439508405479) - CompanyDatatypes.$fTypeableEmployee_wild - (GHC.Types.[] @ Data.Typeable.Internal.TypeRep) - -CompanyDatatypes.$fTypeableEmployee_$ctypeOf - :: CompanyDatatypes.Employee -> Data.Typeable.Internal.TypeRep -[GblId, - Arity=1, - Str=DmdType Am, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ _ -> CompanyDatatypes.$fTypeableEmployee1}] -CompanyDatatypes.$fTypeableEmployee_$ctypeOf = - \ _ -> CompanyDatatypes.$fTypeableEmployee1 - -CompanyDatatypes.$fTypeableEmployee [InlPrag=INLINE (sat-args=0)] - :: Data.Typeable.Internal.Typeable CompanyDatatypes.Employee -[GblId[DFunId(nt)], - Str=DmdType, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=True) - Tmpl= CompanyDatatypes.$fTypeableEmployee_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable - <CompanyDatatypes.Employee>)> - :: (CompanyDatatypes.Employee -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Employee)}] -CompanyDatatypes.$fTypeableEmployee = - CompanyDatatypes.$fTypeableEmployee_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable - <CompanyDatatypes.Employee>)> - :: (CompanyDatatypes.Employee -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Employee) - -CompanyDatatypes.$fTypeablePerson_ds2 :: GHC.Base.String -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 50 0}] -CompanyDatatypes.$fTypeablePerson_ds2 = - GHC.CString.unpackCString# "Person" - -CompanyDatatypes.$fTypeablePerson_wild - :: Data.Typeable.Internal.TyCon -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 60}] -CompanyDatatypes.$fTypeablePerson_wild = - Data.Typeable.Internal.TyCon - (__word64 7289977482266162866) - (__word64 6479209035851230723) - CompanyDatatypes.$fTypeableUnit_ds - CompanyDatatypes.$fTypeableUnit_ds1 - CompanyDatatypes.$fTypeablePerson_ds2 - -CompanyDatatypes.$fTypeablePerson1 - :: Data.Typeable.Internal.TypeRep -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 50}] -CompanyDatatypes.$fTypeablePerson1 = - Data.Typeable.Internal.TypeRep - (__word64 7289977482266162866) - (__word64 6479209035851230723) - CompanyDatatypes.$fTypeablePerson_wild - (GHC.Types.[] @ Data.Typeable.Internal.TypeRep) - -CompanyDatatypes.$fTypeablePerson_$ctypeOf - :: CompanyDatatypes.Person -> Data.Typeable.Internal.TypeRep -[GblId, - Arity=1, - Str=DmdType Am, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ _ -> CompanyDatatypes.$fTypeablePerson1}] -CompanyDatatypes.$fTypeablePerson_$ctypeOf = - \ _ -> CompanyDatatypes.$fTypeablePerson1 - -CompanyDatatypes.$fTypeablePerson [InlPrag=INLINE (sat-args=0)] - :: Data.Typeable.Internal.Typeable CompanyDatatypes.Person -[GblId[DFunId(nt)], - Str=DmdType, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=True) - Tmpl= CompanyDatatypes.$fTypeablePerson_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Person>)> - :: (CompanyDatatypes.Person -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Person)}] -CompanyDatatypes.$fTypeablePerson = - CompanyDatatypes.$fTypeablePerson_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Person>)> - :: (CompanyDatatypes.Person -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Person) - -CompanyDatatypes.$fDataPerson1 - :: (CompanyDatatypes.Name - -> CompanyDatatypes.Address -> CompanyDatatypes.Person, - GHC.Types.Bool) -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.$fDataPerson1 = - (CompanyDatatypes.P, GHC.Types.False) - -CompanyDatatypes.$w$cgmapMo4 - :: forall (m_aY8 :: * -> *). - GHC.Base.Monad m_aY8 => - (forall a_a1nd. m_aY8 a_a1nd) - -> (forall a_a1nc. m_aY8 a_a1nc -> m_aY8 a_a1nc -> m_aY8 a_a1nc) - -> (forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - -> CompanyDatatypes.Person - -> m_aY8 CompanyDatatypes.Person -[GblId, - Arity=5, - Str=DmdType SLLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=5, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [20 0 60 60 20] 580 0}] -CompanyDatatypes.$w$cgmapMo4 = - \ (@ (m_aY8 :: * -> *)) - (ww_s2ep :: GHC.Base.Monad m_aY8) - (ww1_s2eq :: forall a_a1nd. m_aY8 a_a1nd) - (ww2_s2er - :: forall a_a1nc. m_aY8 a_a1nc -> m_aY8 a_a1nc -> m_aY8 a_a1nc) - (w_s2et - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w3_s2eu :: CompanyDatatypes.Person) -> - case ww_s2ep - of _ { GHC.Base.D:Monad ww3_s2ef ww4_s2eg ww5_s2eh ww6_s2ei -> - ww3_s2ef - @ (CompanyDatatypes.Person, GHC.Types.Bool) - @ CompanyDatatypes.Person - (case w3_s2eu of _ { CompanyDatatypes.P a22_aSl a23_aSm -> - let { - a24_s1JH - :: forall d_X1xh b_X1xj. - Data.Data.Data d_X1xh => - Data.Data.Mp m_aY8 (d_X1xh -> b_X1xj) - -> d_X1xh -> m_aY8 (b_X1xj, GHC.Types.Bool) - [LclId, Arity=3, Str=DmdType LLL] - a24_s1JH = - \ (@ d_a1mF) - (@ b_a1mG) - ($dData2_a1mH :: Data.Data.Data d_a1mF) - (ds_a1mI :: Data.Data.Mp m_aY8 (d_a1mF -> b_a1mG)) - (y_a1mJ :: d_a1mF) -> - let { - lvl11_s1ER :: m_aY8 d_a1mF - [LclId, Str=DmdType] - lvl11_s1ER = w_s2et @ d_a1mF $dData2_a1mH y_a1mJ } in - ww3_s2ef - @ (d_a1mF -> b_a1mG, GHC.Types.Bool) - @ (b_a1mG, GHC.Types.Bool) - (ds_a1mI - `cast` (<Data.Data.NTCo:Mp <m_aY8> <d_a1mF -> b_a1mG>> - :: Data.Data.Mp m_aY8 (d_a1mF -> b_a1mG) - ~# - m_aY8 (d_a1mF -> b_a1mG, GHC.Types.Bool))) - (\ (ds1_a1mK :: (d_a1mF -> b_a1mG, GHC.Types.Bool)) -> - case ds1_a1mK of _ { (h_a1mN, b_a1mO) -> - case b_a1mO of _ { - GHC.Types.False -> - ww2_s2er - @ (b_a1mG, GHC.Types.Bool) - (ww3_s2ef - @ d_a1mF - @ (b_a1mG, GHC.Types.Bool) - lvl11_s1ER - (\ (y'_a1mT :: d_a1mF) -> - ww5_s2eh - @ (b_a1mG, GHC.Types.Bool) (h_a1mN y'_a1mT, GHC.Types.True))) - (ww5_s2eh - @ (b_a1mG, GHC.Types.Bool) (h_a1mN y_a1mJ, GHC.Types.False)); - GHC.Types.True -> - ww5_s2eh @ (b_a1mG, GHC.Types.Bool) (h_a1mN y_a1mJ, GHC.Types.True) - } - }) } in - a24_s1JH - @ CompanyDatatypes.Address - @ CompanyDatatypes.Person - CompanyDatatypes.$fDataPerson_$dData - ((a24_s1JH - @ CompanyDatatypes.Name - @ (CompanyDatatypes.Address -> CompanyDatatypes.Person) - CompanyDatatypes.$fDataPerson_$dData - ((ww5_s2eh - @ (CompanyDatatypes.Name - -> CompanyDatatypes.Address -> CompanyDatatypes.Person, - GHC.Types.Bool) - CompanyDatatypes.$fDataPerson1) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aY8> - <CompanyDatatypes.Name - -> CompanyDatatypes.Address -> CompanyDatatypes.Person>)> - :: m_aY8 (CompanyDatatypes.Name - -> CompanyDatatypes.Address -> CompanyDatatypes.Person, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aY8 - (CompanyDatatypes.Name - -> CompanyDatatypes.Address -> CompanyDatatypes.Person))) - a22_aSl) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aY8> <CompanyDatatypes.Address -> CompanyDatatypes.Person>)> - :: m_aY8 (CompanyDatatypes.Address -> CompanyDatatypes.Person, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aY8 (CompanyDatatypes.Address -> CompanyDatatypes.Person))) - a23_aSm - }) - (\ (ds_a1n1 :: (CompanyDatatypes.Person, GHC.Types.Bool)) -> - case ds_a1n1 of _ { (x'_a1n4, b_a1n5) -> - case b_a1n5 of _ { - GHC.Types.False -> ww1_s2eq @ CompanyDatatypes.Person; - GHC.Types.True -> ww5_s2eh @ CompanyDatatypes.Person x'_a1n4 - } - }) - } - -CompanyDatatypes.$fDataPerson_$cgmapMo [InlPrag=INLINE[0]] - :: forall (m_aY8 :: * -> *). - Control.Monad.MonadPlus m_aY8 => - (forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - -> CompanyDatatypes.Person -> m_aY8 CompanyDatatypes.Person -[GblId, - Arity=3, - Str=DmdType U(SLL)LL, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapMo4, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aY8 :: * -> *)) - (w_s2en [Occ=Once!] :: Control.Monad.MonadPlus m_aY8) - (w3_s2et [Occ=Once] - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w4_s2eu [Occ=Once] :: CompanyDatatypes.Person) -> - case w_s2en - of _ - { Control.Monad.D:MonadPlus ww_s2ep [Occ=Once] - ww1_s2eq [Occ=Once] - ww2_s2er [Occ=Once] -> - CompanyDatatypes.$w$cgmapMo4 - @ m_aY8 ww_s2ep ww1_s2eq ww2_s2er w3_s2et w4_s2eu - }}] -CompanyDatatypes.$fDataPerson_$cgmapMo = - \ (@ (m_aY8 :: * -> *)) - (w_s2en :: Control.Monad.MonadPlus m_aY8) - (w3_s2et - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w4_s2eu :: CompanyDatatypes.Person) -> - case w_s2en - of _ { Control.Monad.D:MonadPlus ww_s2ep ww1_s2eq ww2_s2er -> - CompanyDatatypes.$w$cgmapMo4 - @ m_aY8 ww_s2ep ww1_s2eq ww2_s2er w3_s2et w4_s2eu - } - -CompanyDatatypes.$w$cgmapMp2 - :: forall (m_aXe :: * -> *). - GHC.Base.Monad m_aXe => - (forall a_a1nd. m_aXe a_a1nd) - -> (forall a_a1nc. m_aXe a_a1nc -> m_aXe a_a1nc -> m_aXe a_a1nc) - -> (forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - -> CompanyDatatypes.Person - -> m_aXe CompanyDatatypes.Person -[GblId, - Arity=5, - Str=DmdType SLLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=5, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [20 0 60 60 20] 510 0}] -CompanyDatatypes.$w$cgmapMp2 = - \ (@ (m_aXe :: * -> *)) - (ww_s2eH :: GHC.Base.Monad m_aXe) - (ww1_s2eI :: forall a_a1nd. m_aXe a_a1nd) - (ww2_s2eJ - :: forall a_a1nc. m_aXe a_a1nc -> m_aXe a_a1nc -> m_aXe a_a1nc) - (w_s2eL - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w3_s2eM :: CompanyDatatypes.Person) -> - case ww_s2eH - of _ { GHC.Base.D:Monad ww3_s2ex ww4_s2ey ww5_s2ez ww6_s2eA -> - ww3_s2ex - @ (CompanyDatatypes.Person, GHC.Types.Bool) - @ CompanyDatatypes.Person - (case w3_s2eM of _ { CompanyDatatypes.P a22_aSl a23_aSm -> - let { - a24_s1JN - :: forall d_X1ye b_X1yg. - Data.Data.Data d_X1ye => - Data.Data.Mp m_aXe (d_X1ye -> b_X1yg) - -> d_X1ye -> m_aXe (b_X1yg, GHC.Types.Bool) - [LclId, Arity=3, Str=DmdType LLL] - a24_s1JN = - \ (@ d_a1nA) - (@ b_a1nB) - ($dData2_a1nC :: Data.Data.Data d_a1nA) - (ds_a1nD :: Data.Data.Mp m_aXe (d_a1nA -> b_a1nB)) - (y_a1nE :: d_a1nA) -> - let { - lvl11_s1ET [Dmd=Just L] :: m_aXe d_a1nA - [LclId, Str=DmdType] - lvl11_s1ET = w_s2eL @ d_a1nA $dData2_a1nC y_a1nE } in - ww3_s2ex - @ (d_a1nA -> b_a1nB, GHC.Types.Bool) - @ (b_a1nB, GHC.Types.Bool) - (ds_a1nD - `cast` (<Data.Data.NTCo:Mp <m_aXe> <d_a1nA -> b_a1nB>> - :: Data.Data.Mp m_aXe (d_a1nA -> b_a1nB) - ~# - m_aXe (d_a1nA -> b_a1nB, GHC.Types.Bool))) - (\ (ds1_a1nF :: (d_a1nA -> b_a1nB, GHC.Types.Bool)) -> - case ds1_a1nF of _ { (h_a1nI, b_a1nJ) -> - ww2_s2eJ - @ (b_a1nB, GHC.Types.Bool) - (ww3_s2ex - @ d_a1nA - @ (b_a1nB, GHC.Types.Bool) - lvl11_s1ET - (\ (y'_a1nL :: d_a1nA) -> - ww5_s2ez - @ (b_a1nB, GHC.Types.Bool) (h_a1nI y'_a1nL, GHC.Types.True))) - (ww5_s2ez @ (b_a1nB, GHC.Types.Bool) (h_a1nI y_a1nE, b_a1nJ)) - }) } in - a24_s1JN - @ CompanyDatatypes.Address - @ CompanyDatatypes.Person - CompanyDatatypes.$fDataPerson_$dData - ((a24_s1JN - @ CompanyDatatypes.Name - @ (CompanyDatatypes.Address -> CompanyDatatypes.Person) - CompanyDatatypes.$fDataPerson_$dData - ((ww5_s2ez - @ (CompanyDatatypes.Name - -> CompanyDatatypes.Address -> CompanyDatatypes.Person, - GHC.Types.Bool) - CompanyDatatypes.$fDataPerson1) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aXe> - <CompanyDatatypes.Name - -> CompanyDatatypes.Address -> CompanyDatatypes.Person>)> - :: m_aXe (CompanyDatatypes.Name - -> CompanyDatatypes.Address -> CompanyDatatypes.Person, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aXe - (CompanyDatatypes.Name - -> CompanyDatatypes.Address -> CompanyDatatypes.Person))) - a22_aSl) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aXe> <CompanyDatatypes.Address -> CompanyDatatypes.Person>)> - :: m_aXe (CompanyDatatypes.Address -> CompanyDatatypes.Person, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aXe (CompanyDatatypes.Address -> CompanyDatatypes.Person))) - a23_aSm - }) - (\ (ds_a1nR :: (CompanyDatatypes.Person, GHC.Types.Bool)) -> - case ds_a1nR of _ { (x'_a1nU, b_a1nV) -> - case b_a1nV of _ { - GHC.Types.False -> ww1_s2eI @ CompanyDatatypes.Person; - GHC.Types.True -> ww5_s2ez @ CompanyDatatypes.Person x'_a1nU - } - }) - } - -CompanyDatatypes.$fDataPerson_$cgmapMp [InlPrag=INLINE[0]] - :: forall (m_aXe :: * -> *). - Control.Monad.MonadPlus m_aXe => - (forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - -> CompanyDatatypes.Person -> m_aXe CompanyDatatypes.Person -[GblId, - Arity=3, - Str=DmdType U(SLL)LL, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapMp2, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aXe :: * -> *)) - (w_s2eF [Occ=Once!] :: Control.Monad.MonadPlus m_aXe) - (w3_s2eL [Occ=Once] - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w4_s2eM [Occ=Once] :: CompanyDatatypes.Person) -> - case w_s2eF - of _ - { Control.Monad.D:MonadPlus ww_s2eH [Occ=Once] - ww1_s2eI [Occ=Once] - ww2_s2eJ [Occ=Once] -> - CompanyDatatypes.$w$cgmapMp2 - @ m_aXe ww_s2eH ww1_s2eI ww2_s2eJ w3_s2eL w4_s2eM - }}] -CompanyDatatypes.$fDataPerson_$cgmapMp = - \ (@ (m_aXe :: * -> *)) - (w_s2eF :: Control.Monad.MonadPlus m_aXe) - (w3_s2eL - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w4_s2eM :: CompanyDatatypes.Person) -> - case w_s2eF - of _ { Control.Monad.D:MonadPlus ww_s2eH ww1_s2eI ww2_s2eJ -> - CompanyDatatypes.$w$cgmapMp2 - @ m_aXe ww_s2eH ww1_s2eI ww2_s2eJ w3_s2eL w4_s2eM - } - -CompanyDatatypes.$w$cgmapM2 - :: forall (m_aX4 :: * -> *). - (forall a_a1ne b_a1nf. - m_aX4 a_a1ne -> (a_a1ne -> m_aX4 b_a1nf) -> m_aX4 b_a1nf) - -> (forall a_a1ni. a_a1ni -> m_aX4 a_a1ni) - -> (forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - -> CompanyDatatypes.Name - -> CompanyDatatypes.Address - -> m_aX4 CompanyDatatypes.Person -[GblId, - Arity=5, - Str=DmdType SLLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=5, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [120 120 60 0 0] 300 0}] -CompanyDatatypes.$w$cgmapM2 = - \ (@ (m_aX4 :: * -> *)) - (ww_s2eT - :: forall a_a1ne b_a1nf. - m_aX4 a_a1ne -> (a_a1ne -> m_aX4 b_a1nf) -> m_aX4 b_a1nf) - (ww1_s2eV :: forall a_a1ni. a_a1ni -> m_aX4 a_a1ni) - (w_s2eY - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (ww2_s2f1 :: CompanyDatatypes.Name) - (ww3_s2f2 :: CompanyDatatypes.Address) -> - let { - k_XWA - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - m_aX4 (d_aV1 -> b_aV2) -> d_aV1 -> m_aX4 b_aV2 - [LclId, Arity=3, Str=DmdType LLL] - k_XWA = - \ (@ d_a1ob) - (@ b_a1oc) - ($dData2_a1od :: Data.Data.Data d_a1ob) - (c_a1oe :: m_aX4 (d_a1ob -> b_a1oc)) - (x_a1of :: d_a1ob) -> - let { - lvl11_s1EU [Dmd=Just L] :: m_aX4 d_a1ob - [LclId, Str=DmdType] - lvl11_s1EU = w_s2eY @ d_a1ob $dData2_a1od x_a1of } in - ww_s2eT - @ (d_a1ob -> b_a1oc) - @ b_a1oc - c_a1oe - (\ (c'_a1og :: d_a1ob -> b_a1oc) -> - ww_s2eT - @ d_a1ob - @ b_a1oc - lvl11_s1EU - (\ (x'_a1oh :: d_a1ob) -> - ww1_s2eV @ b_a1oc (c'_a1og x'_a1oh))) } in - k_XWA - @ CompanyDatatypes.Address - @ CompanyDatatypes.Person - CompanyDatatypes.$fDataPerson_$dData - (k_XWA - @ CompanyDatatypes.Name - @ (CompanyDatatypes.Address -> CompanyDatatypes.Person) - CompanyDatatypes.$fDataPerson_$dData - (ww1_s2eV - @ (CompanyDatatypes.Name - -> CompanyDatatypes.Address -> CompanyDatatypes.Person) - CompanyDatatypes.P) - ww2_s2f1) - ww3_s2f2 - -CompanyDatatypes.$fDataPerson_$cgmapM [InlPrag=INLINE[0]] - :: forall (m_aX4 :: * -> *). - GHC.Base.Monad m_aX4 => - (forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - -> CompanyDatatypes.Person -> m_aX4 CompanyDatatypes.Person -[GblId, - Arity=3, - Str=DmdType U(SALA)LU(LL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapM2, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aX4 :: * -> *)) - (w_s2eR [Occ=Once!] :: GHC.Base.Monad m_aX4) - (w3_s2eY [Occ=Once] - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (w4_s2eZ [Occ=Once!] :: CompanyDatatypes.Person) -> - case w_s2eR - of _ - { GHC.Base.D:Monad ww_s2eT [Occ=Once] _ ww2_s2eV [Occ=Once] _ -> - case w4_s2eZ - of _ - { CompanyDatatypes.P ww4_s2f1 [Occ=Once] ww5_s2f2 [Occ=Once] -> - CompanyDatatypes.$w$cgmapM2 - @ m_aX4 ww_s2eT ww2_s2eV w3_s2eY ww4_s2f1 ww5_s2f2 - } - }}] -CompanyDatatypes.$fDataPerson_$cgmapM = - \ (@ (m_aX4 :: * -> *)) - (w_s2eR :: GHC.Base.Monad m_aX4) - (w3_s2eY - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (w4_s2eZ :: CompanyDatatypes.Person) -> - case w_s2eR - of _ { GHC.Base.D:Monad ww_s2eT ww1_s2eU ww2_s2eV ww3_s2eW -> - case w4_s2eZ of _ { CompanyDatatypes.P ww4_s2f1 ww5_s2f2 -> - CompanyDatatypes.$w$cgmapM2 - @ m_aX4 ww_s2eT ww2_s2eV w3_s2eY ww4_s2f1 ww5_s2f2 - } - } - -CompanyDatatypes.$w$cgmapQi1 - :: forall u_aWW. - GHC.Prim.Int# - -> (forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - -> CompanyDatatypes.Name - -> CompanyDatatypes.Address - -> u_aWW -[GblId, - Arity=4, - Str=DmdType LC(C(S))LL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=4, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [70 120 0 0] 90 0}] -CompanyDatatypes.$w$cgmapQi1 = - \ (@ u_aWW) - (ww_s2fa :: GHC.Prim.Int#) - (w_s2fc :: forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - (ww1_s2ff :: CompanyDatatypes.Name) - (ww2_s2fg :: CompanyDatatypes.Address) -> - case ww_s2fa of _ { - __DEFAULT -> Data.Maybe.fromJust1 @ u_aWW; - 0 -> - w_s2fc - @ CompanyDatatypes.Name - CompanyDatatypes.$fDataPerson_$dData - ww1_s2ff; - 1 -> - w_s2fc - @ CompanyDatatypes.Address - CompanyDatatypes.$fDataPerson_$dData - ww2_s2fg - } - -CompanyDatatypes.$fDataPerson_$cgmapQi [InlPrag=INLINE[0]] - :: forall u_aWW. - GHC.Types.Int - -> (forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - -> CompanyDatatypes.Person - -> u_aWW -[GblId, - Arity=3, - Str=DmdType U(L)C(C(S))U(LL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapQi1, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ u_aWW) - (w_s2f8 [Occ=Once!] :: GHC.Types.Int) - (w3_s2fc [Occ=Once] - :: forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - (w4_s2fd [Occ=Once!] :: CompanyDatatypes.Person) -> - case w_s2f8 of _ { GHC.Types.I# ww_s2fa [Occ=Once] -> - case w4_s2fd - of _ - { CompanyDatatypes.P ww1_s2ff [Occ=Once] ww2_s2fg [Occ=Once] -> - CompanyDatatypes.$w$cgmapQi1 - @ u_aWW ww_s2fa w3_s2fc ww1_s2ff ww2_s2fg - } - }}] -CompanyDatatypes.$fDataPerson_$cgmapQi = - \ (@ u_aWW) - (w_s2f8 :: GHC.Types.Int) - (w3_s2fc :: forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - (w4_s2fd :: CompanyDatatypes.Person) -> - case w_s2f8 of _ { GHC.Types.I# ww_s2fa -> - case w4_s2fd of _ { CompanyDatatypes.P ww1_s2ff ww2_s2fg -> - CompanyDatatypes.$w$cgmapQi1 - @ u_aWW ww_s2fa w3_s2fc ww1_s2ff ww2_s2fg - } - } - -CompanyDatatypes.$w$cgmapQr1 - :: forall r_aWE r'_aWF. - (r'_aWF -> r_aWE -> r_aWE) - -> r_aWE - -> (forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - -> CompanyDatatypes.Name - -> CompanyDatatypes.Address - -> r_aWE -[GblId, - Arity=5, - Str=DmdType C(C(S))LLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=5, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [60 0 120 0 0] 120 0}] -CompanyDatatypes.$w$cgmapQr1 = - \ (@ r_aWE) - (@ r'_aWF) - (w_s2fn :: r'_aWF -> r_aWE -> r_aWE) - (w3_s2fo :: r_aWE) - (w4_s2fp :: forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - (ww_s2fs :: CompanyDatatypes.Name) - (ww1_s2ft :: CompanyDatatypes.Address) -> - w_s2fn - (w4_s2fp - @ CompanyDatatypes.Name - CompanyDatatypes.$fDataPerson_$dData - ww_s2fs) - (w_s2fn - (w4_s2fp - @ CompanyDatatypes.Address - CompanyDatatypes.$fDataPerson_$dData - ww1_s2ft) - w3_s2fo) - -CompanyDatatypes.$fDataPerson_$cgmapQr [InlPrag=INLINE[0]] - :: forall r_aWE r'_aWF. - (r'_aWF -> r_aWE -> r_aWE) - -> r_aWE - -> (forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - -> CompanyDatatypes.Person - -> r_aWE -[GblId, - Arity=4, - Str=DmdType C(C(S))LLU(LL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapQr1, TopLvl=True, - Arity=4, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ r_aWE) - (@ r'_aWF) - (w_s2fn [Occ=Once] :: r'_aWF -> r_aWE -> r_aWE) - (w3_s2fo [Occ=Once] :: r_aWE) - (w4_s2fp [Occ=Once] - :: forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - (w5_s2fq [Occ=Once!] :: CompanyDatatypes.Person) -> - case w5_s2fq - of _ { CompanyDatatypes.P ww_s2fs [Occ=Once] ww1_s2ft [Occ=Once] -> - CompanyDatatypes.$w$cgmapQr1 - @ r_aWE @ r'_aWF w_s2fn w3_s2fo w4_s2fp ww_s2fs ww1_s2ft - }}] -CompanyDatatypes.$fDataPerson_$cgmapQr = - \ (@ r_aWE) - (@ r'_aWF) - (w_s2fn :: r'_aWF -> r_aWE -> r_aWE) - (w3_s2fo :: r_aWE) - (w4_s2fp :: forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - (w5_s2fq :: CompanyDatatypes.Person) -> - case w5_s2fq of _ { CompanyDatatypes.P ww_s2fs ww1_s2ft -> - CompanyDatatypes.$w$cgmapQr1 - @ r_aWE @ r'_aWF w_s2fn w3_s2fo w4_s2fp ww_s2fs ww1_s2ft - } - -CompanyDatatypes.$fDataPerson_$cgmapQ - :: forall u_aWO. - (forall d_aWP. Data.Data.Data d_aWP => d_aWP -> u_aWO) - -> CompanyDatatypes.Person -> [u_aWO] -[GblId, - Arity=2, - Str=DmdType LU(LL), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ u_a1pL) - (f_a1pM - :: forall d_a1pN. Data.Data.Data d_a1pN => d_a1pN -> u_a1pL) - (eta_B1 [Occ=Once!] :: CompanyDatatypes.Person) -> - case eta_B1 - of _ { CompanyDatatypes.P a22_aSl [Occ=Once] a23_aSm [Occ=Once] -> - GHC.Types.: - @ u_a1pL - (f_a1pM - @ CompanyDatatypes.Name - CompanyDatatypes.$fDataPerson_$dData - a22_aSl) - (GHC.Types.: - @ u_a1pL - (f_a1pM - @ CompanyDatatypes.Address - CompanyDatatypes.$fDataPerson_$dData - a23_aSm) - (GHC.Types.[] @ u_a1pL)) - }}] -CompanyDatatypes.$fDataPerson_$cgmapQ = - \ (@ u_a1pL) - (f_a1pM - :: forall d_a1pN. Data.Data.Data d_a1pN => d_a1pN -> u_a1pL) - (eta_B1 :: CompanyDatatypes.Person) -> - case eta_B1 of _ { CompanyDatatypes.P a22_aSl a23_aSm -> - GHC.Types.: - @ u_a1pL - (f_a1pM - @ CompanyDatatypes.Name - CompanyDatatypes.$fDataPerson_$dData - a22_aSl) - (GHC.Types.: - @ u_a1pL - (f_a1pM - @ CompanyDatatypes.Address - CompanyDatatypes.$fDataPerson_$dData - a23_aSm) - (GHC.Types.[] @ u_a1pL)) - } - -CompanyDatatypes.$w$cgmapQl1 - :: forall r_aWu r'_aWv. - (r_aWu -> r'_aWv -> r_aWu) - -> r_aWu - -> (forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - -> CompanyDatatypes.Name - -> CompanyDatatypes.Address - -> r_aWu -[GblId, - Arity=5, - Str=DmdType C(C(S))LLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=5, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [60 0 120 0 0] 120 0}] -CompanyDatatypes.$w$cgmapQl1 = - \ (@ r_aWu) - (@ r'_aWv) - (w_s2fA :: r_aWu -> r'_aWv -> r_aWu) - (w3_s2fB :: r_aWu) - (w4_s2fC :: forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - (ww_s2fF :: CompanyDatatypes.Name) - (ww1_s2fG :: CompanyDatatypes.Address) -> - w_s2fA - (w_s2fA - w3_s2fB - (w4_s2fC - @ CompanyDatatypes.Name - CompanyDatatypes.$fDataPerson_$dData - ww_s2fF)) - (w4_s2fC - @ CompanyDatatypes.Address - CompanyDatatypes.$fDataPerson_$dData - ww1_s2fG) - -CompanyDatatypes.$fDataPerson_$cgmapQl [InlPrag=INLINE[0]] - :: forall r_aWu r'_aWv. - (r_aWu -> r'_aWv -> r_aWu) - -> r_aWu - -> (forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - -> CompanyDatatypes.Person - -> r_aWu -[GblId, - Arity=4, - Str=DmdType C(C(S))LLU(LL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapQl1, TopLvl=True, - Arity=4, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ r_aWu) - (@ r'_aWv) - (w_s2fA [Occ=Once] :: r_aWu -> r'_aWv -> r_aWu) - (w3_s2fB [Occ=Once] :: r_aWu) - (w4_s2fC [Occ=Once] - :: forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - (w5_s2fD [Occ=Once!] :: CompanyDatatypes.Person) -> - case w5_s2fD - of _ { CompanyDatatypes.P ww_s2fF [Occ=Once] ww1_s2fG [Occ=Once] -> - CompanyDatatypes.$w$cgmapQl1 - @ r_aWu @ r'_aWv w_s2fA w3_s2fB w4_s2fC ww_s2fF ww1_s2fG - }}] -CompanyDatatypes.$fDataPerson_$cgmapQl = - \ (@ r_aWu) - (@ r'_aWv) - (w_s2fA :: r_aWu -> r'_aWv -> r_aWu) - (w3_s2fB :: r_aWu) - (w4_s2fC :: forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - (w5_s2fD :: CompanyDatatypes.Person) -> - case w5_s2fD of _ { CompanyDatatypes.P ww_s2fF ww1_s2fG -> - CompanyDatatypes.$w$cgmapQl1 - @ r_aWu @ r'_aWv w_s2fA w3_s2fB w4_s2fC ww_s2fF ww1_s2fG - } - -CompanyDatatypes.$fDataPerson_$cgmapT - :: (forall b_aWo. Data.Data.Data b_aWo => b_aWo -> b_aWo) - -> CompanyDatatypes.Person -> CompanyDatatypes.Person -[GblId, - Arity=2, - Str=DmdType LU(LL)m, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (f_a1r7 - :: forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8) - (x0_a1r9 [Occ=Once!] :: CompanyDatatypes.Person) -> - case x0_a1r9 - of _ { CompanyDatatypes.P a22_aSl [Occ=Once] a23_aSm [Occ=Once] -> - CompanyDatatypes.P - (f_a1r7 - @ CompanyDatatypes.Name - CompanyDatatypes.$fDataPerson_$dData - a22_aSl) - (f_a1r7 - @ CompanyDatatypes.Address - CompanyDatatypes.$fDataPerson_$dData - a23_aSm) - }}] -CompanyDatatypes.$fDataPerson_$cgmapT = - \ (f_a1r7 - :: forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8) - (x0_a1r9 :: CompanyDatatypes.Person) -> - case x0_a1r9 of _ { CompanyDatatypes.P a22_aSl a23_aSm -> - CompanyDatatypes.P - (f_a1r7 - @ CompanyDatatypes.Name - CompanyDatatypes.$fDataPerson_$dData - a22_aSl) - (f_a1r7 - @ CompanyDatatypes.Address - CompanyDatatypes.$fDataPerson_$dData - a23_aSm) - } - -CompanyDatatypes.$fDataPerson_$cdataCast2 - :: forall (c_aWc :: * -> *) (t_aWd :: * -> * -> *). - Data.Typeable.Internal.Typeable2 t_aWd => - (forall d_aWe e_aWf. - (Data.Data.Data d_aWe, Data.Data.Data e_aWf) => - c_aWc (t_aWd d_aWe e_aWf)) - -> Data.Maybe.Maybe (c_aWc CompanyDatatypes.Person) -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType AA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ (@ (c_a1rt :: * -> *)) (@ (t_a1ru :: * -> * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rt CompanyDatatypes.Person)}] -CompanyDatatypes.$fDataPerson_$cdataCast2 = - \ (@ (c_a1rt :: * -> *)) (@ (t_a1ru :: * -> * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rt CompanyDatatypes.Person) - -CompanyDatatypes.$fDataPerson_$cdataCast1 - :: forall (c_aVp :: * -> *) (t_aVq :: * -> *). - Data.Typeable.Internal.Typeable1 t_aVq => - (forall d_aVr. Data.Data.Data d_aVr => c_aVp (t_aVq d_aVr)) - -> Data.Maybe.Maybe (c_aVp CompanyDatatypes.Person) -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType AA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ (@ (c_a1rB :: * -> *)) (@ (t_a1rC :: * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rB CompanyDatatypes.Person)}] -CompanyDatatypes.$fDataPerson_$cdataCast1 = - \ (@ (c_a1rB :: * -> *)) (@ (t_a1rC :: * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rB CompanyDatatypes.Person) - -CompanyDatatypes.$fDataPerson [InlPrag=[ALWAYS] CONLIKE] - :: Data.Data.Data CompanyDatatypes.Person -[GblId[DFunId], - Str=DmdType, - Unf=DFun(arity=0) Data.Data.D:Data [{CompanyDatatypes.$fTypeablePerson}, - {CompanyDatatypes.$fDataPerson_$cgfoldl}, - {CompanyDatatypes.$fDataPerson_$cgunfold}, - {CompanyDatatypes.$fDataPerson_$ctoConstr}, - {CompanyDatatypes.$fDataPerson_$cdataTypeOf}, - {CompanyDatatypes.$fDataPerson_$cdataCast1}, - {CompanyDatatypes.$fDataPerson_$cdataCast2}, - {CompanyDatatypes.$fDataPerson_$cgmapT}, - {CompanyDatatypes.$fDataPerson_$cgmapQl}, - {CompanyDatatypes.$fDataPerson_$cgmapQr}, - {CompanyDatatypes.$fDataPerson_$cgmapQ}, - {CompanyDatatypes.$fDataPerson_$cgmapQi}, - {CompanyDatatypes.$fDataPerson_$cgmapM}, - {CompanyDatatypes.$fDataPerson_$cgmapMp}, - {CompanyDatatypes.$fDataPerson_$cgmapMo}]] -CompanyDatatypes.$fDataPerson = - Data.Data.D:Data - @ CompanyDatatypes.Person - (CompanyDatatypes.$fTypeablePerson_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Person>)> - :: (CompanyDatatypes.Person -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Person)) - CompanyDatatypes.$fDataPerson_$cgfoldl - CompanyDatatypes.$fDataPerson_$cgunfold - CompanyDatatypes.$fDataPerson_$ctoConstr - CompanyDatatypes.$fDataPerson_$cdataTypeOf - CompanyDatatypes.$fDataPerson_$cdataCast1 - CompanyDatatypes.$fDataPerson_$cdataCast2 - CompanyDatatypes.$fDataPerson_$cgmapT - CompanyDatatypes.$fDataPerson_$cgmapQl - CompanyDatatypes.$fDataPerson_$cgmapQr - CompanyDatatypes.$fDataPerson_$cgmapQ - CompanyDatatypes.$fDataPerson_$cgmapQi - CompanyDatatypes.$fDataPerson_$cgmapM - CompanyDatatypes.$fDataPerson_$cgmapMp - CompanyDatatypes.$fDataPerson_$cgmapMo - -CompanyDatatypes.$fTypeableSalary_ds2 :: GHC.Base.String -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=False, - Guidance=IF_ARGS [] 50 0}] -CompanyDatatypes.$fTypeableSalary_ds2 = - GHC.CString.unpackCString# "Salary" - -CompanyDatatypes.$fTypeableSalary_wild - :: Data.Typeable.Internal.TyCon -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 60}] -CompanyDatatypes.$fTypeableSalary_wild = - Data.Typeable.Internal.TyCon - (__word64 1667096353067349412) - (__word64 757304047316444936) - CompanyDatatypes.$fTypeableUnit_ds - CompanyDatatypes.$fTypeableUnit_ds1 - CompanyDatatypes.$fTypeableSalary_ds2 - -CompanyDatatypes.$fTypeableSalary1 - :: Data.Typeable.Internal.TypeRep -[GblId, - Str=DmdType m, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 50}] -CompanyDatatypes.$fTypeableSalary1 = - Data.Typeable.Internal.TypeRep - (__word64 1667096353067349412) - (__word64 757304047316444936) - CompanyDatatypes.$fTypeableSalary_wild - (GHC.Types.[] @ Data.Typeable.Internal.TypeRep) - -CompanyDatatypes.$fTypeableSalary_$ctypeOf - :: CompanyDatatypes.Salary -> Data.Typeable.Internal.TypeRep -[GblId, - Arity=1, - Str=DmdType Am, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ _ -> CompanyDatatypes.$fTypeableSalary1}] -CompanyDatatypes.$fTypeableSalary_$ctypeOf = - \ _ -> CompanyDatatypes.$fTypeableSalary1 - -CompanyDatatypes.$fTypeableSalary [InlPrag=INLINE (sat-args=0)] - :: Data.Typeable.Internal.Typeable CompanyDatatypes.Salary -[GblId[DFunId(nt)], - Str=DmdType, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=True) - Tmpl= CompanyDatatypes.$fTypeableSalary_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Salary>)> - :: (CompanyDatatypes.Salary -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Salary)}] -CompanyDatatypes.$fTypeableSalary = - CompanyDatatypes.$fTypeableSalary_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Salary>)> - :: (CompanyDatatypes.Salary -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Salary) - -CompanyDatatypes.$fDataSalary1 - :: (GHC.Types.Float -> CompanyDatatypes.Salary, GHC.Types.Bool) -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.$fDataSalary1 = - (CompanyDatatypes.S, GHC.Types.False) - -CompanyDatatypes.$w$cgmapMo5 - :: forall (m_aY8 :: * -> *). - GHC.Base.Monad m_aY8 => - (forall a_a1nd. m_aY8 a_a1nd) - -> (forall a_a1nc. m_aY8 a_a1nc -> m_aY8 a_a1nc -> m_aY8 a_a1nc) - -> (forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - -> CompanyDatatypes.Salary - -> m_aY8 CompanyDatatypes.Salary -[GblId, - Arity=5, - Str=DmdType SLLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=5, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [20 0 60 60 20] 460 0}] -CompanyDatatypes.$w$cgmapMo5 = - \ (@ (m_aY8 :: * -> *)) - (ww_s2fU :: GHC.Base.Monad m_aY8) - (ww1_s2fV :: forall a_a1nd. m_aY8 a_a1nd) - (ww2_s2fW - :: forall a_a1nc. m_aY8 a_a1nc -> m_aY8 a_a1nc -> m_aY8 a_a1nc) - (w_s2fY - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w3_s2fZ :: CompanyDatatypes.Salary) -> - case ww_s2fU - of _ { GHC.Base.D:Monad ww3_s2fK ww4_s2fL ww5_s2fM ww6_s2fN -> - ww3_s2fK - @ (CompanyDatatypes.Salary, GHC.Types.Bool) - @ CompanyDatatypes.Salary - (case w3_s2fZ of _ { CompanyDatatypes.S a22_aS7 -> - let { - lvl11_s1Fa :: m_aY8 GHC.Types.Float - [LclId, Str=DmdType] - lvl11_s1Fa = - w_s2fY @ GHC.Types.Float Data.Data.$fDataFloat a22_aS7 } in - ww3_s2fK - @ (GHC.Types.Float -> CompanyDatatypes.Salary, GHC.Types.Bool) - @ (CompanyDatatypes.Salary, GHC.Types.Bool) - (ww5_s2fM - @ (GHC.Types.Float -> CompanyDatatypes.Salary, GHC.Types.Bool) - CompanyDatatypes.$fDataSalary1) - (\ (ds1_a1mK - :: (GHC.Types.Float -> CompanyDatatypes.Salary, GHC.Types.Bool)) -> - case ds1_a1mK of _ { (h_a1mN, b_a1mO) -> - case b_a1mO of _ { - GHC.Types.False -> - ww2_s2fW - @ (CompanyDatatypes.Salary, GHC.Types.Bool) - (ww3_s2fK - @ GHC.Types.Float - @ (CompanyDatatypes.Salary, GHC.Types.Bool) - lvl11_s1Fa - (\ (y'_a1mT :: GHC.Types.Float) -> - ww5_s2fM - @ (CompanyDatatypes.Salary, GHC.Types.Bool) - (h_a1mN y'_a1mT, GHC.Types.True))) - (ww5_s2fM - @ (CompanyDatatypes.Salary, GHC.Types.Bool) - (h_a1mN a22_aS7, GHC.Types.False)); - GHC.Types.True -> - ww5_s2fM - @ (CompanyDatatypes.Salary, GHC.Types.Bool) - (h_a1mN a22_aS7, GHC.Types.True) - } - }) - }) - (\ (ds_a1n1 :: (CompanyDatatypes.Salary, GHC.Types.Bool)) -> - case ds_a1n1 of _ { (x'_a1n4, b_a1n5) -> - case b_a1n5 of _ { - GHC.Types.False -> ww1_s2fV @ CompanyDatatypes.Salary; - GHC.Types.True -> ww5_s2fM @ CompanyDatatypes.Salary x'_a1n4 - } - }) - } - -CompanyDatatypes.$fDataSalary_$cgmapMo [InlPrag=INLINE[0]] - :: forall (m_aY8 :: * -> *). - Control.Monad.MonadPlus m_aY8 => - (forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - -> CompanyDatatypes.Salary -> m_aY8 CompanyDatatypes.Salary -[GblId, - Arity=3, - Str=DmdType U(SLL)LL, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapMo5, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aY8 :: * -> *)) - (w_s2fS [Occ=Once!] :: Control.Monad.MonadPlus m_aY8) - (w3_s2fY [Occ=Once] - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w4_s2fZ [Occ=Once] :: CompanyDatatypes.Salary) -> - case w_s2fS - of _ - { Control.Monad.D:MonadPlus ww_s2fU [Occ=Once] - ww1_s2fV [Occ=Once] - ww2_s2fW [Occ=Once] -> - CompanyDatatypes.$w$cgmapMo5 - @ m_aY8 ww_s2fU ww1_s2fV ww2_s2fW w3_s2fY w4_s2fZ - }}] -CompanyDatatypes.$fDataSalary_$cgmapMo = - \ (@ (m_aY8 :: * -> *)) - (w_s2fS :: Control.Monad.MonadPlus m_aY8) - (w3_s2fY - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w4_s2fZ :: CompanyDatatypes.Salary) -> - case w_s2fS - of _ { Control.Monad.D:MonadPlus ww_s2fU ww1_s2fV ww2_s2fW -> - CompanyDatatypes.$w$cgmapMo5 - @ m_aY8 ww_s2fU ww1_s2fV ww2_s2fW w3_s2fY w4_s2fZ - } - -CompanyDatatypes.$w$cgmapMp3 - :: forall (m_aXe :: * -> *). - GHC.Base.Monad m_aXe => - (forall a_a1nd. m_aXe a_a1nd) - -> (forall a_a1nc. m_aXe a_a1nc -> m_aXe a_a1nc -> m_aXe a_a1nc) - -> (forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - -> CompanyDatatypes.Salary - -> m_aXe CompanyDatatypes.Salary -[GblId, - Arity=5, - Str=DmdType SLLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=5, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [20 0 60 60 20] 390 0}] -CompanyDatatypes.$w$cgmapMp3 = - \ (@ (m_aXe :: * -> *)) - (ww_s2gc :: GHC.Base.Monad m_aXe) - (ww1_s2gd :: forall a_a1nd. m_aXe a_a1nd) - (ww2_s2ge - :: forall a_a1nc. m_aXe a_a1nc -> m_aXe a_a1nc -> m_aXe a_a1nc) - (w_s2gg - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w3_s2gh :: CompanyDatatypes.Salary) -> - case ww_s2gc - of _ { GHC.Base.D:Monad ww3_s2g2 ww4_s2g3 ww5_s2g4 ww6_s2g5 -> - ww3_s2g2 - @ (CompanyDatatypes.Salary, GHC.Types.Bool) - @ CompanyDatatypes.Salary - (case w3_s2gh of _ { CompanyDatatypes.S a22_aS7 -> - let { - lvl11_s1Fc [Dmd=Just L] :: m_aXe GHC.Types.Float - [LclId, Str=DmdType] - lvl11_s1Fc = - w_s2gg @ GHC.Types.Float Data.Data.$fDataFloat a22_aS7 } in - ww3_s2g2 - @ (GHC.Types.Float -> CompanyDatatypes.Salary, GHC.Types.Bool) - @ (CompanyDatatypes.Salary, GHC.Types.Bool) - (ww5_s2g4 - @ (GHC.Types.Float -> CompanyDatatypes.Salary, GHC.Types.Bool) - CompanyDatatypes.$fDataSalary1) - (\ (ds1_a1nF - :: (GHC.Types.Float -> CompanyDatatypes.Salary, GHC.Types.Bool)) -> - case ds1_a1nF of _ { (h_a1nI, b_a1nJ) -> - ww2_s2ge - @ (CompanyDatatypes.Salary, GHC.Types.Bool) - (ww3_s2g2 - @ GHC.Types.Float - @ (CompanyDatatypes.Salary, GHC.Types.Bool) - lvl11_s1Fc - (\ (y'_a1nL :: GHC.Types.Float) -> - ww5_s2g4 - @ (CompanyDatatypes.Salary, GHC.Types.Bool) - (h_a1nI y'_a1nL, GHC.Types.True))) - (ww5_s2g4 - @ (CompanyDatatypes.Salary, GHC.Types.Bool) - (h_a1nI a22_aS7, b_a1nJ)) - }) - }) - (\ (ds_a1nR :: (CompanyDatatypes.Salary, GHC.Types.Bool)) -> - case ds_a1nR of _ { (x'_a1nU, b_a1nV) -> - case b_a1nV of _ { - GHC.Types.False -> ww1_s2gd @ CompanyDatatypes.Salary; - GHC.Types.True -> ww5_s2g4 @ CompanyDatatypes.Salary x'_a1nU - } - }) - } - -CompanyDatatypes.$fDataSalary_$cgmapMp [InlPrag=INLINE[0]] - :: forall (m_aXe :: * -> *). - Control.Monad.MonadPlus m_aXe => - (forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - -> CompanyDatatypes.Salary -> m_aXe CompanyDatatypes.Salary -[GblId, - Arity=3, - Str=DmdType U(SLL)LL, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapMp3, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aXe :: * -> *)) - (w_s2ga [Occ=Once!] :: Control.Monad.MonadPlus m_aXe) - (w3_s2gg [Occ=Once] - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w4_s2gh [Occ=Once] :: CompanyDatatypes.Salary) -> - case w_s2ga - of _ - { Control.Monad.D:MonadPlus ww_s2gc [Occ=Once] - ww1_s2gd [Occ=Once] - ww2_s2ge [Occ=Once] -> - CompanyDatatypes.$w$cgmapMp3 - @ m_aXe ww_s2gc ww1_s2gd ww2_s2ge w3_s2gg w4_s2gh - }}] -CompanyDatatypes.$fDataSalary_$cgmapMp = - \ (@ (m_aXe :: * -> *)) - (w_s2ga :: Control.Monad.MonadPlus m_aXe) - (w3_s2gg - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w4_s2gh :: CompanyDatatypes.Salary) -> - case w_s2ga - of _ { Control.Monad.D:MonadPlus ww_s2gc ww1_s2gd ww2_s2ge -> - CompanyDatatypes.$w$cgmapMp3 - @ m_aXe ww_s2gc ww1_s2gd ww2_s2ge w3_s2gg w4_s2gh - } - -CompanyDatatypes.$w$cgmapM3 - :: forall (m_aX4 :: * -> *). - (forall a_a1ne b_a1nf. - m_aX4 a_a1ne -> (a_a1ne -> m_aX4 b_a1nf) -> m_aX4 b_a1nf) - -> (forall a_a1ni. a_a1ni -> m_aX4 a_a1ni) - -> (forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - -> GHC.Types.Float - -> m_aX4 CompanyDatatypes.Salary -[GblId, - Arity=4, - Str=DmdType SLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=4, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [120 120 60 0] 180 0}] -CompanyDatatypes.$w$cgmapM3 = - \ (@ (m_aX4 :: * -> *)) - (ww_s2go - :: forall a_a1ne b_a1nf. - m_aX4 a_a1ne -> (a_a1ne -> m_aX4 b_a1nf) -> m_aX4 b_a1nf) - (ww1_s2gq :: forall a_a1ni. a_a1ni -> m_aX4 a_a1ni) - (w_s2gt - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (ww2_s2gw :: GHC.Types.Float) -> - let { - lvl11_s1Fd [Dmd=Just L] :: m_aX4 GHC.Types.Float - [LclId, Str=DmdType] - lvl11_s1Fd = - w_s2gt @ GHC.Types.Float Data.Data.$fDataFloat ww2_s2gw } in - ww_s2go - @ (GHC.Types.Float -> CompanyDatatypes.Salary) - @ CompanyDatatypes.Salary - (ww1_s2gq - @ (GHC.Types.Float -> CompanyDatatypes.Salary) CompanyDatatypes.S) - (\ (c'_a1og :: GHC.Types.Float -> CompanyDatatypes.Salary) -> - ww_s2go - @ GHC.Types.Float - @ CompanyDatatypes.Salary - lvl11_s1Fd - (\ (x'_a1oh :: GHC.Types.Float) -> - ww1_s2gq @ CompanyDatatypes.Salary (c'_a1og x'_a1oh))) - -CompanyDatatypes.$fDataSalary_$cgmapM [InlPrag=INLINE[0]] - :: forall (m_aX4 :: * -> *). - GHC.Base.Monad m_aX4 => - (forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - -> CompanyDatatypes.Salary -> m_aX4 CompanyDatatypes.Salary -[GblId, - Arity=3, - Str=DmdType U(SALA)LU(L), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapM3, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aX4 :: * -> *)) - (w_s2gm [Occ=Once!] :: GHC.Base.Monad m_aX4) - (w3_s2gt [Occ=Once] - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (w4_s2gu [Occ=Once!] :: CompanyDatatypes.Salary) -> - case w_s2gm - of _ - { GHC.Base.D:Monad ww_s2go [Occ=Once] _ ww2_s2gq [Occ=Once] _ -> - case w4_s2gu of _ { CompanyDatatypes.S ww4_s2gw [Occ=Once] -> - CompanyDatatypes.$w$cgmapM3 - @ m_aX4 ww_s2go ww2_s2gq w3_s2gt ww4_s2gw - } - }}] -CompanyDatatypes.$fDataSalary_$cgmapM = - \ (@ (m_aX4 :: * -> *)) - (w_s2gm :: GHC.Base.Monad m_aX4) - (w3_s2gt - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (w4_s2gu :: CompanyDatatypes.Salary) -> - case w_s2gm - of _ { GHC.Base.D:Monad ww_s2go ww1_s2gp ww2_s2gq ww3_s2gr -> - case w4_s2gu of _ { CompanyDatatypes.S ww4_s2gw -> - CompanyDatatypes.$w$cgmapM3 - @ m_aX4 ww_s2go ww2_s2gq w3_s2gt ww4_s2gw - } - } - -CompanyDatatypes.$fDataSalary_$cgmapQi - :: forall u_aWW. - GHC.Types.Int - -> (forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - -> CompanyDatatypes.Salary - -> u_aWW -[GblId, - Arity=3, - Str=DmdType U(L)C(C(S))U(L), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ u_a1ol) - (i_a1om [Occ=Once!] :: GHC.Types.Int) - (f_a1on [Occ=Once!] - :: forall d_a1oo. Data.Data.Data d_a1oo => d_a1oo -> u_a1ol) - (x_a1op [Occ=Once!] :: CompanyDatatypes.Salary) -> - case x_a1op of _ { CompanyDatatypes.S a22_aS7 [Occ=Once] -> - case i_a1om of _ { GHC.Types.I# x1_a1p2 [Occ=Once!] -> - case x1_a1p2 of _ { - __DEFAULT -> Data.Maybe.fromJust1 @ u_a1ol; - 0 -> f_a1on @ GHC.Types.Float Data.Data.$fDataFloat a22_aS7 - } - } - }}] -CompanyDatatypes.$fDataSalary_$cgmapQi = - \ (@ u_a1ol) - (i_a1om :: GHC.Types.Int) - (f_a1on - :: forall d_a1oo. Data.Data.Data d_a1oo => d_a1oo -> u_a1ol) - (x_a1op :: CompanyDatatypes.Salary) -> - case x_a1op of _ { CompanyDatatypes.S a22_aS7 -> - case i_a1om of _ { GHC.Types.I# x1_a1p2 -> - case x1_a1p2 of _ { - __DEFAULT -> Data.Maybe.fromJust1 @ u_a1ol; - 0 -> f_a1on @ GHC.Types.Float Data.Data.$fDataFloat a22_aS7 - } - } - } - -CompanyDatatypes.$fDataSalary_$cgmapQr - :: forall r_aWE r'_aWF. - (r'_aWF -> r_aWE -> r_aWE) - -> r_aWE - -> (forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - -> CompanyDatatypes.Salary - -> r_aWE -[GblId, - Arity=4, - Str=DmdType C(C(S))LLU(L), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=4, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ r_a1pQ) - (@ r'_a1pR) - (o_a1pS [Occ=Once!] :: r'_a1pR -> r_a1pQ -> r_a1pQ) - (r0_a1pT [Occ=Once] :: r_a1pQ) - (f_a1pU [Occ=Once!] - :: forall d_a1pV. Data.Data.Data d_a1pV => d_a1pV -> r'_a1pR) - (x0_a1pW [Occ=Once!] :: CompanyDatatypes.Salary) -> - case x0_a1pW of _ { CompanyDatatypes.S a22_aS7 [Occ=Once] -> - o_a1pS - (f_a1pU @ GHC.Types.Float Data.Data.$fDataFloat a22_aS7) r0_a1pT - }}] -CompanyDatatypes.$fDataSalary_$cgmapQr = - \ (@ r_a1pQ) - (@ r'_a1pR) - (o_a1pS :: r'_a1pR -> r_a1pQ -> r_a1pQ) - (r0_a1pT :: r_a1pQ) - (f_a1pU - :: forall d_a1pV. Data.Data.Data d_a1pV => d_a1pV -> r'_a1pR) - (x0_a1pW :: CompanyDatatypes.Salary) -> - case x0_a1pW of _ { CompanyDatatypes.S a22_aS7 -> - o_a1pS - (f_a1pU @ GHC.Types.Float Data.Data.$fDataFloat a22_aS7) r0_a1pT - } - -CompanyDatatypes.$fDataSalary_$cgmapQ - :: forall u_aWO. - (forall d_aWP. Data.Data.Data d_aWP => d_aWP -> u_aWO) - -> CompanyDatatypes.Salary -> [u_aWO] -[GblId, - Arity=2, - Str=DmdType LU(L), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ u_a1pL) - (f_a1pM [Occ=Once!] - :: forall d_a1pN. Data.Data.Data d_a1pN => d_a1pN -> u_a1pL) - (eta_B1 [Occ=Once!] :: CompanyDatatypes.Salary) -> - case eta_B1 of _ { CompanyDatatypes.S a22_aS7 [Occ=Once] -> - GHC.Types.: - @ u_a1pL - (f_a1pM @ GHC.Types.Float Data.Data.$fDataFloat a22_aS7) - (GHC.Types.[] @ u_a1pL) - }}] -CompanyDatatypes.$fDataSalary_$cgmapQ = - \ (@ u_a1pL) - (f_a1pM - :: forall d_a1pN. Data.Data.Data d_a1pN => d_a1pN -> u_a1pL) - (eta_B1 :: CompanyDatatypes.Salary) -> - case eta_B1 of _ { CompanyDatatypes.S a22_aS7 -> - GHC.Types.: - @ u_a1pL - (f_a1pM @ GHC.Types.Float Data.Data.$fDataFloat a22_aS7) - (GHC.Types.[] @ u_a1pL) - } - -CompanyDatatypes.$fDataSalary_$cgmapQl - :: forall r_aWu r'_aWv. - (r_aWu -> r'_aWv -> r_aWu) - -> r_aWu - -> (forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - -> CompanyDatatypes.Salary - -> r_aWu -[GblId, - Arity=4, - Str=DmdType C(C(S))LLU(L), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=4, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ r_a1qt) - (@ r'_a1qu) - (o_a1qv [Occ=Once!] :: r_a1qt -> r'_a1qu -> r_a1qt) - (r_a1qw [Occ=Once] :: r_a1qt) - (f_a1qx [Occ=Once!] - :: forall d_a1qy. Data.Data.Data d_a1qy => d_a1qy -> r'_a1qu) - (eta_B1 [Occ=Once!] :: CompanyDatatypes.Salary) -> - case eta_B1 of _ { CompanyDatatypes.S a22_aS7 [Occ=Once] -> - o_a1qv - r_a1qw (f_a1qx @ GHC.Types.Float Data.Data.$fDataFloat a22_aS7) - }}] -CompanyDatatypes.$fDataSalary_$cgmapQl = - \ (@ r_a1qt) - (@ r'_a1qu) - (o_a1qv :: r_a1qt -> r'_a1qu -> r_a1qt) - (r_a1qw :: r_a1qt) - (f_a1qx - :: forall d_a1qy. Data.Data.Data d_a1qy => d_a1qy -> r'_a1qu) - (eta_B1 :: CompanyDatatypes.Salary) -> - case eta_B1 of _ { CompanyDatatypes.S a22_aS7 -> - o_a1qv - r_a1qw (f_a1qx @ GHC.Types.Float Data.Data.$fDataFloat a22_aS7) - } - -CompanyDatatypes.$fDataSalary_$cgmapT - :: (forall b_aWo. Data.Data.Data b_aWo => b_aWo -> b_aWo) - -> CompanyDatatypes.Salary -> CompanyDatatypes.Salary -[GblId, - Arity=2, - Str=DmdType LU(L)m, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (f_a1r7 [Occ=Once!] - :: forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8) - (x0_a1r9 [Occ=Once!] :: CompanyDatatypes.Salary) -> - case x0_a1r9 of _ { CompanyDatatypes.S a22_aS7 [Occ=Once] -> - CompanyDatatypes.S - (f_a1r7 @ GHC.Types.Float Data.Data.$fDataFloat a22_aS7) - }}] -CompanyDatatypes.$fDataSalary_$cgmapT = - \ (f_a1r7 - :: forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8) - (x0_a1r9 :: CompanyDatatypes.Salary) -> - case x0_a1r9 of _ { CompanyDatatypes.S a22_aS7 -> - CompanyDatatypes.S - (f_a1r7 @ GHC.Types.Float Data.Data.$fDataFloat a22_aS7) - } - -CompanyDatatypes.$fDataSalary_$cdataCast2 - :: forall (c_aWc :: * -> *) (t_aWd :: * -> * -> *). - Data.Typeable.Internal.Typeable2 t_aWd => - (forall d_aWe e_aWf. - (Data.Data.Data d_aWe, Data.Data.Data e_aWf) => - c_aWc (t_aWd d_aWe e_aWf)) - -> Data.Maybe.Maybe (c_aWc CompanyDatatypes.Salary) -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType AA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ (@ (c_a1rt :: * -> *)) (@ (t_a1ru :: * -> * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rt CompanyDatatypes.Salary)}] -CompanyDatatypes.$fDataSalary_$cdataCast2 = - \ (@ (c_a1rt :: * -> *)) (@ (t_a1ru :: * -> * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rt CompanyDatatypes.Salary) - -CompanyDatatypes.$fDataSalary_$cdataCast1 - :: forall (c_aVp :: * -> *) (t_aVq :: * -> *). - Data.Typeable.Internal.Typeable1 t_aVq => - (forall d_aVr. Data.Data.Data d_aVr => c_aVp (t_aVq d_aVr)) - -> Data.Maybe.Maybe (c_aVp CompanyDatatypes.Salary) -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType AA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ (@ (c_a1rB :: * -> *)) (@ (t_a1rC :: * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rB CompanyDatatypes.Salary)}] -CompanyDatatypes.$fDataSalary_$cdataCast1 = - \ (@ (c_a1rB :: * -> *)) (@ (t_a1rC :: * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rB CompanyDatatypes.Salary) - -CompanyDatatypes.$fDataSalary [InlPrag=[ALWAYS] CONLIKE] - :: Data.Data.Data CompanyDatatypes.Salary -[GblId[DFunId], - Str=DmdType, - Unf=DFun(arity=0) Data.Data.D:Data [{CompanyDatatypes.$fTypeableSalary}, - {CompanyDatatypes.$fDataSalary_$cgfoldl}, - {CompanyDatatypes.$fDataSalary_$cgunfold}, - {CompanyDatatypes.$fDataSalary_$ctoConstr}, - {CompanyDatatypes.$fDataSalary_$cdataTypeOf}, - {CompanyDatatypes.$fDataSalary_$cdataCast1}, - {CompanyDatatypes.$fDataSalary_$cdataCast2}, - {CompanyDatatypes.$fDataSalary_$cgmapT}, - {CompanyDatatypes.$fDataSalary_$cgmapQl}, - {CompanyDatatypes.$fDataSalary_$cgmapQr}, - {CompanyDatatypes.$fDataSalary_$cgmapQ}, - {CompanyDatatypes.$fDataSalary_$cgmapQi}, - {CompanyDatatypes.$fDataSalary_$cgmapM}, - {CompanyDatatypes.$fDataSalary_$cgmapMp}, - {CompanyDatatypes.$fDataSalary_$cgmapMo}]] -CompanyDatatypes.$fDataSalary = - Data.Data.D:Data - @ CompanyDatatypes.Salary - (CompanyDatatypes.$fTypeableSalary_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Salary>)> - :: (CompanyDatatypes.Salary -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Salary)) - CompanyDatatypes.$fDataSalary_$cgfoldl - CompanyDatatypes.$fDataSalary_$cgunfold - CompanyDatatypes.$fDataSalary_$ctoConstr - CompanyDatatypes.$fDataSalary_$cdataTypeOf - CompanyDatatypes.$fDataSalary_$cdataCast1 - CompanyDatatypes.$fDataSalary_$cdataCast2 - CompanyDatatypes.$fDataSalary_$cgmapT - CompanyDatatypes.$fDataSalary_$cgmapQl - CompanyDatatypes.$fDataSalary_$cgmapQr - CompanyDatatypes.$fDataSalary_$cgmapQ - CompanyDatatypes.$fDataSalary_$cgmapQi - CompanyDatatypes.$fDataSalary_$cgmapM - CompanyDatatypes.$fDataSalary_$cgmapMp - CompanyDatatypes.$fDataSalary_$cgmapMo - -CompanyDatatypes.$w$cgfoldl1 - :: forall (c_aV0 :: * -> *). - (forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - -> (forall g_aV3. g_aV3 -> c_aV0 g_aV3) - -> CompanyDatatypes.Person - -> CompanyDatatypes.Salary - -> c_aV0 CompanyDatatypes.Employee -[GblId, - Arity=4, - Str=DmdType C(C(C(S)))LLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=4, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [120 60 0 0] 100 0}] -CompanyDatatypes.$w$cgfoldl1 = - \ (@ (c_aV0 :: * -> *)) - (w_s2gC - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - (w3_s2gD :: forall g_aV3. g_aV3 -> c_aV0 g_aV3) - (ww_s2gG :: CompanyDatatypes.Person) - (ww1_s2gH :: CompanyDatatypes.Salary) -> - w_s2gC - @ CompanyDatatypes.Salary - @ CompanyDatatypes.Employee - CompanyDatatypes.$fDataSalary - (w_s2gC - @ CompanyDatatypes.Person - @ (CompanyDatatypes.Salary -> CompanyDatatypes.Employee) - CompanyDatatypes.$fDataPerson - (w3_s2gD - @ (CompanyDatatypes.Person - -> CompanyDatatypes.Salary -> CompanyDatatypes.Employee) - CompanyDatatypes.E) - ww_s2gG) - ww1_s2gH - -CompanyDatatypes.$fDataEmployee_$cgfoldl [InlPrag=INLINE[0]] - :: forall (c_aV0 :: * -> *). - (forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - -> (forall g_aV3. g_aV3 -> c_aV0 g_aV3) - -> CompanyDatatypes.Employee - -> c_aV0 CompanyDatatypes.Employee -[GblId, - Arity=3, - Str=DmdType C(C(C(S)))LU(LL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgfoldl1, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (c_aV0 :: * -> *)) - (w_s2gC [Occ=Once] - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - (w3_s2gD [Occ=Once] :: forall g_aV3. g_aV3 -> c_aV0 g_aV3) - (w4_s2gE [Occ=Once!] :: CompanyDatatypes.Employee) -> - case w4_s2gE - of _ { CompanyDatatypes.E ww_s2gG [Occ=Once] ww1_s2gH [Occ=Once] -> - CompanyDatatypes.$w$cgfoldl1 - @ c_aV0 w_s2gC w3_s2gD ww_s2gG ww1_s2gH - }}] -CompanyDatatypes.$fDataEmployee_$cgfoldl = - \ (@ (c_aV0 :: * -> *)) - (w_s2gC - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - (w3_s2gD :: forall g_aV3. g_aV3 -> c_aV0 g_aV3) - (w4_s2gE :: CompanyDatatypes.Employee) -> - case w4_s2gE of _ { CompanyDatatypes.E ww_s2gG ww1_s2gH -> - CompanyDatatypes.$w$cgfoldl1 - @ c_aV0 w_s2gC w3_s2gD ww_s2gG ww1_s2gH - } - -CompanyDatatypes.$fDataEmployee_$cgunfold - :: forall (c_aV9 :: * -> *). - (forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_aV9 (b_aVa -> r_aVb) -> c_aV9 r_aVb) - -> (forall r_aVc. r_aVc -> c_aV9 r_aVc) - -> Data.Data.Constr - -> c_aV9 CompanyDatatypes.Employee -[GblId, - Arity=3, - Str=DmdType C(C(S))LA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (c_t25 :: * -> *)) - (k_aSC - :: forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_t25 (b_aVa -> r_aVb) -> c_t25 r_aVb) - (z_aSD [Occ=Once!] :: forall r_aVc. r_aVc -> c_t25 r_aVc) - _ -> - k_aSC - @ CompanyDatatypes.Salary - @ CompanyDatatypes.Employee - CompanyDatatypes.$fDataSalary - (k_aSC - @ CompanyDatatypes.Person - @ (CompanyDatatypes.Salary -> CompanyDatatypes.Employee) - CompanyDatatypes.$fDataPerson - (z_aSD - @ (CompanyDatatypes.Person - -> CompanyDatatypes.Salary -> CompanyDatatypes.Employee) - CompanyDatatypes.E))}] -CompanyDatatypes.$fDataEmployee_$cgunfold = - \ (@ (c_t25 :: * -> *)) - (k_aSC - :: forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_t25 (b_aVa -> r_aVb) -> c_t25 r_aVb) - (z_aSD :: forall r_aVc. r_aVc -> c_t25 r_aVc) - _ -> - k_aSC - @ CompanyDatatypes.Salary - @ CompanyDatatypes.Employee - CompanyDatatypes.$fDataSalary - (k_aSC - @ CompanyDatatypes.Person - @ (CompanyDatatypes.Salary -> CompanyDatatypes.Employee) - CompanyDatatypes.$fDataPerson - (z_aSD - @ (CompanyDatatypes.Person - -> CompanyDatatypes.Salary -> CompanyDatatypes.Employee) - CompanyDatatypes.E)) - -CompanyDatatypes.$fDataEmployee1 - :: (CompanyDatatypes.Person - -> CompanyDatatypes.Salary -> CompanyDatatypes.Employee, - GHC.Types.Bool) -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.$fDataEmployee1 = - (CompanyDatatypes.E, GHC.Types.False) - -CompanyDatatypes.$w$cgmapMo3 - :: forall (m_aY8 :: * -> *). - GHC.Base.Monad m_aY8 => - (forall a_a1nd. m_aY8 a_a1nd) - -> (forall a_a1nc. m_aY8 a_a1nc -> m_aY8 a_a1nc -> m_aY8 a_a1nc) - -> (forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - -> CompanyDatatypes.Employee - -> m_aY8 CompanyDatatypes.Employee -[GblId, - Arity=5, - Str=DmdType SLLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=5, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [20 0 60 60 20] 580 0}] -CompanyDatatypes.$w$cgmapMo3 = - \ (@ (m_aY8 :: * -> *)) - (ww_s2gV :: GHC.Base.Monad m_aY8) - (ww1_s2gW :: forall a_a1nd. m_aY8 a_a1nd) - (ww2_s2gX - :: forall a_a1nc. m_aY8 a_a1nc -> m_aY8 a_a1nc -> m_aY8 a_a1nc) - (w_s2gZ - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w3_s2h0 :: CompanyDatatypes.Employee) -> - case ww_s2gV - of _ { GHC.Base.D:Monad ww3_s2gL ww4_s2gM ww5_s2gN ww6_s2gO -> - ww3_s2gL - @ (CompanyDatatypes.Employee, GHC.Types.Bool) - @ CompanyDatatypes.Employee - (case w3_s2h0 of _ { CompanyDatatypes.E a22_aSA a23_aSB -> - let { - a24_s1KR - :: forall d_X1xW b_X1xY. - Data.Data.Data d_X1xW => - Data.Data.Mp m_aY8 (d_X1xW -> b_X1xY) - -> d_X1xW -> m_aY8 (b_X1xY, GHC.Types.Bool) - [LclId, Arity=3, Str=DmdType LLL] - a24_s1KR = - \ (@ d_a1mF) - (@ b_a1mG) - ($dData2_a1mH :: Data.Data.Data d_a1mF) - (ds_a1mI :: Data.Data.Mp m_aY8 (d_a1mF -> b_a1mG)) - (y_a1mJ :: d_a1mF) -> - let { - lvl11_s1Fl :: m_aY8 d_a1mF - [LclId, Str=DmdType] - lvl11_s1Fl = w_s2gZ @ d_a1mF $dData2_a1mH y_a1mJ } in - ww3_s2gL - @ (d_a1mF -> b_a1mG, GHC.Types.Bool) - @ (b_a1mG, GHC.Types.Bool) - (ds_a1mI - `cast` (<Data.Data.NTCo:Mp <m_aY8> <d_a1mF -> b_a1mG>> - :: Data.Data.Mp m_aY8 (d_a1mF -> b_a1mG) - ~# - m_aY8 (d_a1mF -> b_a1mG, GHC.Types.Bool))) - (\ (ds1_a1mK :: (d_a1mF -> b_a1mG, GHC.Types.Bool)) -> - case ds1_a1mK of _ { (h_a1mN, b_a1mO) -> - case b_a1mO of _ { - GHC.Types.False -> - ww2_s2gX - @ (b_a1mG, GHC.Types.Bool) - (ww3_s2gL - @ d_a1mF - @ (b_a1mG, GHC.Types.Bool) - lvl11_s1Fl - (\ (y'_a1mT :: d_a1mF) -> - ww5_s2gN - @ (b_a1mG, GHC.Types.Bool) (h_a1mN y'_a1mT, GHC.Types.True))) - (ww5_s2gN - @ (b_a1mG, GHC.Types.Bool) (h_a1mN y_a1mJ, GHC.Types.False)); - GHC.Types.True -> - ww5_s2gN @ (b_a1mG, GHC.Types.Bool) (h_a1mN y_a1mJ, GHC.Types.True) - } - }) } in - a24_s1KR - @ CompanyDatatypes.Salary - @ CompanyDatatypes.Employee - CompanyDatatypes.$fDataSalary - ((a24_s1KR - @ CompanyDatatypes.Person - @ (CompanyDatatypes.Salary -> CompanyDatatypes.Employee) - CompanyDatatypes.$fDataPerson - ((ww5_s2gN - @ (CompanyDatatypes.Person - -> CompanyDatatypes.Salary -> CompanyDatatypes.Employee, - GHC.Types.Bool) - CompanyDatatypes.$fDataEmployee1) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aY8> - <CompanyDatatypes.Person - -> CompanyDatatypes.Salary -> CompanyDatatypes.Employee>)> - :: m_aY8 (CompanyDatatypes.Person - -> CompanyDatatypes.Salary -> CompanyDatatypes.Employee, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aY8 - (CompanyDatatypes.Person - -> CompanyDatatypes.Salary -> CompanyDatatypes.Employee))) - a22_aSA) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aY8> <CompanyDatatypes.Salary -> CompanyDatatypes.Employee>)> - :: m_aY8 (CompanyDatatypes.Salary -> CompanyDatatypes.Employee, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aY8 (CompanyDatatypes.Salary -> CompanyDatatypes.Employee))) - a23_aSB - }) - (\ (ds_a1n1 :: (CompanyDatatypes.Employee, GHC.Types.Bool)) -> - case ds_a1n1 of _ { (x'_a1n4, b_a1n5) -> - case b_a1n5 of _ { - GHC.Types.False -> ww1_s2gW @ CompanyDatatypes.Employee; - GHC.Types.True -> ww5_s2gN @ CompanyDatatypes.Employee x'_a1n4 - } - }) - } - -CompanyDatatypes.$fDataEmployee_$cgmapMo [InlPrag=INLINE[0]] - :: forall (m_aY8 :: * -> *). - Control.Monad.MonadPlus m_aY8 => - (forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - -> CompanyDatatypes.Employee -> m_aY8 CompanyDatatypes.Employee -[GblId, - Arity=3, - Str=DmdType U(SLL)LL, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapMo3, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aY8 :: * -> *)) - (w_s2gT [Occ=Once!] :: Control.Monad.MonadPlus m_aY8) - (w3_s2gZ [Occ=Once] - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w4_s2h0 [Occ=Once] :: CompanyDatatypes.Employee) -> - case w_s2gT - of _ - { Control.Monad.D:MonadPlus ww_s2gV [Occ=Once] - ww1_s2gW [Occ=Once] - ww2_s2gX [Occ=Once] -> - CompanyDatatypes.$w$cgmapMo3 - @ m_aY8 ww_s2gV ww1_s2gW ww2_s2gX w3_s2gZ w4_s2h0 - }}] -CompanyDatatypes.$fDataEmployee_$cgmapMo = - \ (@ (m_aY8 :: * -> *)) - (w_s2gT :: Control.Monad.MonadPlus m_aY8) - (w3_s2gZ - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w4_s2h0 :: CompanyDatatypes.Employee) -> - case w_s2gT - of _ { Control.Monad.D:MonadPlus ww_s2gV ww1_s2gW ww2_s2gX -> - CompanyDatatypes.$w$cgmapMo3 - @ m_aY8 ww_s2gV ww1_s2gW ww2_s2gX w3_s2gZ w4_s2h0 - } - -CompanyDatatypes.$w$cgmapMp4 - :: forall (m_aXe :: * -> *). - GHC.Base.Monad m_aXe => - (forall a_a1nd. m_aXe a_a1nd) - -> (forall a_a1nc. m_aXe a_a1nc -> m_aXe a_a1nc -> m_aXe a_a1nc) - -> (forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - -> CompanyDatatypes.Employee - -> m_aXe CompanyDatatypes.Employee -[GblId, - Arity=5, - Str=DmdType SLLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=5, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [20 0 60 60 20] 510 0}] -CompanyDatatypes.$w$cgmapMp4 = - \ (@ (m_aXe :: * -> *)) - (ww_s2hd :: GHC.Base.Monad m_aXe) - (ww1_s2he :: forall a_a1nd. m_aXe a_a1nd) - (ww2_s2hf - :: forall a_a1nc. m_aXe a_a1nc -> m_aXe a_a1nc -> m_aXe a_a1nc) - (w_s2hh - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w3_s2hi :: CompanyDatatypes.Employee) -> - case ww_s2hd - of _ { GHC.Base.D:Monad ww3_s2h3 ww4_s2h4 ww5_s2h5 ww6_s2h6 -> - ww3_s2h3 - @ (CompanyDatatypes.Employee, GHC.Types.Bool) - @ CompanyDatatypes.Employee - (case w3_s2hi of _ { CompanyDatatypes.E a22_aSA a23_aSB -> - let { - a24_s1KX - :: forall d_X1yT b_X1yV. - Data.Data.Data d_X1yT => - Data.Data.Mp m_aXe (d_X1yT -> b_X1yV) - -> d_X1yT -> m_aXe (b_X1yV, GHC.Types.Bool) - [LclId, Arity=3, Str=DmdType LLL] - a24_s1KX = - \ (@ d_a1nA) - (@ b_a1nB) - ($dData2_a1nC :: Data.Data.Data d_a1nA) - (ds_a1nD :: Data.Data.Mp m_aXe (d_a1nA -> b_a1nB)) - (y_a1nE :: d_a1nA) -> - let { - lvl11_s1Fn [Dmd=Just L] :: m_aXe d_a1nA - [LclId, Str=DmdType] - lvl11_s1Fn = w_s2hh @ d_a1nA $dData2_a1nC y_a1nE } in - ww3_s2h3 - @ (d_a1nA -> b_a1nB, GHC.Types.Bool) - @ (b_a1nB, GHC.Types.Bool) - (ds_a1nD - `cast` (<Data.Data.NTCo:Mp <m_aXe> <d_a1nA -> b_a1nB>> - :: Data.Data.Mp m_aXe (d_a1nA -> b_a1nB) - ~# - m_aXe (d_a1nA -> b_a1nB, GHC.Types.Bool))) - (\ (ds1_a1nF :: (d_a1nA -> b_a1nB, GHC.Types.Bool)) -> - case ds1_a1nF of _ { (h_a1nI, b_a1nJ) -> - ww2_s2hf - @ (b_a1nB, GHC.Types.Bool) - (ww3_s2h3 - @ d_a1nA - @ (b_a1nB, GHC.Types.Bool) - lvl11_s1Fn - (\ (y'_a1nL :: d_a1nA) -> - ww5_s2h5 - @ (b_a1nB, GHC.Types.Bool) (h_a1nI y'_a1nL, GHC.Types.True))) - (ww5_s2h5 @ (b_a1nB, GHC.Types.Bool) (h_a1nI y_a1nE, b_a1nJ)) - }) } in - a24_s1KX - @ CompanyDatatypes.Salary - @ CompanyDatatypes.Employee - CompanyDatatypes.$fDataSalary - ((a24_s1KX - @ CompanyDatatypes.Person - @ (CompanyDatatypes.Salary -> CompanyDatatypes.Employee) - CompanyDatatypes.$fDataPerson - ((ww5_s2h5 - @ (CompanyDatatypes.Person - -> CompanyDatatypes.Salary -> CompanyDatatypes.Employee, - GHC.Types.Bool) - CompanyDatatypes.$fDataEmployee1) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aXe> - <CompanyDatatypes.Person - -> CompanyDatatypes.Salary -> CompanyDatatypes.Employee>)> - :: m_aXe (CompanyDatatypes.Person - -> CompanyDatatypes.Salary -> CompanyDatatypes.Employee, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aXe - (CompanyDatatypes.Person - -> CompanyDatatypes.Salary -> CompanyDatatypes.Employee))) - a22_aSA) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aXe> <CompanyDatatypes.Salary -> CompanyDatatypes.Employee>)> - :: m_aXe (CompanyDatatypes.Salary -> CompanyDatatypes.Employee, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aXe (CompanyDatatypes.Salary -> CompanyDatatypes.Employee))) - a23_aSB - }) - (\ (ds_a1nR :: (CompanyDatatypes.Employee, GHC.Types.Bool)) -> - case ds_a1nR of _ { (x'_a1nU, b_a1nV) -> - case b_a1nV of _ { - GHC.Types.False -> ww1_s2he @ CompanyDatatypes.Employee; - GHC.Types.True -> ww5_s2h5 @ CompanyDatatypes.Employee x'_a1nU - } - }) - } - -CompanyDatatypes.$fDataEmployee_$cgmapMp [InlPrag=INLINE[0]] - :: forall (m_aXe :: * -> *). - Control.Monad.MonadPlus m_aXe => - (forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - -> CompanyDatatypes.Employee -> m_aXe CompanyDatatypes.Employee -[GblId, - Arity=3, - Str=DmdType U(SLL)LL, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapMp4, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aXe :: * -> *)) - (w_s2hb [Occ=Once!] :: Control.Monad.MonadPlus m_aXe) - (w3_s2hh [Occ=Once] - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w4_s2hi [Occ=Once] :: CompanyDatatypes.Employee) -> - case w_s2hb - of _ - { Control.Monad.D:MonadPlus ww_s2hd [Occ=Once] - ww1_s2he [Occ=Once] - ww2_s2hf [Occ=Once] -> - CompanyDatatypes.$w$cgmapMp4 - @ m_aXe ww_s2hd ww1_s2he ww2_s2hf w3_s2hh w4_s2hi - }}] -CompanyDatatypes.$fDataEmployee_$cgmapMp = - \ (@ (m_aXe :: * -> *)) - (w_s2hb :: Control.Monad.MonadPlus m_aXe) - (w3_s2hh - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w4_s2hi :: CompanyDatatypes.Employee) -> - case w_s2hb - of _ { Control.Monad.D:MonadPlus ww_s2hd ww1_s2he ww2_s2hf -> - CompanyDatatypes.$w$cgmapMp4 - @ m_aXe ww_s2hd ww1_s2he ww2_s2hf w3_s2hh w4_s2hi - } - -CompanyDatatypes.$w$cgmapM4 - :: forall (m_aX4 :: * -> *). - (forall a_a1ne b_a1nf. - m_aX4 a_a1ne -> (a_a1ne -> m_aX4 b_a1nf) -> m_aX4 b_a1nf) - -> (forall a_a1ni. a_a1ni -> m_aX4 a_a1ni) - -> (forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - -> CompanyDatatypes.Person - -> CompanyDatatypes.Salary - -> m_aX4 CompanyDatatypes.Employee -[GblId, - Arity=5, - Str=DmdType SLLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=5, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [120 120 60 0 0] 300 0}] -CompanyDatatypes.$w$cgmapM4 = - \ (@ (m_aX4 :: * -> *)) - (ww_s2hp - :: forall a_a1ne b_a1nf. - m_aX4 a_a1ne -> (a_a1ne -> m_aX4 b_a1nf) -> m_aX4 b_a1nf) - (ww1_s2hr :: forall a_a1ni. a_a1ni -> m_aX4 a_a1ni) - (w_s2hu - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (ww2_s2hx :: CompanyDatatypes.Person) - (ww3_s2hy :: CompanyDatatypes.Salary) -> - let { - k_aSy - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - m_aX4 (d_aV1 -> b_aV2) -> d_aV1 -> m_aX4 b_aV2 - [LclId, Arity=3, Str=DmdType LLL] - k_aSy = - \ (@ d_a1ob) - (@ b_a1oc) - ($dData2_a1od :: Data.Data.Data d_a1ob) - (c_a1oe :: m_aX4 (d_a1ob -> b_a1oc)) - (x_a1of :: d_a1ob) -> - let { - lvl11_s1Fo [Dmd=Just L] :: m_aX4 d_a1ob - [LclId, Str=DmdType] - lvl11_s1Fo = w_s2hu @ d_a1ob $dData2_a1od x_a1of } in - ww_s2hp - @ (d_a1ob -> b_a1oc) - @ b_a1oc - c_a1oe - (\ (c'_a1og :: d_a1ob -> b_a1oc) -> - ww_s2hp - @ d_a1ob - @ b_a1oc - lvl11_s1Fo - (\ (x'_a1oh :: d_a1ob) -> - ww1_s2hr @ b_a1oc (c'_a1og x'_a1oh))) } in - k_aSy - @ CompanyDatatypes.Salary - @ CompanyDatatypes.Employee - CompanyDatatypes.$fDataSalary - (k_aSy - @ CompanyDatatypes.Person - @ (CompanyDatatypes.Salary -> CompanyDatatypes.Employee) - CompanyDatatypes.$fDataPerson - (ww1_s2hr - @ (CompanyDatatypes.Person - -> CompanyDatatypes.Salary -> CompanyDatatypes.Employee) - CompanyDatatypes.E) - ww2_s2hx) - ww3_s2hy - -CompanyDatatypes.$fDataEmployee_$cgmapM [InlPrag=INLINE[0]] - :: forall (m_aX4 :: * -> *). - GHC.Base.Monad m_aX4 => - (forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - -> CompanyDatatypes.Employee -> m_aX4 CompanyDatatypes.Employee -[GblId, - Arity=3, - Str=DmdType U(SALA)LU(LL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapM4, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aX4 :: * -> *)) - (w_s2hn [Occ=Once!] :: GHC.Base.Monad m_aX4) - (w3_s2hu [Occ=Once] - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (w4_s2hv [Occ=Once!] :: CompanyDatatypes.Employee) -> - case w_s2hn - of _ - { GHC.Base.D:Monad ww_s2hp [Occ=Once] _ ww2_s2hr [Occ=Once] _ -> - case w4_s2hv - of _ - { CompanyDatatypes.E ww4_s2hx [Occ=Once] ww5_s2hy [Occ=Once] -> - CompanyDatatypes.$w$cgmapM4 - @ m_aX4 ww_s2hp ww2_s2hr w3_s2hu ww4_s2hx ww5_s2hy - } - }}] -CompanyDatatypes.$fDataEmployee_$cgmapM = - \ (@ (m_aX4 :: * -> *)) - (w_s2hn :: GHC.Base.Monad m_aX4) - (w3_s2hu - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (w4_s2hv :: CompanyDatatypes.Employee) -> - case w_s2hn - of _ { GHC.Base.D:Monad ww_s2hp ww1_s2hq ww2_s2hr ww3_s2hs -> - case w4_s2hv of _ { CompanyDatatypes.E ww4_s2hx ww5_s2hy -> - CompanyDatatypes.$w$cgmapM4 - @ m_aX4 ww_s2hp ww2_s2hr w3_s2hu ww4_s2hx ww5_s2hy - } - } - -CompanyDatatypes.$w$cgmapQi2 - :: forall u_aWW. - GHC.Prim.Int# - -> (forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - -> CompanyDatatypes.Person - -> CompanyDatatypes.Salary - -> u_aWW -[GblId, - Arity=4, - Str=DmdType LC(C(S))LL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=4, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [70 120 0 0] 90 0}] -CompanyDatatypes.$w$cgmapQi2 = - \ (@ u_aWW) - (ww_s2hG :: GHC.Prim.Int#) - (w_s2hI :: forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - (ww1_s2hL :: CompanyDatatypes.Person) - (ww2_s2hM :: CompanyDatatypes.Salary) -> - case ww_s2hG of _ { - __DEFAULT -> Data.Maybe.fromJust1 @ u_aWW; - 0 -> - w_s2hI - @ CompanyDatatypes.Person CompanyDatatypes.$fDataPerson ww1_s2hL; - 1 -> - w_s2hI - @ CompanyDatatypes.Salary CompanyDatatypes.$fDataSalary ww2_s2hM - } - -CompanyDatatypes.$fDataEmployee_$cgmapQi [InlPrag=INLINE[0]] - :: forall u_aWW. - GHC.Types.Int - -> (forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - -> CompanyDatatypes.Employee - -> u_aWW -[GblId, - Arity=3, - Str=DmdType U(L)C(C(S))U(LL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapQi2, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ u_aWW) - (w_s2hE [Occ=Once!] :: GHC.Types.Int) - (w3_s2hI [Occ=Once] - :: forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - (w4_s2hJ [Occ=Once!] :: CompanyDatatypes.Employee) -> - case w_s2hE of _ { GHC.Types.I# ww_s2hG [Occ=Once] -> - case w4_s2hJ - of _ - { CompanyDatatypes.E ww1_s2hL [Occ=Once] ww2_s2hM [Occ=Once] -> - CompanyDatatypes.$w$cgmapQi2 - @ u_aWW ww_s2hG w3_s2hI ww1_s2hL ww2_s2hM - } - }}] -CompanyDatatypes.$fDataEmployee_$cgmapQi = - \ (@ u_aWW) - (w_s2hE :: GHC.Types.Int) - (w3_s2hI :: forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - (w4_s2hJ :: CompanyDatatypes.Employee) -> - case w_s2hE of _ { GHC.Types.I# ww_s2hG -> - case w4_s2hJ of _ { CompanyDatatypes.E ww1_s2hL ww2_s2hM -> - CompanyDatatypes.$w$cgmapQi2 - @ u_aWW ww_s2hG w3_s2hI ww1_s2hL ww2_s2hM - } - } - -CompanyDatatypes.$w$cgmapQr2 - :: forall r_aWE r'_aWF. - (r'_aWF -> r_aWE -> r_aWE) - -> r_aWE - -> (forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - -> CompanyDatatypes.Person - -> CompanyDatatypes.Salary - -> r_aWE -[GblId, - Arity=5, - Str=DmdType C(C(S))LLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=5, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [60 0 120 0 0] 120 0}] -CompanyDatatypes.$w$cgmapQr2 = - \ (@ r_aWE) - (@ r'_aWF) - (w_s2hT :: r'_aWF -> r_aWE -> r_aWE) - (w3_s2hU :: r_aWE) - (w4_s2hV :: forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - (ww_s2hY :: CompanyDatatypes.Person) - (ww1_s2hZ :: CompanyDatatypes.Salary) -> - w_s2hT - (w4_s2hV - @ CompanyDatatypes.Person CompanyDatatypes.$fDataPerson ww_s2hY) - (w_s2hT - (w4_s2hV - @ CompanyDatatypes.Salary CompanyDatatypes.$fDataSalary ww1_s2hZ) - w3_s2hU) - -CompanyDatatypes.$fDataEmployee_$cgmapQr [InlPrag=INLINE[0]] - :: forall r_aWE r'_aWF. - (r'_aWF -> r_aWE -> r_aWE) - -> r_aWE - -> (forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - -> CompanyDatatypes.Employee - -> r_aWE -[GblId, - Arity=4, - Str=DmdType C(C(S))LLU(LL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapQr2, TopLvl=True, - Arity=4, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ r_aWE) - (@ r'_aWF) - (w_s2hT [Occ=Once] :: r'_aWF -> r_aWE -> r_aWE) - (w3_s2hU [Occ=Once] :: r_aWE) - (w4_s2hV [Occ=Once] - :: forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - (w5_s2hW [Occ=Once!] :: CompanyDatatypes.Employee) -> - case w5_s2hW - of _ { CompanyDatatypes.E ww_s2hY [Occ=Once] ww1_s2hZ [Occ=Once] -> - CompanyDatatypes.$w$cgmapQr2 - @ r_aWE @ r'_aWF w_s2hT w3_s2hU w4_s2hV ww_s2hY ww1_s2hZ - }}] -CompanyDatatypes.$fDataEmployee_$cgmapQr = - \ (@ r_aWE) - (@ r'_aWF) - (w_s2hT :: r'_aWF -> r_aWE -> r_aWE) - (w3_s2hU :: r_aWE) - (w4_s2hV :: forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - (w5_s2hW :: CompanyDatatypes.Employee) -> - case w5_s2hW of _ { CompanyDatatypes.E ww_s2hY ww1_s2hZ -> - CompanyDatatypes.$w$cgmapQr2 - @ r_aWE @ r'_aWF w_s2hT w3_s2hU w4_s2hV ww_s2hY ww1_s2hZ - } - -CompanyDatatypes.$fDataEmployee_$cgmapQ - :: forall u_aWO. - (forall d_aWP. Data.Data.Data d_aWP => d_aWP -> u_aWO) - -> CompanyDatatypes.Employee -> [u_aWO] -[GblId, - Arity=2, - Str=DmdType LU(LL), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ u_a1pL) - (f_a1pM - :: forall d_a1pN. Data.Data.Data d_a1pN => d_a1pN -> u_a1pL) - (eta_B1 [Occ=Once!] :: CompanyDatatypes.Employee) -> - case eta_B1 - of _ { CompanyDatatypes.E a22_aSA [Occ=Once] a23_aSB [Occ=Once] -> - GHC.Types.: - @ u_a1pL - (f_a1pM - @ CompanyDatatypes.Person CompanyDatatypes.$fDataPerson a22_aSA) - (GHC.Types.: - @ u_a1pL - (f_a1pM - @ CompanyDatatypes.Salary CompanyDatatypes.$fDataSalary a23_aSB) - (GHC.Types.[] @ u_a1pL)) - }}] -CompanyDatatypes.$fDataEmployee_$cgmapQ = - \ (@ u_a1pL) - (f_a1pM - :: forall d_a1pN. Data.Data.Data d_a1pN => d_a1pN -> u_a1pL) - (eta_B1 :: CompanyDatatypes.Employee) -> - case eta_B1 of _ { CompanyDatatypes.E a22_aSA a23_aSB -> - GHC.Types.: - @ u_a1pL - (f_a1pM - @ CompanyDatatypes.Person CompanyDatatypes.$fDataPerson a22_aSA) - (GHC.Types.: - @ u_a1pL - (f_a1pM - @ CompanyDatatypes.Salary CompanyDatatypes.$fDataSalary a23_aSB) - (GHC.Types.[] @ u_a1pL)) - } - -CompanyDatatypes.$w$cgmapQl2 - :: forall r_aWu r'_aWv. - (r_aWu -> r'_aWv -> r_aWu) - -> r_aWu - -> (forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - -> CompanyDatatypes.Person - -> CompanyDatatypes.Salary - -> r_aWu -[GblId, - Arity=5, - Str=DmdType C(C(S))LLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=5, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [60 0 120 0 0] 120 0}] -CompanyDatatypes.$w$cgmapQl2 = - \ (@ r_aWu) - (@ r'_aWv) - (w_s2i6 :: r_aWu -> r'_aWv -> r_aWu) - (w3_s2i7 :: r_aWu) - (w4_s2i8 :: forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - (ww_s2ib :: CompanyDatatypes.Person) - (ww1_s2ic :: CompanyDatatypes.Salary) -> - w_s2i6 - (w_s2i6 - w3_s2i7 - (w4_s2i8 - @ CompanyDatatypes.Person CompanyDatatypes.$fDataPerson ww_s2ib)) - (w4_s2i8 - @ CompanyDatatypes.Salary CompanyDatatypes.$fDataSalary ww1_s2ic) - -CompanyDatatypes.$fDataEmployee_$cgmapQl [InlPrag=INLINE[0]] - :: forall r_aWu r'_aWv. - (r_aWu -> r'_aWv -> r_aWu) - -> r_aWu - -> (forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - -> CompanyDatatypes.Employee - -> r_aWu -[GblId, - Arity=4, - Str=DmdType C(C(S))LLU(LL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapQl2, TopLvl=True, - Arity=4, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ r_aWu) - (@ r'_aWv) - (w_s2i6 [Occ=Once] :: r_aWu -> r'_aWv -> r_aWu) - (w3_s2i7 [Occ=Once] :: r_aWu) - (w4_s2i8 [Occ=Once] - :: forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - (w5_s2i9 [Occ=Once!] :: CompanyDatatypes.Employee) -> - case w5_s2i9 - of _ { CompanyDatatypes.E ww_s2ib [Occ=Once] ww1_s2ic [Occ=Once] -> - CompanyDatatypes.$w$cgmapQl2 - @ r_aWu @ r'_aWv w_s2i6 w3_s2i7 w4_s2i8 ww_s2ib ww1_s2ic - }}] -CompanyDatatypes.$fDataEmployee_$cgmapQl = - \ (@ r_aWu) - (@ r'_aWv) - (w_s2i6 :: r_aWu -> r'_aWv -> r_aWu) - (w3_s2i7 :: r_aWu) - (w4_s2i8 :: forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - (w5_s2i9 :: CompanyDatatypes.Employee) -> - case w5_s2i9 of _ { CompanyDatatypes.E ww_s2ib ww1_s2ic -> - CompanyDatatypes.$w$cgmapQl2 - @ r_aWu @ r'_aWv w_s2i6 w3_s2i7 w4_s2i8 ww_s2ib ww1_s2ic - } - -CompanyDatatypes.$fDataEmployee_$cgmapT - :: (forall b_aWo. Data.Data.Data b_aWo => b_aWo -> b_aWo) - -> CompanyDatatypes.Employee -> CompanyDatatypes.Employee -[GblId, - Arity=2, - Str=DmdType LU(LL)m, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (f_a1r7 - :: forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8) - (x0_a1r9 [Occ=Once!] :: CompanyDatatypes.Employee) -> - case x0_a1r9 - of _ { CompanyDatatypes.E a22_aSA [Occ=Once] a23_aSB [Occ=Once] -> - CompanyDatatypes.E - (f_a1r7 - @ CompanyDatatypes.Person CompanyDatatypes.$fDataPerson a22_aSA) - (f_a1r7 - @ CompanyDatatypes.Salary CompanyDatatypes.$fDataSalary a23_aSB) - }}] -CompanyDatatypes.$fDataEmployee_$cgmapT = - \ (f_a1r7 - :: forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8) - (x0_a1r9 :: CompanyDatatypes.Employee) -> - case x0_a1r9 of _ { CompanyDatatypes.E a22_aSA a23_aSB -> - CompanyDatatypes.E - (f_a1r7 - @ CompanyDatatypes.Person CompanyDatatypes.$fDataPerson a22_aSA) - (f_a1r7 - @ CompanyDatatypes.Salary CompanyDatatypes.$fDataSalary a23_aSB) - } - -CompanyDatatypes.$fDataEmployee_$cdataCast2 - :: forall (c_aWc :: * -> *) (t_aWd :: * -> * -> *). - Data.Typeable.Internal.Typeable2 t_aWd => - (forall d_aWe e_aWf. - (Data.Data.Data d_aWe, Data.Data.Data e_aWf) => - c_aWc (t_aWd d_aWe e_aWf)) - -> Data.Maybe.Maybe (c_aWc CompanyDatatypes.Employee) -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType AA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ (@ (c_a1rt :: * -> *)) (@ (t_a1ru :: * -> * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rt CompanyDatatypes.Employee)}] -CompanyDatatypes.$fDataEmployee_$cdataCast2 = - \ (@ (c_a1rt :: * -> *)) (@ (t_a1ru :: * -> * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rt CompanyDatatypes.Employee) - -CompanyDatatypes.$fDataEmployee_$cdataCast1 - :: forall (c_aVp :: * -> *) (t_aVq :: * -> *). - Data.Typeable.Internal.Typeable1 t_aVq => - (forall d_aVr. Data.Data.Data d_aVr => c_aVp (t_aVq d_aVr)) - -> Data.Maybe.Maybe (c_aVp CompanyDatatypes.Employee) -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType AA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ (@ (c_a1rB :: * -> *)) (@ (t_a1rC :: * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rB CompanyDatatypes.Employee)}] -CompanyDatatypes.$fDataEmployee_$cdataCast1 = - \ (@ (c_a1rB :: * -> *)) (@ (t_a1rC :: * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rB CompanyDatatypes.Employee) - -CompanyDatatypes.$fDataEmployee [InlPrag=[ALWAYS] CONLIKE] - :: Data.Data.Data CompanyDatatypes.Employee -[GblId[DFunId], - Str=DmdType, - Unf=DFun(arity=0) Data.Data.D:Data [{CompanyDatatypes.$fTypeableEmployee}, - {CompanyDatatypes.$fDataEmployee_$cgfoldl}, - {CompanyDatatypes.$fDataEmployee_$cgunfold}, - {CompanyDatatypes.$fDataEmployee_$ctoConstr}, - {CompanyDatatypes.$fDataEmployee_$cdataTypeOf}, - {CompanyDatatypes.$fDataEmployee_$cdataCast1}, - {CompanyDatatypes.$fDataEmployee_$cdataCast2}, - {CompanyDatatypes.$fDataEmployee_$cgmapT}, - {CompanyDatatypes.$fDataEmployee_$cgmapQl}, - {CompanyDatatypes.$fDataEmployee_$cgmapQr}, - {CompanyDatatypes.$fDataEmployee_$cgmapQ}, - {CompanyDatatypes.$fDataEmployee_$cgmapQi}, - {CompanyDatatypes.$fDataEmployee_$cgmapM}, - {CompanyDatatypes.$fDataEmployee_$cgmapMp}, - {CompanyDatatypes.$fDataEmployee_$cgmapMo}]] -CompanyDatatypes.$fDataEmployee = - Data.Data.D:Data - @ CompanyDatatypes.Employee - (CompanyDatatypes.$fTypeableEmployee_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable - <CompanyDatatypes.Employee>)> - :: (CompanyDatatypes.Employee -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Employee)) - CompanyDatatypes.$fDataEmployee_$cgfoldl - CompanyDatatypes.$fDataEmployee_$cgunfold - CompanyDatatypes.$fDataEmployee_$ctoConstr - CompanyDatatypes.$fDataEmployee_$cdataTypeOf - CompanyDatatypes.$fDataEmployee_$cdataCast1 - CompanyDatatypes.$fDataEmployee_$cdataCast2 - CompanyDatatypes.$fDataEmployee_$cgmapT - CompanyDatatypes.$fDataEmployee_$cgmapQl - CompanyDatatypes.$fDataEmployee_$cgmapQr - CompanyDatatypes.$fDataEmployee_$cgmapQ - CompanyDatatypes.$fDataEmployee_$cgmapQi - CompanyDatatypes.$fDataEmployee_$cgmapM - CompanyDatatypes.$fDataEmployee_$cgmapMp - CompanyDatatypes.$fDataEmployee_$cgmapMo - -CompanyDatatypes.$fDataDept1 - :: [CompanyDatatypes.Unit] -> Data.Typeable.Internal.TypeRep -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 30 0}] -CompanyDatatypes.$fDataDept1 = - Data.Typeable.Internal.typeOfDefault - @ [] - @ CompanyDatatypes.Unit - (Data.Typeable.Internal.$fTypeable1[]_$ctypeOf1 - `cast` (Sym <(Data.Typeable.Internal.NTCo:Typeable1 <[]>)> - :: (forall a_a1GP. [a_a1GP] -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable1 [])) - (CompanyDatatypes.$fTypeableUnit_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Unit>)> - :: (CompanyDatatypes.Unit -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Unit)) - -$dData_r3dT :: Data.Data.Data CompanyDatatypes.Name -[GblId, Str=DmdType] -$dData_r3dT = - Data.Data.$fData[] - @ GHC.Types.Char - (CompanyDatatypes.$fDataPerson2 - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <[GHC.Types.Char]>)> - :: ([GHC.Types.Char] -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable [GHC.Types.Char])) - Data.Data.$fDataChar - -CompanyDatatypes.$fDataDept_$dData1 - :: Data.Data.Data CompanyDatatypes.Name -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 30 0}] -CompanyDatatypes.$fDataDept_$dData1 = - Data.Data.$fData[] - @ GHC.Types.Char - (CompanyDatatypes.$fDataPerson2 - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <[GHC.Types.Char]>)> - :: ([GHC.Types.Char] -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable [GHC.Types.Char])) - Data.Data.$fDataChar - -CompanyDatatypes.$fDataDept_$cdataCast2 - :: forall (c_aWc :: * -> *) (t_aWd :: * -> * -> *). - Data.Typeable.Internal.Typeable2 t_aWd => - (forall d_aWe e_aWf. - (Data.Data.Data d_aWe, Data.Data.Data e_aWf) => - c_aWc (t_aWd d_aWe e_aWf)) - -> Data.Maybe.Maybe (c_aWc CompanyDatatypes.Dept) -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType AA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ (@ (c_a1rt :: * -> *)) (@ (t_a1ru :: * -> * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rt CompanyDatatypes.Dept)}] -CompanyDatatypes.$fDataDept_$cdataCast2 = - \ (@ (c_a1rt :: * -> *)) (@ (t_a1ru :: * -> * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rt CompanyDatatypes.Dept) - -CompanyDatatypes.$fDataDept_$cdataCast1 - :: forall (c_aVp :: * -> *) (t_aVq :: * -> *). - Data.Typeable.Internal.Typeable1 t_aVq => - (forall d_aVr. Data.Data.Data d_aVr => c_aVp (t_aVq d_aVr)) - -> Data.Maybe.Maybe (c_aVp CompanyDatatypes.Dept) -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType AA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ (@ (c_a1rB :: * -> *)) (@ (t_a1rC :: * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rB CompanyDatatypes.Dept)}] -CompanyDatatypes.$fDataDept_$cdataCast1 = - \ (@ (c_a1rB :: * -> *)) (@ (t_a1rC :: * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rB CompanyDatatypes.Dept) - -CompanyDatatypes.$fDataUnit_$cdataCast2 - :: forall (c_aWc :: * -> *) (t_aWd :: * -> * -> *). - Data.Typeable.Internal.Typeable2 t_aWd => - (forall d_aWe e_aWf. - (Data.Data.Data d_aWe, Data.Data.Data e_aWf) => - c_aWc (t_aWd d_aWe e_aWf)) - -> Data.Maybe.Maybe (c_aWc CompanyDatatypes.Unit) -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType AA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ (@ (c_a1rt :: * -> *)) (@ (t_a1ru :: * -> * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rt CompanyDatatypes.Unit)}] -CompanyDatatypes.$fDataUnit_$cdataCast2 = - \ (@ (c_a1rt :: * -> *)) (@ (t_a1ru :: * -> * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rt CompanyDatatypes.Unit) - -CompanyDatatypes.$fDataUnit_$cdataCast1 - :: forall (c_aVp :: * -> *) (t_aVq :: * -> *). - Data.Typeable.Internal.Typeable1 t_aVq => - (forall d_aVr. Data.Data.Data d_aVr => c_aVp (t_aVq d_aVr)) - -> Data.Maybe.Maybe (c_aVp CompanyDatatypes.Unit) -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType AA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ (@ (c_a1rB :: * -> *)) (@ (t_a1rC :: * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rB CompanyDatatypes.Unit)}] -CompanyDatatypes.$fDataUnit_$cdataCast1 = - \ (@ (c_a1rB :: * -> *)) (@ (t_a1rC :: * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rB CompanyDatatypes.Unit) - -lvl8_r3dU - :: (CompanyDatatypes.Employee -> CompanyDatatypes.Unit, - GHC.Types.Bool) -[GblId, Caf=NoCafRefs] -lvl8_r3dU = (CompanyDatatypes.PU, GHC.Types.False) - -lvl9_r3dV - :: (CompanyDatatypes.Dept -> CompanyDatatypes.Unit, GHC.Types.Bool) -[GblId, Caf=NoCafRefs] -lvl9_r3dV = (CompanyDatatypes.DU, GHC.Types.False) - -lvl10_r3dW - :: (CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> CompanyDatatypes.Dept, - GHC.Types.Bool) -[GblId, Caf=NoCafRefs] -lvl10_r3dW = (CompanyDatatypes.D, GHC.Types.False) - -Rec { -CompanyDatatypes.$fDataUnit_$cgunfold [InlPrag=INLINE[0]] - :: forall (c_aV9 :: * -> *). - (forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_aV9 (b_aVa -> r_aVb) -> c_aV9 r_aVb) - -> (forall r_aVc. r_aVc -> c_aV9 r_aVc) - -> Data.Data.Constr - -> c_aV9 CompanyDatatypes.Unit -[GblId, - Arity=3, - Str=DmdType C(C(S))LU(SAAAA), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgunfold, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (c_aV9 :: * -> *)) - (w_s2l0 [Occ=Once] - :: forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_aV9 (b_aVa -> r_aVb) -> c_aV9 r_aVb) - (w3_s2l1 [Occ=Once] :: forall r_aVc. r_aVc -> c_aV9 r_aVc) - (w4_s2l2 [Occ=Once!] :: Data.Data.Constr) -> - case w4_s2l2 of _ { Data.Data.Constr ww_s2l4 [Occ=Once] _ _ _ _ -> - CompanyDatatypes.$w$cgunfold @ c_aV9 w_s2l0 w3_s2l1 ww_s2l4 - }}] -CompanyDatatypes.$fDataUnit_$cgunfold = - \ (@ (c_aV9 :: * -> *)) - (w_s2l0 - :: forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_aV9 (b_aVa -> r_aVb) -> c_aV9 r_aVb) - (w3_s2l1 :: forall r_aVc. r_aVc -> c_aV9 r_aVc) - (w4_s2l2 :: Data.Data.Constr) -> - case w4_s2l2 - of _ - { Data.Data.Constr ww_s2l4 ww1_s2l5 ww2_s2l6 ww3_s2l7 ww4_s2l8 -> - CompanyDatatypes.$w$cgunfold @ c_aV9 w_s2l0 w3_s2l1 ww_s2l4 - } - -CompanyDatatypes.$fDataDept_$cgmapMo [InlPrag=INLINE[0]] - :: forall (m_aY8 :: * -> *). - Control.Monad.MonadPlus m_aY8 => - (forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - -> CompanyDatatypes.Dept -> m_aY8 CompanyDatatypes.Dept -[GblId, - Arity=3, - Str=DmdType U(SLL)LL, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapMo1, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aY8 :: * -> *)) - (w_s2lk [Occ=Once!] :: Control.Monad.MonadPlus m_aY8) - (w3_s2lq [Occ=Once] - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w4_s2lr [Occ=Once] :: CompanyDatatypes.Dept) -> - case w_s2lk - of _ - { Control.Monad.D:MonadPlus ww_s2lm [Occ=Once] - ww1_s2ln [Occ=Once] - ww2_s2lo [Occ=Once] -> - CompanyDatatypes.$w$cgmapMo1 - @ m_aY8 ww_s2lm ww1_s2ln ww2_s2lo w3_s2lq w4_s2lr - }}] -CompanyDatatypes.$fDataDept_$cgmapMo = - \ (@ (m_aY8 :: * -> *)) - (w_s2lk :: Control.Monad.MonadPlus m_aY8) - (w3_s2lq - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w4_s2lr :: CompanyDatatypes.Dept) -> - case w_s2lk - of _ { Control.Monad.D:MonadPlus ww_s2lm ww1_s2ln ww2_s2lo -> - CompanyDatatypes.$w$cgmapMo1 - @ m_aY8 ww_s2lm ww1_s2ln ww2_s2lo w3_s2lq w4_s2lr - } - -CompanyDatatypes.$fDataDept_$cgmapMp [InlPrag=INLINE[0]] - :: forall (m_aXe :: * -> *). - Control.Monad.MonadPlus m_aXe => - (forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - -> CompanyDatatypes.Dept -> m_aXe CompanyDatatypes.Dept -[GblId, - Arity=3, - Str=DmdType U(SLL)LL, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapMp, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aXe :: * -> *)) - (w_s2jb [Occ=Once!] :: Control.Monad.MonadPlus m_aXe) - (w3_s2jh [Occ=Once] - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w4_s2ji [Occ=Once] :: CompanyDatatypes.Dept) -> - case w_s2jb - of _ - { Control.Monad.D:MonadPlus ww_s2jd [Occ=Once] - ww1_s2je [Occ=Once] - ww2_s2jf [Occ=Once] -> - CompanyDatatypes.$w$cgmapMp - @ m_aXe ww_s2jd ww1_s2je ww2_s2jf w3_s2jh w4_s2ji - }}] -CompanyDatatypes.$fDataDept_$cgmapMp = - \ (@ (m_aXe :: * -> *)) - (w_s2jb :: Control.Monad.MonadPlus m_aXe) - (w3_s2jh - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w4_s2ji :: CompanyDatatypes.Dept) -> - case w_s2jb - of _ { Control.Monad.D:MonadPlus ww_s2jd ww1_s2je ww2_s2jf -> - CompanyDatatypes.$w$cgmapMp - @ m_aXe ww_s2jd ww1_s2je ww2_s2jf w3_s2jh w4_s2ji - } - -CompanyDatatypes.$fDataDept_$cgmapM [InlPrag=INLINE[0]] - :: forall (m_aX4 :: * -> *). - GHC.Base.Monad m_aX4 => - (forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - -> CompanyDatatypes.Dept -> m_aX4 CompanyDatatypes.Dept -[GblId, - Arity=3, - Str=DmdType U(SALA)LU(LLL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapM, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aX4 :: * -> *)) - (w_s2jn [Occ=Once!] :: GHC.Base.Monad m_aX4) - (w3_s2ju [Occ=Once] - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (w4_s2jv [Occ=Once!] :: CompanyDatatypes.Dept) -> - case w_s2jn - of _ - { GHC.Base.D:Monad ww_s2jp [Occ=Once] _ ww2_s2jr [Occ=Once] _ -> - case w4_s2jv - of _ - { CompanyDatatypes.D ww4_s2jx [Occ=Once] - ww5_s2jy [Occ=Once] - ww6_s2jz [Occ=Once] -> - CompanyDatatypes.$w$cgmapM - @ m_aX4 ww_s2jp ww2_s2jr w3_s2ju ww4_s2jx ww5_s2jy ww6_s2jz - } - }}] -CompanyDatatypes.$fDataDept_$cgmapM = - \ (@ (m_aX4 :: * -> *)) - (w_s2jn :: GHC.Base.Monad m_aX4) - (w3_s2ju - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (w4_s2jv :: CompanyDatatypes.Dept) -> - case w_s2jn - of _ { GHC.Base.D:Monad ww_s2jp ww1_s2jq ww2_s2jr ww3_s2js -> - case w4_s2jv - of _ { CompanyDatatypes.D ww4_s2jx ww5_s2jy ww6_s2jz -> - CompanyDatatypes.$w$cgmapM - @ m_aX4 ww_s2jp ww2_s2jr w3_s2ju ww4_s2jx ww5_s2jy ww6_s2jz - } - } - -CompanyDatatypes.$fDataDept_$cgmapQi [InlPrag=INLINE[0]] - :: forall u_aWW. - GHC.Types.Int - -> (forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - -> CompanyDatatypes.Dept - -> u_aWW -[GblId, - Arity=3, - Str=DmdType U(L)C(C(S))U(LLL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapQi, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ u_aWW) - (w_s2jF [Occ=Once!] :: GHC.Types.Int) - (w3_s2jJ [Occ=Once] - :: forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - (w4_s2jK [Occ=Once!] :: CompanyDatatypes.Dept) -> - case w_s2jF of _ { GHC.Types.I# ww_s2jH [Occ=Once] -> - case w4_s2jK - of _ - { CompanyDatatypes.D ww1_s2jM [Occ=Once] - ww2_s2jN [Occ=Once] - ww3_s2jO [Occ=Once] -> - CompanyDatatypes.$w$cgmapQi - @ u_aWW ww_s2jH w3_s2jJ ww1_s2jM ww2_s2jN ww3_s2jO - } - }}] -CompanyDatatypes.$fDataDept_$cgmapQi = - \ (@ u_aWW) - (w_s2jF :: GHC.Types.Int) - (w3_s2jJ :: forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - (w4_s2jK :: CompanyDatatypes.Dept) -> - case w_s2jF of _ { GHC.Types.I# ww_s2jH -> - case w4_s2jK - of _ { CompanyDatatypes.D ww1_s2jM ww2_s2jN ww3_s2jO -> - CompanyDatatypes.$w$cgmapQi - @ u_aWW ww_s2jH w3_s2jJ ww1_s2jM ww2_s2jN ww3_s2jO - } - } - -CompanyDatatypes.$fDataDept_$cgmapQ [InlPrag=INLINE[0]] - :: forall u_aWO. - (forall d_aWP. Data.Data.Data d_aWP => d_aWP -> u_aWO) - -> CompanyDatatypes.Dept -> [u_aWO] -[GblId, - Arity=2, - Str=DmdType LU(LLL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapQ, TopLvl=True, - Arity=2, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ u_aWO) - (w_s2jT [Occ=Once] - :: forall d_aWP. Data.Data.Data d_aWP => d_aWP -> u_aWO) - (w3_s2jU [Occ=Once!] :: CompanyDatatypes.Dept) -> - case w3_s2jU - of _ - { CompanyDatatypes.D ww_s2jW [Occ=Once] - ww1_s2jX [Occ=Once] - ww2_s2jY [Occ=Once] -> - CompanyDatatypes.$w$cgmapQ @ u_aWO w_s2jT ww_s2jW ww1_s2jX ww2_s2jY - }}] -CompanyDatatypes.$fDataDept_$cgmapQ = - \ (@ u_aWO) - (w_s2jT :: forall d_aWP. Data.Data.Data d_aWP => d_aWP -> u_aWO) - (w3_s2jU :: CompanyDatatypes.Dept) -> - case w3_s2jU of _ { CompanyDatatypes.D ww_s2jW ww1_s2jX ww2_s2jY -> - CompanyDatatypes.$w$cgmapQ @ u_aWO w_s2jT ww_s2jW ww1_s2jX ww2_s2jY - } - -CompanyDatatypes.$fDataDept_$cgmapQr [InlPrag=INLINE[0]] - :: forall r_aWE r'_aWF. - (r'_aWF -> r_aWE -> r_aWE) - -> r_aWE - -> (forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - -> CompanyDatatypes.Dept - -> r_aWE -[GblId, - Arity=4, - Str=DmdType C(C(S))LLU(LLL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapQr, TopLvl=True, - Arity=4, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ r_aWE) - (@ r'_aWF) - (w_s2k5 [Occ=Once] :: r'_aWF -> r_aWE -> r_aWE) - (w3_s2k6 [Occ=Once] :: r_aWE) - (w4_s2k7 [Occ=Once] - :: forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - (w5_s2k8 [Occ=Once!] :: CompanyDatatypes.Dept) -> - case w5_s2k8 - of _ - { CompanyDatatypes.D ww_s2ka [Occ=Once] - ww1_s2kb [Occ=Once] - ww2_s2kc [Occ=Once] -> - CompanyDatatypes.$w$cgmapQr - @ r_aWE @ r'_aWF w_s2k5 w3_s2k6 w4_s2k7 ww_s2ka ww1_s2kb ww2_s2kc - }}] -CompanyDatatypes.$fDataDept_$cgmapQr = - \ (@ r_aWE) - (@ r'_aWF) - (w_s2k5 :: r'_aWF -> r_aWE -> r_aWE) - (w3_s2k6 :: r_aWE) - (w4_s2k7 :: forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - (w5_s2k8 :: CompanyDatatypes.Dept) -> - case w5_s2k8 of _ { CompanyDatatypes.D ww_s2ka ww1_s2kb ww2_s2kc -> - CompanyDatatypes.$w$cgmapQr - @ r_aWE @ r'_aWF w_s2k5 w3_s2k6 w4_s2k7 ww_s2ka ww1_s2kb ww2_s2kc - } - -CompanyDatatypes.$fDataDept_$cgmapQl [InlPrag=INLINE[0]] - :: forall r_aWu r'_aWv. - (r_aWu -> r'_aWv -> r_aWu) - -> r_aWu - -> (forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - -> CompanyDatatypes.Dept - -> r_aWu -[GblId, - Arity=4, - Str=DmdType C(C(S))LLU(LLL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapQl, TopLvl=True, - Arity=4, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ r_aWu) - (@ r'_aWv) - (w_s2kj [Occ=Once] :: r_aWu -> r'_aWv -> r_aWu) - (w3_s2kk [Occ=Once] :: r_aWu) - (w4_s2kl [Occ=Once] - :: forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - (w5_s2km [Occ=Once!] :: CompanyDatatypes.Dept) -> - case w5_s2km - of _ - { CompanyDatatypes.D ww_s2ko [Occ=Once] - ww1_s2kp [Occ=Once] - ww2_s2kq [Occ=Once] -> - CompanyDatatypes.$w$cgmapQl - @ r_aWu @ r'_aWv w_s2kj w3_s2kk w4_s2kl ww_s2ko ww1_s2kp ww2_s2kq - }}] -CompanyDatatypes.$fDataDept_$cgmapQl = - \ (@ r_aWu) - (@ r'_aWv) - (w_s2kj :: r_aWu -> r'_aWv -> r_aWu) - (w3_s2kk :: r_aWu) - (w4_s2kl :: forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - (w5_s2km :: CompanyDatatypes.Dept) -> - case w5_s2km of _ { CompanyDatatypes.D ww_s2ko ww1_s2kp ww2_s2kq -> - CompanyDatatypes.$w$cgmapQl - @ r_aWu @ r'_aWv w_s2kj w3_s2kk w4_s2kl ww_s2ko ww1_s2kp ww2_s2kq - } - -CompanyDatatypes.$fDataDept_$cgunfold [InlPrag=INLINE[0]] - :: forall (c_aV9 :: * -> *). - (forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_aV9 (b_aVa -> r_aVb) -> c_aV9 r_aVb) - -> (forall r_aVc. r_aVc -> c_aV9 r_aVc) - -> Data.Data.Constr - -> c_aV9 CompanyDatatypes.Dept -[GblId, - Arity=3, - Str=DmdType C(C(S))LA, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgunfold1, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ (@ (c_aV9 :: * -> *)) - (w_s2kH [Occ=Once] - :: forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_aV9 (b_aVa -> r_aVb) -> c_aV9 r_aVb) - (w3_s2kI [Occ=Once] :: forall r_aVc. r_aVc -> c_aV9 r_aVc) - _ -> - CompanyDatatypes.$w$cgunfold1 @ c_aV9 w_s2kH w3_s2kI}] -CompanyDatatypes.$fDataDept_$cgunfold = - \ (@ (c_aV9 :: * -> *)) - (w_s2kH - :: forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_aV9 (b_aVa -> r_aVb) -> c_aV9 r_aVb) - (w3_s2kI :: forall r_aVc. r_aVc -> c_aV9 r_aVc) - _ -> - CompanyDatatypes.$w$cgunfold1 @ c_aV9 w_s2kH w3_s2kI - -CompanyDatatypes.$fDataDept_$cgfoldl [InlPrag=INLINE[0]] - :: forall (c_aV0 :: * -> *). - (forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - -> (forall g_aV3. g_aV3 -> c_aV0 g_aV3) - -> CompanyDatatypes.Dept - -> c_aV0 CompanyDatatypes.Dept -[GblId, - Arity=3, - Str=DmdType C(C(C(S)))LU(LLL), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgfoldl2, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (c_aV0 :: * -> *)) - (w_s2kO [Occ=Once] - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - (w3_s2kP [Occ=Once] :: forall g_aV3. g_aV3 -> c_aV0 g_aV3) - (w4_s2kQ [Occ=Once!] :: CompanyDatatypes.Dept) -> - case w4_s2kQ - of _ - { CompanyDatatypes.D ww_s2kS [Occ=Once] - ww1_s2kT [Occ=Once] - ww2_s2kU [Occ=Once] -> - CompanyDatatypes.$w$cgfoldl2 - @ c_aV0 w_s2kO w3_s2kP ww_s2kS ww1_s2kT ww2_s2kU - }}] -CompanyDatatypes.$fDataDept_$cgfoldl = - \ (@ (c_aV0 :: * -> *)) - (w_s2kO - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - (w3_s2kP :: forall g_aV3. g_aV3 -> c_aV0 g_aV3) - (w4_s2kQ :: CompanyDatatypes.Dept) -> - case w4_s2kQ of _ { CompanyDatatypes.D ww_s2kS ww1_s2kT ww2_s2kU -> - CompanyDatatypes.$w$cgfoldl2 - @ c_aV0 w_s2kO w3_s2kP ww_s2kS ww1_s2kT ww2_s2kU - } - -CompanyDatatypes.$fDataUnit_$cgmapMo [InlPrag=INLINE[0]] - :: forall (m_aY8 :: * -> *). - Control.Monad.MonadPlus m_aY8 => - (forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - -> CompanyDatatypes.Unit -> m_aY8 CompanyDatatypes.Unit -[GblId, - Arity=3, - Str=DmdType U(SLL)LL, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapMo2, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aY8 :: * -> *)) - (w_s2io [Occ=Once!] :: Control.Monad.MonadPlus m_aY8) - (w3_s2iu [Occ=Once] - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w4_s2iv [Occ=Once] :: CompanyDatatypes.Unit) -> - case w_s2io - of _ - { Control.Monad.D:MonadPlus ww_s2iq [Occ=Once] - ww1_s2ir [Occ=Once] - ww2_s2is [Occ=Once] -> - CompanyDatatypes.$w$cgmapMo2 - @ m_aY8 ww_s2iq ww1_s2ir ww2_s2is w3_s2iu w4_s2iv - }}] -CompanyDatatypes.$fDataUnit_$cgmapMo = - \ (@ (m_aY8 :: * -> *)) - (w_s2io :: Control.Monad.MonadPlus m_aY8) - (w3_s2iu - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w4_s2iv :: CompanyDatatypes.Unit) -> - case w_s2io - of _ { Control.Monad.D:MonadPlus ww_s2iq ww1_s2ir ww2_s2is -> - CompanyDatatypes.$w$cgmapMo2 - @ m_aY8 ww_s2iq ww1_s2ir ww2_s2is w3_s2iu w4_s2iv - } - -CompanyDatatypes.$fDataUnit_$cgmapMp [InlPrag=INLINE[0]] - :: forall (m_aXe :: * -> *). - Control.Monad.MonadPlus m_aXe => - (forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - -> CompanyDatatypes.Unit -> m_aXe CompanyDatatypes.Unit -[GblId, - Arity=3, - Str=DmdType U(SLL)LL, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapMp1, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aXe :: * -> *)) - (w_s2iG [Occ=Once!] :: Control.Monad.MonadPlus m_aXe) - (w3_s2iM [Occ=Once] - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w4_s2iN [Occ=Once] :: CompanyDatatypes.Unit) -> - case w_s2iG - of _ - { Control.Monad.D:MonadPlus ww_s2iI [Occ=Once] - ww1_s2iJ [Occ=Once] - ww2_s2iK [Occ=Once] -> - CompanyDatatypes.$w$cgmapMp1 - @ m_aXe ww_s2iI ww1_s2iJ ww2_s2iK w3_s2iM w4_s2iN - }}] -CompanyDatatypes.$fDataUnit_$cgmapMp = - \ (@ (m_aXe :: * -> *)) - (w_s2iG :: Control.Monad.MonadPlus m_aXe) - (w3_s2iM - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w4_s2iN :: CompanyDatatypes.Unit) -> - case w_s2iG - of _ { Control.Monad.D:MonadPlus ww_s2iI ww1_s2iJ ww2_s2iK -> - CompanyDatatypes.$w$cgmapMp1 - @ m_aXe ww_s2iI ww1_s2iJ ww2_s2iK w3_s2iM w4_s2iN - } - -CompanyDatatypes.$fDataUnit_$cgmapM [InlPrag=INLINE[0]] - :: forall (m_aX4 :: * -> *). - GHC.Base.Monad m_aX4 => - (forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - -> CompanyDatatypes.Unit -> m_aX4 CompanyDatatypes.Unit -[GblId, - Arity=3, - Str=DmdType U(SALA)LS, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapM1, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aX4 :: * -> *)) - (w_s2iS [Occ=Once!] :: GHC.Base.Monad m_aX4) - (w3_s2iZ [Occ=Once] - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (w4_s2j0 [Occ=Once] :: CompanyDatatypes.Unit) -> - case w_s2iS - of _ - { GHC.Base.D:Monad ww_s2iU [Occ=Once] _ ww2_s2iW [Occ=Once] _ -> - CompanyDatatypes.$w$cgmapM1 - @ m_aX4 ww_s2iU ww2_s2iW w3_s2iZ w4_s2j0 - }}] -CompanyDatatypes.$fDataUnit_$cgmapM = - \ (@ (m_aX4 :: * -> *)) - (w_s2iS :: GHC.Base.Monad m_aX4) - (w3_s2iZ - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (w4_s2j0 :: CompanyDatatypes.Unit) -> - case w_s2iS - of _ { GHC.Base.D:Monad ww_s2iU ww1_s2iV ww2_s2iW ww3_s2iX -> - CompanyDatatypes.$w$cgmapM1 - @ m_aX4 ww_s2iU ww2_s2iW w3_s2iZ w4_s2j0 - } - -CompanyDatatypes.$fDataUnit_$cgmapQl - :: forall r_aWu r'_aWv. - (r_aWu -> r'_aWv -> r_aWu) - -> r_aWu - -> (forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - -> CompanyDatatypes.Unit - -> r_aWu -[GblId, - Arity=4, - Str=DmdType C(C(S))LLS, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)}] -CompanyDatatypes.$fDataUnit_$cgmapQl = - CompanyDatatypes.$fDataUnit1 - `cast` (forall r_a1qt r'_a1qu. - <r_a1qt -> r'_a1qu -> r_a1qt> - -> <r_a1qt> - -> <forall d_a1qy. Data.Data.Data d_a1qy => d_a1qy -> r'_a1qu> - -> <CompanyDatatypes.Unit> - -> <Data.Data.NTCo:CONST <r_a1qt> <CompanyDatatypes.Unit>> - :: (forall r_a1qt r'_a1qu. - (r_a1qt -> r'_a1qu -> r_a1qt) - -> r_a1qt - -> (forall d_a1qy. Data.Data.Data d_a1qy => d_a1qy -> r'_a1qu) - -> CompanyDatatypes.Unit - -> Data.Data.CONST r_a1qt CompanyDatatypes.Unit) - ~# - (forall r_a1qt r'_a1qu. - (r_a1qt -> r'_a1qu -> r_a1qt) - -> r_a1qt - -> (forall d_a1qy. Data.Data.Data d_a1qy => d_a1qy -> r'_a1qu) - -> CompanyDatatypes.Unit - -> r_a1qt)) - -CompanyDatatypes.$fDataUnit_$cgmapT - :: (forall b_aWo. Data.Data.Data b_aWo => b_aWo -> b_aWo) - -> CompanyDatatypes.Unit -> CompanyDatatypes.Unit -[GblId, - Arity=2, - Str=DmdType LS, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)}] -CompanyDatatypes.$fDataUnit_$cgmapT = - CompanyDatatypes.$fDataUnit2 - `cast` (<forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8> - -> <CompanyDatatypes.Unit> - -> <Data.Data.NTCo:ID <CompanyDatatypes.Unit>> - :: ((forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8) - -> CompanyDatatypes.Unit -> Data.Data.ID CompanyDatatypes.Unit) - ~# - ((forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8) - -> CompanyDatatypes.Unit -> CompanyDatatypes.Unit)) - -CompanyDatatypes.$fDataUnit [InlPrag=[ALWAYS] CONLIKE] - :: Data.Data.Data CompanyDatatypes.Unit -[GblId[DFunId], - Str=DmdType, - Unf=DFun(arity=0) Data.Data.D:Data [{CompanyDatatypes.$fTypeableUnit}, - {CompanyDatatypes.$fDataUnit_$cgfoldl}, - {CompanyDatatypes.$fDataUnit_$cgunfold}, - {CompanyDatatypes.$fDataUnit_$ctoConstr}, - {CompanyDatatypes.$fDataUnit_$cdataTypeOf}, - {CompanyDatatypes.$fDataUnit_$cdataCast1}, - {CompanyDatatypes.$fDataUnit_$cdataCast2}, - {CompanyDatatypes.$fDataUnit_$cgmapT}, - {CompanyDatatypes.$fDataUnit_$cgmapQl}, - {CompanyDatatypes.$fDataUnit_$cgmapQr}, - {CompanyDatatypes.$fDataUnit_$cgmapQ}, - {CompanyDatatypes.$fDataUnit_$cgmapQi}, - {CompanyDatatypes.$fDataUnit_$cgmapM}, - {CompanyDatatypes.$fDataUnit_$cgmapMp}, - {CompanyDatatypes.$fDataUnit_$cgmapMo}]] -CompanyDatatypes.$fDataUnit = - Data.Data.D:Data - @ CompanyDatatypes.Unit - (CompanyDatatypes.$fTypeableUnit_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Unit>)> - :: (CompanyDatatypes.Unit -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Unit)) - CompanyDatatypes.$fDataUnit_$cgfoldl - CompanyDatatypes.$fDataUnit_$cgunfold - CompanyDatatypes.$fDataUnit_$ctoConstr - CompanyDatatypes.$fDataUnit_$cdataTypeOf - CompanyDatatypes.$fDataUnit_$cdataCast1 - CompanyDatatypes.$fDataUnit_$cdataCast2 - (CompanyDatatypes.$fDataUnit2 - `cast` (<forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8> - -> <CompanyDatatypes.Unit> - -> <Data.Data.NTCo:ID <CompanyDatatypes.Unit>> - :: ((forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8) - -> CompanyDatatypes.Unit -> Data.Data.ID CompanyDatatypes.Unit) - ~# - ((forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8) - -> CompanyDatatypes.Unit -> CompanyDatatypes.Unit))) - (CompanyDatatypes.$fDataUnit1 - `cast` (forall r_X1Cv r'_X1Cx. - <r_X1Cv -> r'_X1Cx -> r_X1Cv> - -> <r_X1Cv> - -> <forall d_a1qy. Data.Data.Data d_a1qy => d_a1qy -> r'_X1Cx> - -> <CompanyDatatypes.Unit> - -> <Data.Data.NTCo:CONST <r_X1Cv> <CompanyDatatypes.Unit>> - :: (forall r_X1Cv r'_X1Cx. - (r_X1Cv -> r'_X1Cx -> r_X1Cv) - -> r_X1Cv - -> (forall d_a1qy. Data.Data.Data d_a1qy => d_a1qy -> r'_X1Cx) - -> CompanyDatatypes.Unit - -> Data.Data.CONST r_X1Cv CompanyDatatypes.Unit) - ~# - (forall r_X1Cv r'_X1Cx. - (r_X1Cv -> r'_X1Cx -> r_X1Cv) - -> r_X1Cv - -> (forall d_a1qy. Data.Data.Data d_a1qy => d_a1qy -> r'_X1Cx) - -> CompanyDatatypes.Unit - -> r_X1Cv))) - CompanyDatatypes.$fDataUnit_$cgmapQr - CompanyDatatypes.$fDataUnit_$cgmapQ - CompanyDatatypes.$fDataUnit_$cgmapQi - CompanyDatatypes.$fDataUnit_$cgmapM - CompanyDatatypes.$fDataUnit_$cgmapMp - CompanyDatatypes.$fDataUnit_$cgmapMo - -CompanyDatatypes.$fDataDept_$dData - :: Data.Data.Data [CompanyDatatypes.Unit] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 30 0}] -CompanyDatatypes.$fDataDept_$dData = - Data.Data.$fData[] - @ CompanyDatatypes.Unit - (CompanyDatatypes.$fDataDept1 - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <[CompanyDatatypes.Unit]>)> - :: ([CompanyDatatypes.Unit] -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable [CompanyDatatypes.Unit])) - CompanyDatatypes.$fDataUnit - -CompanyDatatypes.$fDataDept_$cgmapT [InlPrag=INLINE[0]] - :: (forall b_aWo. Data.Data.Data b_aWo => b_aWo -> b_aWo) - -> CompanyDatatypes.Dept -> CompanyDatatypes.Dept -[GblId, - Arity=2, - Str=DmdType LU(LLL)m, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (w_s2kv - :: forall b_aWo. Data.Data.Data b_aWo => b_aWo -> b_aWo) - (w3_s2kw [Occ=Once!] :: CompanyDatatypes.Dept) -> - case w3_s2kw - of _ - { CompanyDatatypes.D ww_s2ky [Occ=Once] - ww1_s2kz [Occ=Once] - ww2_s2kA [Occ=Once] -> - CompanyDatatypes.D - (w_s2kv - @ CompanyDatatypes.Name - CompanyDatatypes.$fDataDept_$dData1 - ww_s2ky) - (w_s2kv - @ CompanyDatatypes.Manager - CompanyDatatypes.$fDataEmployee - ww1_s2kz) - (w_s2kv - @ [CompanyDatatypes.Unit] - CompanyDatatypes.$fDataDept_$dData - ww2_s2kA) - }}] -CompanyDatatypes.$fDataDept_$cgmapT = - \ (w_s2kv :: forall b_aWo. Data.Data.Data b_aWo => b_aWo -> b_aWo) - (w3_s2kw :: CompanyDatatypes.Dept) -> - case w3_s2kw of _ { CompanyDatatypes.D ww_s2ky ww1_s2kz ww2_s2kA -> - CompanyDatatypes.D - (w_s2kv - @ CompanyDatatypes.Name - CompanyDatatypes.$fDataDept_$dData1 - ww_s2ky) - (w_s2kv - @ CompanyDatatypes.Manager - CompanyDatatypes.$fDataEmployee - ww1_s2kz) - (w_s2kv - @ [CompanyDatatypes.Unit] - CompanyDatatypes.$fDataDept_$dData - ww2_s2kA) - } - -CompanyDatatypes.$fDataDept [InlPrag=[ALWAYS] CONLIKE] - :: Data.Data.Data CompanyDatatypes.Dept -[GblId[DFunId], - Str=DmdType, - Unf=DFun(arity=0) Data.Data.D:Data [{CompanyDatatypes.$fTypeableDept}, - {CompanyDatatypes.$fDataDept_$cgfoldl}, - {CompanyDatatypes.$fDataDept_$cgunfold}, - {CompanyDatatypes.$fDataDept_$ctoConstr}, - {CompanyDatatypes.$fDataDept_$cdataTypeOf}, - {CompanyDatatypes.$fDataDept_$cdataCast1}, - {CompanyDatatypes.$fDataDept_$cdataCast2}, - {CompanyDatatypes.$fDataDept_$cgmapT}, - {CompanyDatatypes.$fDataDept_$cgmapQl}, - {CompanyDatatypes.$fDataDept_$cgmapQr}, - {CompanyDatatypes.$fDataDept_$cgmapQ}, - {CompanyDatatypes.$fDataDept_$cgmapQi}, - {CompanyDatatypes.$fDataDept_$cgmapM}, - {CompanyDatatypes.$fDataDept_$cgmapMp}, - {CompanyDatatypes.$fDataDept_$cgmapMo}]] -CompanyDatatypes.$fDataDept = - Data.Data.D:Data - @ CompanyDatatypes.Dept - (CompanyDatatypes.$fTypeableDept_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Dept>)> - :: (CompanyDatatypes.Dept -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Dept)) - CompanyDatatypes.$fDataDept_$cgfoldl - CompanyDatatypes.$fDataDept_$cgunfold - CompanyDatatypes.$fDataDept_$ctoConstr - CompanyDatatypes.$fDataDept_$cdataTypeOf - CompanyDatatypes.$fDataDept_$cdataCast1 - CompanyDatatypes.$fDataDept_$cdataCast2 - CompanyDatatypes.$fDataDept_$cgmapT - CompanyDatatypes.$fDataDept_$cgmapQl - CompanyDatatypes.$fDataDept_$cgmapQr - CompanyDatatypes.$fDataDept_$cgmapQ - CompanyDatatypes.$fDataDept_$cgmapQi - CompanyDatatypes.$fDataDept_$cgmapM - CompanyDatatypes.$fDataDept_$cgmapMp - CompanyDatatypes.$fDataDept_$cgmapMo - -$dData1_r3dX :: Data.Data.Data [CompanyDatatypes.Unit] -[GblId, Str=DmdType] -$dData1_r3dX = - Data.Data.$fData[] - @ CompanyDatatypes.Unit - (CompanyDatatypes.$fDataDept1 - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <[CompanyDatatypes.Unit]>)> - :: ([CompanyDatatypes.Unit] -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable [CompanyDatatypes.Unit])) - CompanyDatatypes.$fDataUnit - -CompanyDatatypes.$w$cgmapMo2 [Occ=LoopBreaker] - :: forall (m_aY8 :: * -> *). - GHC.Base.Monad m_aY8 => - (forall a_a1nd. m_aY8 a_a1nd) - -> (forall a_a1nc. m_aY8 a_a1nc -> m_aY8 a_a1nc -> m_aY8 a_a1nc) - -> (forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - -> CompanyDatatypes.Unit - -> m_aY8 CompanyDatatypes.Unit -[GblId, Arity=5, Str=DmdType SLLLL] -CompanyDatatypes.$w$cgmapMo2 = - \ (@ (m_aY8 :: * -> *)) - (ww_s2iq :: GHC.Base.Monad m_aY8) - (ww1_s2ir :: forall a_a1nd. m_aY8 a_a1nd) - (ww2_s2is - :: forall a_a1nc. m_aY8 a_a1nc -> m_aY8 a_a1nc -> m_aY8 a_a1nc) - (w_s2iu - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w3_s2iv :: CompanyDatatypes.Unit) -> - case ww_s2iq - of _ { GHC.Base.D:Monad ww3_s2ig ww4_s2ih ww5_s2ii ww6_s2ij -> - ww3_s2ig - @ (CompanyDatatypes.Unit, GHC.Types.Bool) - @ CompanyDatatypes.Unit - (let { - a22_s2tD - :: forall d_a1mF b_a1mG. - Data.Data.Data d_a1mF => - Data.Data.Mp m_aY8 (d_a1mF -> b_a1mG) - -> d_a1mF -> m_aY8 (b_a1mG, GHC.Types.Bool) - [LclId, Arity=3] - a22_s2tD = - \ (@ d_a1mF) - (@ b_a1mG) - ($dData2_a1mH :: Data.Data.Data d_a1mF) - (ds_a1mI :: Data.Data.Mp m_aY8 (d_a1mF -> b_a1mG)) - (y_a1mJ :: d_a1mF) -> - let { - lvl11_s1Fw :: m_aY8 d_a1mF - [LclId, Str=DmdType] - lvl11_s1Fw = w_s2iu @ d_a1mF $dData2_a1mH y_a1mJ } in - ww3_s2ig - @ (d_a1mF -> b_a1mG, GHC.Types.Bool) - @ (b_a1mG, GHC.Types.Bool) - (ds_a1mI - `cast` (<Data.Data.NTCo:Mp <m_aY8> <d_a1mF -> b_a1mG>> - :: Data.Data.Mp m_aY8 (d_a1mF -> b_a1mG) - ~# - m_aY8 (d_a1mF -> b_a1mG, GHC.Types.Bool))) - (\ (ds1_a1mK :: (d_a1mF -> b_a1mG, GHC.Types.Bool)) -> - case ds1_a1mK of _ { (h_a1mN, b_a1mO) -> - case b_a1mO of _ { - GHC.Types.False -> - ww2_s2is - @ (b_a1mG, GHC.Types.Bool) - (ww3_s2ig - @ d_a1mF - @ (b_a1mG, GHC.Types.Bool) - lvl11_s1Fw - (\ (y'_a1mT :: d_a1mF) -> - ww5_s2ii - @ (b_a1mG, GHC.Types.Bool) (h_a1mN y'_a1mT, GHC.Types.True))) - (ww5_s2ii - @ (b_a1mG, GHC.Types.Bool) (h_a1mN y_a1mJ, GHC.Types.False)); - GHC.Types.True -> - ww5_s2ii @ (b_a1mG, GHC.Types.Bool) (h_a1mN y_a1mJ, GHC.Types.True) - } - }) } in - case w3_s2iv of _ { - CompanyDatatypes.PU a23_aSQ -> - a22_s2tD - @ CompanyDatatypes.Employee - @ CompanyDatatypes.Unit - CompanyDatatypes.$fDataEmployee - ((ww5_s2ii - @ (CompanyDatatypes.Employee -> CompanyDatatypes.Unit, - GHC.Types.Bool) - lvl8_r3dU) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aY8> <CompanyDatatypes.Employee -> CompanyDatatypes.Unit>)> - :: m_aY8 (CompanyDatatypes.Employee -> CompanyDatatypes.Unit, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aY8 (CompanyDatatypes.Employee -> CompanyDatatypes.Unit))) - a23_aSQ; - CompanyDatatypes.DU a23_aST -> - a22_s2tD - @ CompanyDatatypes.Dept - @ CompanyDatatypes.Unit - CompanyDatatypes.$fDataDept - ((ww5_s2ii - @ (CompanyDatatypes.Dept -> CompanyDatatypes.Unit, GHC.Types.Bool) - lvl9_r3dV) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aY8> <CompanyDatatypes.Dept -> CompanyDatatypes.Unit>)> - :: m_aY8 (CompanyDatatypes.Dept -> CompanyDatatypes.Unit, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aY8 (CompanyDatatypes.Dept -> CompanyDatatypes.Unit))) - a23_aST - }) - (\ (ds_a1n1 :: (CompanyDatatypes.Unit, GHC.Types.Bool)) -> - case ds_a1n1 of _ { (x'_a1n4, b_a1n5) -> - case b_a1n5 of _ { - GHC.Types.False -> ww1_s2ir @ CompanyDatatypes.Unit; - GHC.Types.True -> ww5_s2ii @ CompanyDatatypes.Unit x'_a1n4 - } - }) - } - -CompanyDatatypes.$w$cgmapMp1 [Occ=LoopBreaker] - :: forall (m_aXe :: * -> *). - GHC.Base.Monad m_aXe => - (forall a_a1nd. m_aXe a_a1nd) - -> (forall a_a1nc. m_aXe a_a1nc -> m_aXe a_a1nc -> m_aXe a_a1nc) - -> (forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - -> CompanyDatatypes.Unit - -> m_aXe CompanyDatatypes.Unit -[GblId, Arity=5, Str=DmdType SLLLL] -CompanyDatatypes.$w$cgmapMp1 = - \ (@ (m_aXe :: * -> *)) - (ww_s2iI :: GHC.Base.Monad m_aXe) - (ww1_s2iJ :: forall a_a1nd. m_aXe a_a1nd) - (ww2_s2iK - :: forall a_a1nc. m_aXe a_a1nc -> m_aXe a_a1nc -> m_aXe a_a1nc) - (w_s2iM - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w3_s2iN :: CompanyDatatypes.Unit) -> - case ww_s2iI - of _ { GHC.Base.D:Monad ww3_s2iy ww4_s2iz ww5_s2iA ww6_s2iB -> - ww3_s2iy - @ (CompanyDatatypes.Unit, GHC.Types.Bool) - @ CompanyDatatypes.Unit - (let { - a22_s2tQ - :: forall d_a1nA b_a1nB. - Data.Data.Data d_a1nA => - Data.Data.Mp m_aXe (d_a1nA -> b_a1nB) - -> d_a1nA -> m_aXe (b_a1nB, GHC.Types.Bool) - [LclId, Arity=3] - a22_s2tQ = - \ (@ d_a1nA) - (@ b_a1nB) - ($dData2_a1nC :: Data.Data.Data d_a1nA) - (ds_a1nD :: Data.Data.Mp m_aXe (d_a1nA -> b_a1nB)) - (y_a1nE :: d_a1nA) -> - let { - lvl11_s1Fy [Dmd=Just L] :: m_aXe d_a1nA - [LclId, Str=DmdType] - lvl11_s1Fy = w_s2iM @ d_a1nA $dData2_a1nC y_a1nE } in - ww3_s2iy - @ (d_a1nA -> b_a1nB, GHC.Types.Bool) - @ (b_a1nB, GHC.Types.Bool) - (ds_a1nD - `cast` (<Data.Data.NTCo:Mp <m_aXe> <d_a1nA -> b_a1nB>> - :: Data.Data.Mp m_aXe (d_a1nA -> b_a1nB) - ~# - m_aXe (d_a1nA -> b_a1nB, GHC.Types.Bool))) - (\ (ds1_a1nF :: (d_a1nA -> b_a1nB, GHC.Types.Bool)) -> - case ds1_a1nF of _ { (h_a1nI, b_a1nJ) -> - ww2_s2iK - @ (b_a1nB, GHC.Types.Bool) - (ww3_s2iy - @ d_a1nA - @ (b_a1nB, GHC.Types.Bool) - lvl11_s1Fy - (\ (y'_a1nL :: d_a1nA) -> - ww5_s2iA - @ (b_a1nB, GHC.Types.Bool) (h_a1nI y'_a1nL, GHC.Types.True))) - (ww5_s2iA @ (b_a1nB, GHC.Types.Bool) (h_a1nI y_a1nE, b_a1nJ)) - }) } in - case w3_s2iN of _ { - CompanyDatatypes.PU a23_aSQ -> - a22_s2tQ - @ CompanyDatatypes.Employee - @ CompanyDatatypes.Unit - CompanyDatatypes.$fDataEmployee - ((ww5_s2iA - @ (CompanyDatatypes.Employee -> CompanyDatatypes.Unit, - GHC.Types.Bool) - lvl8_r3dU) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aXe> <CompanyDatatypes.Employee -> CompanyDatatypes.Unit>)> - :: m_aXe (CompanyDatatypes.Employee -> CompanyDatatypes.Unit, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aXe (CompanyDatatypes.Employee -> CompanyDatatypes.Unit))) - a23_aSQ; - CompanyDatatypes.DU a23_aST -> - a22_s2tQ - @ CompanyDatatypes.Dept - @ CompanyDatatypes.Unit - CompanyDatatypes.$fDataDept - ((ww5_s2iA - @ (CompanyDatatypes.Dept -> CompanyDatatypes.Unit, GHC.Types.Bool) - lvl9_r3dV) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aXe> <CompanyDatatypes.Dept -> CompanyDatatypes.Unit>)> - :: m_aXe (CompanyDatatypes.Dept -> CompanyDatatypes.Unit, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aXe (CompanyDatatypes.Dept -> CompanyDatatypes.Unit))) - a23_aST - }) - (\ (ds_a1nR :: (CompanyDatatypes.Unit, GHC.Types.Bool)) -> - case ds_a1nR of _ { (x'_a1nU, b_a1nV) -> - case b_a1nV of _ { - GHC.Types.False -> ww1_s2iJ @ CompanyDatatypes.Unit; - GHC.Types.True -> ww5_s2iA @ CompanyDatatypes.Unit x'_a1nU - } - }) - } - -CompanyDatatypes.$w$cgmapM1 [Occ=LoopBreaker] - :: forall (m_aX4 :: * -> *). - (forall a_a1ne b_a1nf. - m_aX4 a_a1ne -> (a_a1ne -> m_aX4 b_a1nf) -> m_aX4 b_a1nf) - -> (forall a_a1ni. a_a1ni -> m_aX4 a_a1ni) - -> (forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - -> CompanyDatatypes.Unit - -> m_aX4 CompanyDatatypes.Unit -[GblId, Arity=4, Str=DmdType SLLS] -CompanyDatatypes.$w$cgmapM1 = - \ (@ (m_aX4 :: * -> *)) - (ww_s2iU - :: forall a_a1ne b_a1nf. - m_aX4 a_a1ne -> (a_a1ne -> m_aX4 b_a1nf) -> m_aX4 b_a1nf) - (ww1_s2iW :: forall a_a1ni. a_a1ni -> m_aX4 a_a1ni) - (w_s2iZ - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (w3_s2j0 :: CompanyDatatypes.Unit) -> - let { - k_aSO - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - m_aX4 (d_aV1 -> b_aV2) -> d_aV1 -> m_aX4 b_aV2 - [LclId, Arity=3] - k_aSO = - \ (@ d_a1ob) - (@ b_a1oc) - ($dData2_a1od :: Data.Data.Data d_a1ob) - (c_a1oe :: m_aX4 (d_a1ob -> b_a1oc)) - (x_a1of :: d_a1ob) -> - let { - lvl11_s1Fz [Dmd=Just L] :: m_aX4 d_a1ob - [LclId, Str=DmdType] - lvl11_s1Fz = w_s2iZ @ d_a1ob $dData2_a1od x_a1of } in - ww_s2iU - @ (d_a1ob -> b_a1oc) - @ b_a1oc - c_a1oe - (\ (c'_a1og :: d_a1ob -> b_a1oc) -> - ww_s2iU - @ d_a1ob - @ b_a1oc - lvl11_s1Fz - (\ (x'_a1oh :: d_a1ob) -> - ww1_s2iW @ b_a1oc (c'_a1og x'_a1oh))) } in - case w3_s2j0 of _ { - CompanyDatatypes.PU a22_aSQ -> - k_aSO - @ CompanyDatatypes.Employee - @ CompanyDatatypes.Unit - CompanyDatatypes.$fDataEmployee - (ww1_s2iW - @ (CompanyDatatypes.Employee -> CompanyDatatypes.Unit) - CompanyDatatypes.PU) - a22_aSQ; - CompanyDatatypes.DU a22_aST -> - k_aSO - @ CompanyDatatypes.Dept - @ CompanyDatatypes.Unit - CompanyDatatypes.$fDataDept - (ww1_s2iW - @ (CompanyDatatypes.Dept -> CompanyDatatypes.Unit) - CompanyDatatypes.DU) - a22_aST - } - -CompanyDatatypes.$fDataUnit_$cgmapQi [Occ=LoopBreaker] - :: forall u_aWW. - GHC.Types.Int - -> (forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - -> CompanyDatatypes.Unit - -> u_aWW -[GblId, Arity=3, Str=DmdType LLS] -CompanyDatatypes.$fDataUnit_$cgmapQi = - \ (@ u_a1ol) - (i_a1om :: GHC.Types.Int) - (f_a1on - :: forall d_a1oo. Data.Data.Data d_a1oo => d_a1oo -> u_a1ol) - (x_a1op :: CompanyDatatypes.Unit) -> - case x_a1op of _ { - CompanyDatatypes.PU a22_aSQ -> - case i_a1om of _ { GHC.Types.I# x1_a1p2 -> - case x1_a1p2 of _ { - __DEFAULT -> Data.Maybe.fromJust1 @ u_a1ol; - 0 -> - f_a1on - @ CompanyDatatypes.Employee CompanyDatatypes.$fDataEmployee a22_aSQ - } - }; - CompanyDatatypes.DU a22_aST -> - case i_a1om of _ { GHC.Types.I# x1_a1p2 -> - case x1_a1p2 of _ { - __DEFAULT -> Data.Maybe.fromJust1 @ u_a1ol; - 0 -> - f_a1on @ CompanyDatatypes.Dept CompanyDatatypes.$fDataDept a22_aST - } - } - } - -CompanyDatatypes.$fDataUnit_$cgmapQ [Occ=LoopBreaker] - :: forall u_aWO. - (forall d_aWP. Data.Data.Data d_aWP => d_aWP -> u_aWO) - -> CompanyDatatypes.Unit -> [u_aWO] -[GblId, Arity=2, Str=DmdType LS] -CompanyDatatypes.$fDataUnit_$cgmapQ = - \ (@ u_a1pL) - (f_a1pM - :: forall d_a1pN. Data.Data.Data d_a1pN => d_a1pN -> u_a1pL) - (eta_B1 :: CompanyDatatypes.Unit) -> - case eta_B1 of _ { - CompanyDatatypes.PU a22_aSQ -> - GHC.Types.: - @ u_a1pL - (f_a1pM - @ CompanyDatatypes.Employee - CompanyDatatypes.$fDataEmployee - a22_aSQ) - (GHC.Types.[] @ u_a1pL); - CompanyDatatypes.DU a22_aST -> - GHC.Types.: - @ u_a1pL - (f_a1pM - @ CompanyDatatypes.Dept CompanyDatatypes.$fDataDept a22_aST) - (GHC.Types.[] @ u_a1pL) - } - -CompanyDatatypes.$fDataUnit_$cgmapQr [Occ=LoopBreaker] - :: forall r_aWE r'_aWF. - (r'_aWF -> r_aWE -> r_aWE) - -> r_aWE - -> (forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - -> CompanyDatatypes.Unit - -> r_aWE -[GblId, Arity=4, Str=DmdType LLLS] -CompanyDatatypes.$fDataUnit_$cgmapQr = - \ (@ r_a1pQ) - (@ r'_a1pR) - (o_a1pS :: r'_a1pR -> r_a1pQ -> r_a1pQ) - (r0_a1pT :: r_a1pQ) - (f_a1pU - :: forall d_a1pV. Data.Data.Data d_a1pV => d_a1pV -> r'_a1pR) - (x0_a1pW :: CompanyDatatypes.Unit) -> - case x0_a1pW of _ { - CompanyDatatypes.PU a22_aSQ -> - o_a1pS - (f_a1pU - @ CompanyDatatypes.Employee - CompanyDatatypes.$fDataEmployee - a22_aSQ) - r0_a1pT; - CompanyDatatypes.DU a22_aST -> - o_a1pS - (f_a1pU - @ CompanyDatatypes.Dept CompanyDatatypes.$fDataDept a22_aST) - r0_a1pT - } - -CompanyDatatypes.$fDataUnit1 [Occ=LoopBreaker] - :: forall r_a1qt r'_a1qu. - (r_a1qt -> r'_a1qu -> r_a1qt) - -> r_a1qt - -> (forall d_a1qy. Data.Data.Data d_a1qy => d_a1qy -> r'_a1qu) - -> CompanyDatatypes.Unit - -> Data.Data.CONST r_a1qt CompanyDatatypes.Unit -[GblId, Arity=4, Str=DmdType C(C(S))LLS] -CompanyDatatypes.$fDataUnit1 = - \ (@ r_a1qt) - (@ r'_a1qu) - (o_a1qv :: r_a1qt -> r'_a1qu -> r_a1qt) - (r_a1qw :: r_a1qt) - (f_a1qx - :: forall d_a1qy. Data.Data.Data d_a1qy => d_a1qy -> r'_a1qu) - (eta_B1 :: CompanyDatatypes.Unit) -> - case eta_B1 of _ { - CompanyDatatypes.PU a22_aSQ -> - (o_a1qv - r_a1qw - (f_a1qx - @ CompanyDatatypes.Employee - CompanyDatatypes.$fDataEmployee - a22_aSQ)) - `cast` (Sym - <(Data.Data.NTCo:CONST <r_a1qt> <CompanyDatatypes.Unit>)> - :: r_a1qt ~# Data.Data.CONST r_a1qt CompanyDatatypes.Unit); - CompanyDatatypes.DU a22_aST -> - (o_a1qv - r_a1qw - (f_a1qx - @ CompanyDatatypes.Dept CompanyDatatypes.$fDataDept a22_aST)) - `cast` (Sym - <(Data.Data.NTCo:CONST <r_a1qt> <CompanyDatatypes.Unit>)> - :: r_a1qt ~# Data.Data.CONST r_a1qt CompanyDatatypes.Unit) - } - -CompanyDatatypes.$w$cgmapMo1 [Occ=LoopBreaker] - :: forall (m_aY8 :: * -> *). - GHC.Base.Monad m_aY8 => - (forall a_a1nd. m_aY8 a_a1nd) - -> (forall a_a1nc. m_aY8 a_a1nc -> m_aY8 a_a1nc -> m_aY8 a_a1nc) - -> (forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - -> CompanyDatatypes.Dept - -> m_aY8 CompanyDatatypes.Dept -[GblId, Arity=5, Str=DmdType SLLLL] -CompanyDatatypes.$w$cgmapMo1 = - \ (@ (m_aY8 :: * -> *)) - (ww_s2lm :: GHC.Base.Monad m_aY8) - (ww1_s2ln :: forall a_a1nd. m_aY8 a_a1nd) - (ww2_s2lo - :: forall a_a1nc. m_aY8 a_a1nc -> m_aY8 a_a1nc -> m_aY8 a_a1nc) - (w_s2lq - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w3_s2lr :: CompanyDatatypes.Dept) -> - case ww_s2lm - of _ { GHC.Base.D:Monad ww3_s2lc ww4_s2ld ww5_s2le ww6_s2lf -> - ww3_s2lc - @ (CompanyDatatypes.Dept, GHC.Types.Bool) - @ CompanyDatatypes.Dept - (case w3_s2lr of _ { CompanyDatatypes.D a22_aTb a23_aTc a24_aTd -> - let { - a25_s1Mv - :: forall d_X1yR b_X1yT. - Data.Data.Data d_X1yR => - Data.Data.Mp m_aY8 (d_X1yR -> b_X1yT) - -> d_X1yR -> m_aY8 (b_X1yT, GHC.Types.Bool) - [LclId, Arity=3, Str=DmdType LLL] - a25_s1Mv = - \ (@ d_a1mF) - (@ b_a1mG) - ($dData2_a1mH :: Data.Data.Data d_a1mF) - (ds_a1mI :: Data.Data.Mp m_aY8 (d_a1mF -> b_a1mG)) - (y_a1mJ :: d_a1mF) -> - let { - lvl11_s1FQ :: m_aY8 d_a1mF - [LclId, Str=DmdType] - lvl11_s1FQ = w_s2lq @ d_a1mF $dData2_a1mH y_a1mJ } in - ww3_s2lc - @ (d_a1mF -> b_a1mG, GHC.Types.Bool) - @ (b_a1mG, GHC.Types.Bool) - (ds_a1mI - `cast` (<Data.Data.NTCo:Mp <m_aY8> <d_a1mF -> b_a1mG>> - :: Data.Data.Mp m_aY8 (d_a1mF -> b_a1mG) - ~# - m_aY8 (d_a1mF -> b_a1mG, GHC.Types.Bool))) - (\ (ds1_a1mK :: (d_a1mF -> b_a1mG, GHC.Types.Bool)) -> - case ds1_a1mK of _ { (h_a1mN, b_a1mO) -> - case b_a1mO of _ { - GHC.Types.False -> - ww2_s2lo - @ (b_a1mG, GHC.Types.Bool) - (ww3_s2lc - @ d_a1mF - @ (b_a1mG, GHC.Types.Bool) - lvl11_s1FQ - (\ (y'_a1mT :: d_a1mF) -> - ww5_s2le - @ (b_a1mG, GHC.Types.Bool) (h_a1mN y'_a1mT, GHC.Types.True))) - (ww5_s2le - @ (b_a1mG, GHC.Types.Bool) (h_a1mN y_a1mJ, GHC.Types.False)); - GHC.Types.True -> - ww5_s2le @ (b_a1mG, GHC.Types.Bool) (h_a1mN y_a1mJ, GHC.Types.True) - } - }) } in - a25_s1Mv - @ [CompanyDatatypes.Unit] - @ CompanyDatatypes.Dept - CompanyDatatypes.$fDataDept_$dData - ((a25_s1Mv - @ CompanyDatatypes.Manager - @ ([CompanyDatatypes.Unit] -> CompanyDatatypes.Dept) - CompanyDatatypes.$fDataEmployee - ((a25_s1Mv - @ CompanyDatatypes.Name - @ (CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] -> CompanyDatatypes.Dept) - CompanyDatatypes.$fDataDept_$dData1 - ((ww5_s2le - @ (CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> CompanyDatatypes.Dept, - GHC.Types.Bool) - lvl10_r3dW) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aY8> - <CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> CompanyDatatypes.Dept>)> - :: m_aY8 (CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> CompanyDatatypes.Dept, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aY8 - (CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> CompanyDatatypes.Dept))) - a22_aTb) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aY8> - <CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] -> CompanyDatatypes.Dept>)> - :: m_aY8 (CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] -> CompanyDatatypes.Dept, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aY8 - (CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] -> CompanyDatatypes.Dept))) - a23_aTc) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aY8> <[CompanyDatatypes.Unit] -> CompanyDatatypes.Dept>)> - :: m_aY8 ([CompanyDatatypes.Unit] -> CompanyDatatypes.Dept, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aY8 ([CompanyDatatypes.Unit] -> CompanyDatatypes.Dept))) - a24_aTd - }) - (\ (ds_a1n1 :: (CompanyDatatypes.Dept, GHC.Types.Bool)) -> - case ds_a1n1 of _ { (x'_a1n4, b_a1n5) -> - case b_a1n5 of _ { - GHC.Types.False -> ww1_s2ln @ CompanyDatatypes.Dept; - GHC.Types.True -> ww5_s2le @ CompanyDatatypes.Dept x'_a1n4 - } - }) - } - -CompanyDatatypes.$w$cgmapMp [Occ=LoopBreaker] - :: forall (m_aXe :: * -> *). - GHC.Base.Monad m_aXe => - (forall a_a1nd. m_aXe a_a1nd) - -> (forall a_a1nc. m_aXe a_a1nc -> m_aXe a_a1nc -> m_aXe a_a1nc) - -> (forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - -> CompanyDatatypes.Dept - -> m_aXe CompanyDatatypes.Dept -[GblId, Arity=5, Str=DmdType SLLLL] -CompanyDatatypes.$w$cgmapMp = - \ (@ (m_aXe :: * -> *)) - (ww_s2jd :: GHC.Base.Monad m_aXe) - (ww1_s2je :: forall a_a1nd. m_aXe a_a1nd) - (ww2_s2jf - :: forall a_a1nc. m_aXe a_a1nc -> m_aXe a_a1nc -> m_aXe a_a1nc) - (w_s2jh - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w3_s2ji :: CompanyDatatypes.Dept) -> - case ww_s2jd - of _ { GHC.Base.D:Monad ww3_s2j3 ww4_s2j4 ww5_s2j5 ww6_s2j6 -> - ww3_s2j3 - @ (CompanyDatatypes.Dept, GHC.Types.Bool) - @ CompanyDatatypes.Dept - (case w3_s2ji of _ { CompanyDatatypes.D a22_aTb a23_aTc a24_aTd -> - let { - a25_s1Mo - :: forall d_X1zN b_X1zP. - Data.Data.Data d_X1zN => - Data.Data.Mp m_aXe (d_X1zN -> b_X1zP) - -> d_X1zN -> m_aXe (b_X1zP, GHC.Types.Bool) - [LclId, Arity=3, Str=DmdType LLL] - a25_s1Mo = - \ (@ d_a1nA) - (@ b_a1nB) - ($dData2_a1nC :: Data.Data.Data d_a1nA) - (ds_a1nD :: Data.Data.Mp m_aXe (d_a1nA -> b_a1nB)) - (y_a1nE :: d_a1nA) -> - let { - lvl11_s1FO [Dmd=Just L] :: m_aXe d_a1nA - [LclId, Str=DmdType] - lvl11_s1FO = w_s2jh @ d_a1nA $dData2_a1nC y_a1nE } in - ww3_s2j3 - @ (d_a1nA -> b_a1nB, GHC.Types.Bool) - @ (b_a1nB, GHC.Types.Bool) - (ds_a1nD - `cast` (<Data.Data.NTCo:Mp <m_aXe> <d_a1nA -> b_a1nB>> - :: Data.Data.Mp m_aXe (d_a1nA -> b_a1nB) - ~# - m_aXe (d_a1nA -> b_a1nB, GHC.Types.Bool))) - (\ (ds1_a1nF :: (d_a1nA -> b_a1nB, GHC.Types.Bool)) -> - case ds1_a1nF of _ { (h_a1nI, b_a1nJ) -> - ww2_s2jf - @ (b_a1nB, GHC.Types.Bool) - (ww3_s2j3 - @ d_a1nA - @ (b_a1nB, GHC.Types.Bool) - lvl11_s1FO - (\ (y'_a1nL :: d_a1nA) -> - ww5_s2j5 - @ (b_a1nB, GHC.Types.Bool) (h_a1nI y'_a1nL, GHC.Types.True))) - (ww5_s2j5 @ (b_a1nB, GHC.Types.Bool) (h_a1nI y_a1nE, b_a1nJ)) - }) } in - a25_s1Mo - @ [CompanyDatatypes.Unit] - @ CompanyDatatypes.Dept - CompanyDatatypes.$fDataDept_$dData - ((a25_s1Mo - @ CompanyDatatypes.Manager - @ ([CompanyDatatypes.Unit] -> CompanyDatatypes.Dept) - CompanyDatatypes.$fDataEmployee - ((a25_s1Mo - @ CompanyDatatypes.Name - @ (CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] -> CompanyDatatypes.Dept) - CompanyDatatypes.$fDataDept_$dData1 - ((ww5_s2j5 - @ (CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> CompanyDatatypes.Dept, - GHC.Types.Bool) - lvl10_r3dW) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aXe> - <CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> CompanyDatatypes.Dept>)> - :: m_aXe (CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> CompanyDatatypes.Dept, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aXe - (CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> CompanyDatatypes.Dept))) - a22_aTb) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aXe> - <CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] -> CompanyDatatypes.Dept>)> - :: m_aXe (CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] -> CompanyDatatypes.Dept, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aXe - (CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] -> CompanyDatatypes.Dept))) - a23_aTc) - `cast` (Sym - <(Data.Data.NTCo:Mp - <m_aXe> <[CompanyDatatypes.Unit] -> CompanyDatatypes.Dept>)> - :: m_aXe ([CompanyDatatypes.Unit] -> CompanyDatatypes.Dept, - GHC.Types.Bool) - ~# - Data.Data.Mp - m_aXe ([CompanyDatatypes.Unit] -> CompanyDatatypes.Dept))) - a24_aTd - }) - (\ (ds_a1nR :: (CompanyDatatypes.Dept, GHC.Types.Bool)) -> - case ds_a1nR of _ { (x'_a1nU, b_a1nV) -> - case b_a1nV of _ { - GHC.Types.False -> ww1_s2je @ CompanyDatatypes.Dept; - GHC.Types.True -> ww5_s2j5 @ CompanyDatatypes.Dept x'_a1nU - } - }) - } - -CompanyDatatypes.$w$cgmapM [Occ=LoopBreaker] - :: forall (m_aX4 :: * -> *). - (forall a_a1ne b_a1nf. - m_aX4 a_a1ne -> (a_a1ne -> m_aX4 b_a1nf) -> m_aX4 b_a1nf) - -> (forall a_a1ni. a_a1ni -> m_aX4 a_a1ni) - -> (forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - -> CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> m_aX4 CompanyDatatypes.Dept -[GblId, Arity=6, Str=DmdType SLLLLL] -CompanyDatatypes.$w$cgmapM = - \ (@ (m_aX4 :: * -> *)) - (ww_s2jp - :: forall a_a1ne b_a1nf. - m_aX4 a_a1ne -> (a_a1ne -> m_aX4 b_a1nf) -> m_aX4 b_a1nf) - (ww1_s2jr :: forall a_a1ni. a_a1ni -> m_aX4 a_a1ni) - (w_s2ju - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (ww2_s2jx :: CompanyDatatypes.Name) - (ww3_s2jy :: CompanyDatatypes.Manager) - (ww4_s2jz :: [CompanyDatatypes.Unit]) -> - let { - k_XZu - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - m_aX4 (d_aV1 -> b_aV2) -> d_aV1 -> m_aX4 b_aV2 - [LclId, Arity=3, Str=DmdType LLL] - k_XZu = - \ (@ d_a1ob) - (@ b_a1oc) - ($dData2_a1od :: Data.Data.Data d_a1ob) - (c_a1oe :: m_aX4 (d_a1ob -> b_a1oc)) - (x_a1of :: d_a1ob) -> - let { - lvl11_s1FM [Dmd=Just L] :: m_aX4 d_a1ob - [LclId, Str=DmdType] - lvl11_s1FM = w_s2ju @ d_a1ob $dData2_a1od x_a1of } in - ww_s2jp - @ (d_a1ob -> b_a1oc) - @ b_a1oc - c_a1oe - (\ (c'_a1og :: d_a1ob -> b_a1oc) -> - ww_s2jp - @ d_a1ob - @ b_a1oc - lvl11_s1FM - (\ (x'_a1oh :: d_a1ob) -> - ww1_s2jr @ b_a1oc (c'_a1og x'_a1oh))) } in - k_XZu - @ [CompanyDatatypes.Unit] - @ CompanyDatatypes.Dept - CompanyDatatypes.$fDataDept_$dData - (k_XZu - @ CompanyDatatypes.Manager - @ ([CompanyDatatypes.Unit] -> CompanyDatatypes.Dept) - CompanyDatatypes.$fDataEmployee - (k_XZu - @ CompanyDatatypes.Name - @ (CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] -> CompanyDatatypes.Dept) - CompanyDatatypes.$fDataDept_$dData1 - (ww1_s2jr - @ (CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> CompanyDatatypes.Dept) - CompanyDatatypes.D) - ww2_s2jx) - ww3_s2jy) - ww4_s2jz - -CompanyDatatypes.$w$cgmapQi [Occ=LoopBreaker] - :: forall u_aWW. - GHC.Prim.Int# - -> (forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - -> CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> u_aWW -[GblId, Arity=5, Str=DmdType LC(C(S))LLL] -CompanyDatatypes.$w$cgmapQi = - \ (@ u_aWW) - (ww_s2jH :: GHC.Prim.Int#) - (w_s2jJ :: forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - (ww1_s2jM :: CompanyDatatypes.Name) - (ww2_s2jN :: CompanyDatatypes.Manager) - (ww3_s2jO :: [CompanyDatatypes.Unit]) -> - case ww_s2jH of _ { - __DEFAULT -> Data.Maybe.fromJust1 @ u_aWW; - 0 -> - w_s2jJ - @ CompanyDatatypes.Name - CompanyDatatypes.$fDataDept_$dData1 - ww1_s2jM; - 1 -> - w_s2jJ - @ CompanyDatatypes.Manager - CompanyDatatypes.$fDataEmployee - ww2_s2jN; - 2 -> - w_s2jJ - @ [CompanyDatatypes.Unit] - CompanyDatatypes.$fDataDept_$dData - ww3_s2jO - } - -CompanyDatatypes.$w$cgmapQ [Occ=LoopBreaker] - :: forall u_aWO. - (forall d_aWP. Data.Data.Data d_aWP => d_aWP -> u_aWO) - -> CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> [u_aWO] -[GblId, Arity=4, Str=DmdType LLLL] -CompanyDatatypes.$w$cgmapQ = - \ (@ u_aWO) - (w_s2jT :: forall d_aWP. Data.Data.Data d_aWP => d_aWP -> u_aWO) - (ww_s2jW :: CompanyDatatypes.Name) - (ww1_s2jX :: CompanyDatatypes.Manager) - (ww2_s2jY :: [CompanyDatatypes.Unit]) -> - CompanyDatatypes.$w$cgmapQr - @ [u_aWO] - @ u_aWO - (GHC.Types.: @ u_aWO) - (GHC.Types.[] @ u_aWO) - w_s2jT - ww_s2jW - ww1_s2jX - ww2_s2jY - -CompanyDatatypes.$w$cgmapQr [Occ=LoopBreaker] - :: forall r_aWE r'_aWF. - (r'_aWF -> r_aWE -> r_aWE) - -> r_aWE - -> (forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - -> CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> r_aWE -[GblId, Arity=6, Str=DmdType C(C(S))LLLLL] -CompanyDatatypes.$w$cgmapQr = - \ (@ r_aWE) - (@ r'_aWF) - (w_s2k5 :: r'_aWF -> r_aWE -> r_aWE) - (w3_s2k6 :: r_aWE) - (w4_s2k7 :: forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - (ww_s2ka :: CompanyDatatypes.Name) - (ww1_s2kb :: CompanyDatatypes.Manager) - (ww2_s2kc :: [CompanyDatatypes.Unit]) -> - w_s2k5 - (w4_s2k7 - @ CompanyDatatypes.Name - CompanyDatatypes.$fDataDept_$dData1 - ww_s2ka) - (w_s2k5 - (w4_s2k7 - @ CompanyDatatypes.Manager - CompanyDatatypes.$fDataEmployee - ww1_s2kb) - (w_s2k5 - (w4_s2k7 - @ [CompanyDatatypes.Unit] - CompanyDatatypes.$fDataDept_$dData - ww2_s2kc) - w3_s2k6)) - -CompanyDatatypes.$w$cgmapQl [Occ=LoopBreaker] - :: forall r_aWu r'_aWv. - (r_aWu -> r'_aWv -> r_aWu) - -> r_aWu - -> (forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - -> CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> r_aWu -[GblId, Arity=6, Str=DmdType C(C(S))LLLLL] -CompanyDatatypes.$w$cgmapQl = - \ (@ r_aWu) - (@ r'_aWv) - (w_s2kj :: r_aWu -> r'_aWv -> r_aWu) - (w3_s2kk :: r_aWu) - (w4_s2kl :: forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - (ww_s2ko :: CompanyDatatypes.Name) - (ww1_s2kp :: CompanyDatatypes.Manager) - (ww2_s2kq :: [CompanyDatatypes.Unit]) -> - w_s2kj - (w_s2kj - (w_s2kj - w3_s2kk - (w4_s2kl - @ CompanyDatatypes.Name - CompanyDatatypes.$fDataDept_$dData1 - ww_s2ko)) - (w4_s2kl - @ CompanyDatatypes.Manager - CompanyDatatypes.$fDataEmployee - ww1_s2kp)) - (w4_s2kl - @ [CompanyDatatypes.Unit] - CompanyDatatypes.$fDataDept_$dData - ww2_s2kq) - -CompanyDatatypes.$w$cgunfold1 [Occ=LoopBreaker] - :: forall (c_aV9 :: * -> *). - (forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_aV9 (b_aVa -> r_aVb) -> c_aV9 r_aVb) - -> (forall r_aVc. r_aVc -> c_aV9 r_aVc) - -> c_aV9 CompanyDatatypes.Dept -[GblId, Arity=2, Str=DmdType C(C(S))L] -CompanyDatatypes.$w$cgunfold1 = - \ (@ (c_aV9 :: * -> *)) - (w_s2kH - :: forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_aV9 (b_aVa -> r_aVb) -> c_aV9 r_aVb) - (w3_s2kI :: forall r_aVc. r_aVc -> c_aV9 r_aVc) -> - w_s2kH - @ [CompanyDatatypes.Unit] - @ CompanyDatatypes.Dept - $dData1_r3dX - (w_s2kH - @ CompanyDatatypes.Manager - @ ([CompanyDatatypes.Unit] -> CompanyDatatypes.Dept) - CompanyDatatypes.$fDataEmployee - (w_s2kH - @ CompanyDatatypes.Name - @ (CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] -> CompanyDatatypes.Dept) - $dData_r3dT - (w3_s2kI - @ (CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> CompanyDatatypes.Dept) - CompanyDatatypes.D))) - -CompanyDatatypes.$w$cgfoldl2 [Occ=LoopBreaker] - :: forall (c_aV0 :: * -> *). - (forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - -> (forall g_aV3. g_aV3 -> c_aV0 g_aV3) - -> CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> c_aV0 CompanyDatatypes.Dept -[GblId, Arity=5, Str=DmdType C(C(C(S)))LLLL] -CompanyDatatypes.$w$cgfoldl2 = - \ (@ (c_aV0 :: * -> *)) - (w_s2kO - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - (w3_s2kP :: forall g_aV3. g_aV3 -> c_aV0 g_aV3) - (ww_s2kS :: CompanyDatatypes.Name) - (ww1_s2kT :: CompanyDatatypes.Manager) - (ww2_s2kU :: [CompanyDatatypes.Unit]) -> - w_s2kO - @ [CompanyDatatypes.Unit] - @ CompanyDatatypes.Dept - CompanyDatatypes.$fDataDept_$dData - (w_s2kO - @ CompanyDatatypes.Manager - @ ([CompanyDatatypes.Unit] -> CompanyDatatypes.Dept) - CompanyDatatypes.$fDataEmployee - (w_s2kO - @ CompanyDatatypes.Name - @ (CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] -> CompanyDatatypes.Dept) - CompanyDatatypes.$fDataDept_$dData1 - (w3_s2kP - @ (CompanyDatatypes.Name - -> CompanyDatatypes.Manager - -> [CompanyDatatypes.Unit] - -> CompanyDatatypes.Dept) - CompanyDatatypes.D) - ww_s2kS) - ww1_s2kT) - ww2_s2kU - -CompanyDatatypes.$fDataUnit2 [Occ=LoopBreaker] - :: (forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8) - -> CompanyDatatypes.Unit -> Data.Data.ID CompanyDatatypes.Unit -[GblId, Arity=2, Str=DmdType LS] -CompanyDatatypes.$fDataUnit2 = - \ (f_a1r7 - :: forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8) - (x0_a1r9 :: CompanyDatatypes.Unit) -> - case x0_a1r9 of _ { - CompanyDatatypes.PU a22_aSQ -> - (CompanyDatatypes.PU - (f_a1r7 - @ CompanyDatatypes.Employee - CompanyDatatypes.$fDataEmployee - a22_aSQ)) - `cast` (Sym <(Data.Data.NTCo:ID <CompanyDatatypes.Unit>)> - :: CompanyDatatypes.Unit ~# Data.Data.ID CompanyDatatypes.Unit); - CompanyDatatypes.DU a22_aST -> - (CompanyDatatypes.DU - (f_a1r7 - @ CompanyDatatypes.Dept CompanyDatatypes.$fDataDept a22_aST)) - `cast` (Sym <(Data.Data.NTCo:ID <CompanyDatatypes.Unit>)> - :: CompanyDatatypes.Unit ~# Data.Data.ID CompanyDatatypes.Unit) - } - -CompanyDatatypes.$w$cgunfold [Occ=LoopBreaker] - :: forall (c_aV9 :: * -> *). - (forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_aV9 (b_aVa -> r_aVb) -> c_aV9 r_aVb) - -> (forall r_aVc. r_aVc -> c_aV9 r_aVc) - -> Data.Data.ConstrRep - -> c_aV9 CompanyDatatypes.Unit -[GblId, Arity=3, Str=DmdType C(C(S))LS] -CompanyDatatypes.$w$cgunfold = - \ (@ (c_aV9 :: * -> *)) - (w_s2l0 - :: forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_aV9 (b_aVa -> r_aVb) -> c_aV9 r_aVb) - (w3_s2l1 :: forall r_aVc. r_aVc -> c_aV9 r_aVc) - (ww_s2l4 :: Data.Data.ConstrRep) -> - case ww_s2l4 of _ { - __DEFAULT -> case Data.Data.$fData()5 of wild_00 { }; - Data.Data.AlgConstr idx_a16C -> - case idx_a16C of _ { GHC.Types.I# ds_d15H -> - case ds_d15H of _ { - __DEFAULT -> - w_s2l0 - @ CompanyDatatypes.Dept - @ CompanyDatatypes.Unit - CompanyDatatypes.$fDataDept - (w3_s2l1 - @ (CompanyDatatypes.Dept -> CompanyDatatypes.Unit) - CompanyDatatypes.DU); - 1 -> - w_s2l0 - @ CompanyDatatypes.Employee - @ CompanyDatatypes.Unit - CompanyDatatypes.$fDataEmployee - (w3_s2l1 - @ (CompanyDatatypes.Employee -> CompanyDatatypes.Unit) - CompanyDatatypes.PU) - } - } - } - -CompanyDatatypes.$fDataUnit_$cgfoldl [Occ=LoopBreaker] - :: forall (c_aV0 :: * -> *). - (forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - -> (forall g_aV3. g_aV3 -> c_aV0 g_aV3) - -> CompanyDatatypes.Unit - -> c_aV0 CompanyDatatypes.Unit -[GblId, Arity=3, Str=DmdType C(C(C(S)))LS] -CompanyDatatypes.$fDataUnit_$cgfoldl = - \ (@ (c_t2D :: * -> *)) - (k_aSO - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_t2D (d_aV1 -> b_aV2) -> d_aV1 -> c_t2D b_aV2) - (z_aSP :: forall g_aV3. g_aV3 -> c_t2D g_aV3) - (ds_d15D :: CompanyDatatypes.Unit) -> - case ds_d15D of _ { - CompanyDatatypes.PU a22_aSQ -> - k_aSO - @ CompanyDatatypes.Employee - @ CompanyDatatypes.Unit - CompanyDatatypes.$fDataEmployee - (z_aSP - @ (CompanyDatatypes.Employee -> CompanyDatatypes.Unit) - CompanyDatatypes.PU) - a22_aSQ; - CompanyDatatypes.DU a22_aST -> - k_aSO - @ CompanyDatatypes.Dept - @ CompanyDatatypes.Unit - CompanyDatatypes.$fDataDept - (z_aSP - @ (CompanyDatatypes.Dept -> CompanyDatatypes.Unit) - CompanyDatatypes.DU) - a22_aST - } -end Rec } - -CompanyDatatypes.$fDataCompany2 - :: [CompanyDatatypes.Dept] -> Data.Typeable.Internal.TypeRep -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=False, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 30 0}] -CompanyDatatypes.$fDataCompany2 = - Data.Typeable.Internal.typeOfDefault - @ [] - @ CompanyDatatypes.Dept - (Data.Typeable.Internal.$fTypeable1[]_$ctypeOf1 - `cast` (Sym <(Data.Typeable.Internal.NTCo:Typeable1 <[]>)> - :: (forall a_a1GP. [a_a1GP] -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable1 [])) - (CompanyDatatypes.$fTypeableDept_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Dept>)> - :: (CompanyDatatypes.Dept -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Dept)) - -CompanyDatatypes.$fDataCompany_$dData - :: Data.Data.Data [CompanyDatatypes.Dept] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 30 0}] -CompanyDatatypes.$fDataCompany_$dData = - Data.Data.$fData[] - @ CompanyDatatypes.Dept - (CompanyDatatypes.$fDataCompany2 - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <[CompanyDatatypes.Dept]>)> - :: ([CompanyDatatypes.Dept] -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable [CompanyDatatypes.Dept])) - CompanyDatatypes.$fDataDept - -CompanyDatatypes.$fDataCompany_$cgfoldl - :: forall (c_aV0 :: * -> *). - (forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_aV0 (d_aV1 -> b_aV2) -> d_aV1 -> c_aV0 b_aV2) - -> (forall g_aV3. g_aV3 -> c_aV0 g_aV3) - -> CompanyDatatypes.Company - -> c_aV0 CompanyDatatypes.Company -[GblId, - Arity=3, - Str=DmdType C(C(C(S)))LU(L), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (c_t45 :: * -> *)) - (k_X100 [Occ=Once!] - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_t45 (d_aV1 -> b_aV2) -> d_aV1 -> c_t45 b_aV2) - (z_X102 [Occ=Once!] :: forall g_aV3. g_aV3 -> c_t45 g_aV3) - (ds_X1cS [Occ=Once!] :: CompanyDatatypes.Company) -> - case ds_X1cS of _ { CompanyDatatypes.C a22_aTo [Occ=Once] -> - k_X100 - @ [CompanyDatatypes.Dept] - @ CompanyDatatypes.Company - CompanyDatatypes.$fDataCompany_$dData - (z_X102 - @ ([CompanyDatatypes.Dept] -> CompanyDatatypes.Company) - CompanyDatatypes.C) - a22_aTo - }}] -CompanyDatatypes.$fDataCompany_$cgfoldl = - \ (@ (c_t45 :: * -> *)) - (k_X100 - :: forall d_aV1 b_aV2. - Data.Data.Data d_aV1 => - c_t45 (d_aV1 -> b_aV2) -> d_aV1 -> c_t45 b_aV2) - (z_X102 :: forall g_aV3. g_aV3 -> c_t45 g_aV3) - (ds_X1cS :: CompanyDatatypes.Company) -> - case ds_X1cS of _ { CompanyDatatypes.C a22_aTo -> - k_X100 - @ [CompanyDatatypes.Dept] - @ CompanyDatatypes.Company - CompanyDatatypes.$fDataCompany_$dData - (z_X102 - @ ([CompanyDatatypes.Dept] -> CompanyDatatypes.Company) - CompanyDatatypes.C) - a22_aTo - } - -CompanyDatatypes.$fDataCompany_$dData1 - :: Data.Data.Data [CompanyDatatypes.Dept] -[GblId, - Str=DmdType, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 30 0}] -CompanyDatatypes.$fDataCompany_$dData1 = - Data.Data.$fData[] - @ CompanyDatatypes.Dept - (CompanyDatatypes.$fDataCompany2 - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <[CompanyDatatypes.Dept]>)> - :: ([CompanyDatatypes.Dept] -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable [CompanyDatatypes.Dept])) - CompanyDatatypes.$fDataDept - -CompanyDatatypes.$fDataCompany_$cgunfold - :: forall (c_aV9 :: * -> *). - (forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_aV9 (b_aVa -> r_aVb) -> c_aV9 r_aVb) - -> (forall r_aVc. r_aVc -> c_aV9 r_aVc) - -> Data.Data.Constr - -> c_aV9 CompanyDatatypes.Company -[GblId, - Arity=3, - Str=DmdType C(C(S))LA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (c_t49 :: * -> *)) - (k_X106 [Occ=Once!] - :: forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_t49 (b_aVa -> r_aVb) -> c_t49 r_aVb) - (z_X108 [Occ=Once!] :: forall r_aVc. r_aVc -> c_t49 r_aVc) - _ -> - k_X106 - @ [CompanyDatatypes.Dept] - @ CompanyDatatypes.Company - CompanyDatatypes.$fDataCompany_$dData1 - (z_X108 - @ ([CompanyDatatypes.Dept] -> CompanyDatatypes.Company) - CompanyDatatypes.C)}] -CompanyDatatypes.$fDataCompany_$cgunfold = - \ (@ (c_t49 :: * -> *)) - (k_X106 - :: forall b_aVa r_aVb. - Data.Data.Data b_aVa => - c_t49 (b_aVa -> r_aVb) -> c_t49 r_aVb) - (z_X108 :: forall r_aVc. r_aVc -> c_t49 r_aVc) - _ -> - k_X106 - @ [CompanyDatatypes.Dept] - @ CompanyDatatypes.Company - CompanyDatatypes.$fDataCompany_$dData1 - (z_X108 - @ ([CompanyDatatypes.Dept] -> CompanyDatatypes.Company) - CompanyDatatypes.C) - -CompanyDatatypes.$fDataCompany1 - :: ([CompanyDatatypes.Dept] -> CompanyDatatypes.Company, - GHC.Types.Bool) -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, - ConLike=True, WorkFree=False, Expandable=True, - Guidance=IF_ARGS [] 10 30}] -CompanyDatatypes.$fDataCompany1 = - (CompanyDatatypes.C, GHC.Types.False) - -CompanyDatatypes.$w$cgmapMo - :: forall (m_aY8 :: * -> *). - GHC.Base.Monad m_aY8 => - (forall a_a1nd. m_aY8 a_a1nd) - -> (forall a_a1nc. m_aY8 a_a1nc -> m_aY8 a_a1nc -> m_aY8 a_a1nc) - -> (forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - -> CompanyDatatypes.Company - -> m_aY8 CompanyDatatypes.Company -[GblId, - Arity=5, - Str=DmdType SLLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=5, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [20 0 60 60 20] 460 0}] -CompanyDatatypes.$w$cgmapMo = - \ (@ (m_aY8 :: * -> *)) - (ww_s2lE :: GHC.Base.Monad m_aY8) - (ww1_s2lF :: forall a_a1nd. m_aY8 a_a1nd) - (ww2_s2lG - :: forall a_a1nc. m_aY8 a_a1nc -> m_aY8 a_a1nc -> m_aY8 a_a1nc) - (w_s2lI - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w3_s2lJ :: CompanyDatatypes.Company) -> - case ww_s2lE - of _ { GHC.Base.D:Monad ww3_s2lu ww4_s2lv ww5_s2lw ww6_s2lx -> - ww3_s2lu - @ (CompanyDatatypes.Company, GHC.Types.Bool) - @ CompanyDatatypes.Company - (case w3_s2lJ of _ { CompanyDatatypes.C a22_aTo -> - let { - lvl11_s1FS :: m_aY8 [CompanyDatatypes.Dept] - [LclId, Str=DmdType] - lvl11_s1FS = - w_s2lI - @ [CompanyDatatypes.Dept] - CompanyDatatypes.$fDataCompany_$dData - a22_aTo } in - ww3_s2lu - @ ([CompanyDatatypes.Dept] -> CompanyDatatypes.Company, - GHC.Types.Bool) - @ (CompanyDatatypes.Company, GHC.Types.Bool) - (ww5_s2lw - @ ([CompanyDatatypes.Dept] -> CompanyDatatypes.Company, - GHC.Types.Bool) - CompanyDatatypes.$fDataCompany1) - (\ (ds1_a1mK - :: ([CompanyDatatypes.Dept] -> CompanyDatatypes.Company, - GHC.Types.Bool)) -> - case ds1_a1mK of _ { (h_a1mN, b_a1mO) -> - case b_a1mO of _ { - GHC.Types.False -> - ww2_s2lG - @ (CompanyDatatypes.Company, GHC.Types.Bool) - (ww3_s2lu - @ [CompanyDatatypes.Dept] - @ (CompanyDatatypes.Company, GHC.Types.Bool) - lvl11_s1FS - (\ (y'_a1mT :: [CompanyDatatypes.Dept]) -> - ww5_s2lw - @ (CompanyDatatypes.Company, GHC.Types.Bool) - (h_a1mN y'_a1mT, GHC.Types.True))) - (ww5_s2lw - @ (CompanyDatatypes.Company, GHC.Types.Bool) - (h_a1mN a22_aTo, GHC.Types.False)); - GHC.Types.True -> - ww5_s2lw - @ (CompanyDatatypes.Company, GHC.Types.Bool) - (h_a1mN a22_aTo, GHC.Types.True) - } - }) - }) - (\ (ds_a1n1 :: (CompanyDatatypes.Company, GHC.Types.Bool)) -> - case ds_a1n1 of _ { (x'_a1n4, b_a1n5) -> - case b_a1n5 of _ { - GHC.Types.False -> ww1_s2lF @ CompanyDatatypes.Company; - GHC.Types.True -> ww5_s2lw @ CompanyDatatypes.Company x'_a1n4 - } - }) - } - -CompanyDatatypes.$fDataCompany_$cgmapMo [InlPrag=INLINE[0]] - :: forall (m_aY8 :: * -> *). - Control.Monad.MonadPlus m_aY8 => - (forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - -> CompanyDatatypes.Company -> m_aY8 CompanyDatatypes.Company -[GblId, - Arity=3, - Str=DmdType U(SLL)LL, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapMo, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aY8 :: * -> *)) - (w_s2lC [Occ=Once!] :: Control.Monad.MonadPlus m_aY8) - (w3_s2lI [Occ=Once] - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w4_s2lJ [Occ=Once] :: CompanyDatatypes.Company) -> - case w_s2lC - of _ - { Control.Monad.D:MonadPlus ww_s2lE [Occ=Once] - ww1_s2lF [Occ=Once] - ww2_s2lG [Occ=Once] -> - CompanyDatatypes.$w$cgmapMo - @ m_aY8 ww_s2lE ww1_s2lF ww2_s2lG w3_s2lI w4_s2lJ - }}] -CompanyDatatypes.$fDataCompany_$cgmapMo = - \ (@ (m_aY8 :: * -> *)) - (w_s2lC :: Control.Monad.MonadPlus m_aY8) - (w3_s2lI - :: forall d_aY9. Data.Data.Data d_aY9 => d_aY9 -> m_aY8 d_aY9) - (w4_s2lJ :: CompanyDatatypes.Company) -> - case w_s2lC - of _ { Control.Monad.D:MonadPlus ww_s2lE ww1_s2lF ww2_s2lG -> - CompanyDatatypes.$w$cgmapMo - @ m_aY8 ww_s2lE ww1_s2lF ww2_s2lG w3_s2lI w4_s2lJ - } - -CompanyDatatypes.$w$cgmapMp5 - :: forall (m_aXe :: * -> *). - GHC.Base.Monad m_aXe => - (forall a_a1nd. m_aXe a_a1nd) - -> (forall a_a1nc. m_aXe a_a1nc -> m_aXe a_a1nc -> m_aXe a_a1nc) - -> (forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - -> CompanyDatatypes.Company - -> m_aXe CompanyDatatypes.Company -[GblId, - Arity=5, - Str=DmdType SLLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=5, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [20 0 60 60 20] 390 0}] -CompanyDatatypes.$w$cgmapMp5 = - \ (@ (m_aXe :: * -> *)) - (ww_s2lW :: GHC.Base.Monad m_aXe) - (ww1_s2lX :: forall a_a1nd. m_aXe a_a1nd) - (ww2_s2lY - :: forall a_a1nc. m_aXe a_a1nc -> m_aXe a_a1nc -> m_aXe a_a1nc) - (w_s2m0 - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w3_s2m1 :: CompanyDatatypes.Company) -> - case ww_s2lW - of _ { GHC.Base.D:Monad ww3_s2lM ww4_s2lN ww5_s2lO ww6_s2lP -> - ww3_s2lM - @ (CompanyDatatypes.Company, GHC.Types.Bool) - @ CompanyDatatypes.Company - (case w3_s2m1 of _ { CompanyDatatypes.C a22_aTo -> - let { - lvl11_s1FU [Dmd=Just L] :: m_aXe [CompanyDatatypes.Dept] - [LclId, Str=DmdType] - lvl11_s1FU = - w_s2m0 - @ [CompanyDatatypes.Dept] - CompanyDatatypes.$fDataCompany_$dData - a22_aTo } in - ww3_s2lM - @ ([CompanyDatatypes.Dept] -> CompanyDatatypes.Company, - GHC.Types.Bool) - @ (CompanyDatatypes.Company, GHC.Types.Bool) - (ww5_s2lO - @ ([CompanyDatatypes.Dept] -> CompanyDatatypes.Company, - GHC.Types.Bool) - CompanyDatatypes.$fDataCompany1) - (\ (ds1_a1nF - :: ([CompanyDatatypes.Dept] -> CompanyDatatypes.Company, - GHC.Types.Bool)) -> - case ds1_a1nF of _ { (h_a1nI, b_a1nJ) -> - ww2_s2lY - @ (CompanyDatatypes.Company, GHC.Types.Bool) - (ww3_s2lM - @ [CompanyDatatypes.Dept] - @ (CompanyDatatypes.Company, GHC.Types.Bool) - lvl11_s1FU - (\ (y'_a1nL :: [CompanyDatatypes.Dept]) -> - ww5_s2lO - @ (CompanyDatatypes.Company, GHC.Types.Bool) - (h_a1nI y'_a1nL, GHC.Types.True))) - (ww5_s2lO - @ (CompanyDatatypes.Company, GHC.Types.Bool) - (h_a1nI a22_aTo, b_a1nJ)) - }) - }) - (\ (ds_a1nR :: (CompanyDatatypes.Company, GHC.Types.Bool)) -> - case ds_a1nR of _ { (x'_a1nU, b_a1nV) -> - case b_a1nV of _ { - GHC.Types.False -> ww1_s2lX @ CompanyDatatypes.Company; - GHC.Types.True -> ww5_s2lO @ CompanyDatatypes.Company x'_a1nU - } - }) - } - -CompanyDatatypes.$fDataCompany_$cgmapMp [InlPrag=INLINE[0]] - :: forall (m_aXe :: * -> *). - Control.Monad.MonadPlus m_aXe => - (forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - -> CompanyDatatypes.Company -> m_aXe CompanyDatatypes.Company -[GblId, - Arity=3, - Str=DmdType U(SLL)LL, - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapMp5, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aXe :: * -> *)) - (w_s2lU [Occ=Once!] :: Control.Monad.MonadPlus m_aXe) - (w3_s2m0 [Occ=Once] - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w4_s2m1 [Occ=Once] :: CompanyDatatypes.Company) -> - case w_s2lU - of _ - { Control.Monad.D:MonadPlus ww_s2lW [Occ=Once] - ww1_s2lX [Occ=Once] - ww2_s2lY [Occ=Once] -> - CompanyDatatypes.$w$cgmapMp5 - @ m_aXe ww_s2lW ww1_s2lX ww2_s2lY w3_s2m0 w4_s2m1 - }}] -CompanyDatatypes.$fDataCompany_$cgmapMp = - \ (@ (m_aXe :: * -> *)) - (w_s2lU :: Control.Monad.MonadPlus m_aXe) - (w3_s2m0 - :: forall d_aY1. Data.Data.Data d_aY1 => d_aY1 -> m_aXe d_aY1) - (w4_s2m1 :: CompanyDatatypes.Company) -> - case w_s2lU - of _ { Control.Monad.D:MonadPlus ww_s2lW ww1_s2lX ww2_s2lY -> - CompanyDatatypes.$w$cgmapMp5 - @ m_aXe ww_s2lW ww1_s2lX ww2_s2lY w3_s2m0 w4_s2m1 - } - -CompanyDatatypes.$w$cgmapM5 - :: forall (m_aX4 :: * -> *). - (forall a_a1ne b_a1nf. - m_aX4 a_a1ne -> (a_a1ne -> m_aX4 b_a1nf) -> m_aX4 b_a1nf) - -> (forall a_a1ni. a_a1ni -> m_aX4 a_a1ni) - -> (forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - -> [CompanyDatatypes.Dept] - -> m_aX4 CompanyDatatypes.Company -[GblId, - Arity=4, - Str=DmdType SLLL, - Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=4, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=IF_ARGS [120 120 60 0] 180 0}] -CompanyDatatypes.$w$cgmapM5 = - \ (@ (m_aX4 :: * -> *)) - (ww_s2m8 - :: forall a_a1ne b_a1nf. - m_aX4 a_a1ne -> (a_a1ne -> m_aX4 b_a1nf) -> m_aX4 b_a1nf) - (ww1_s2ma :: forall a_a1ni. a_a1ni -> m_aX4 a_a1ni) - (w_s2md - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (ww2_s2mg :: [CompanyDatatypes.Dept]) -> - let { - lvl11_s1FV [Dmd=Just L] :: m_aX4 [CompanyDatatypes.Dept] - [LclId, Str=DmdType] - lvl11_s1FV = - w_s2md - @ [CompanyDatatypes.Dept] - CompanyDatatypes.$fDataCompany_$dData - ww2_s2mg } in - ww_s2m8 - @ ([CompanyDatatypes.Dept] -> CompanyDatatypes.Company) - @ CompanyDatatypes.Company - (ww1_s2ma - @ ([CompanyDatatypes.Dept] -> CompanyDatatypes.Company) - CompanyDatatypes.C) - (\ (c'_a1og - :: [CompanyDatatypes.Dept] -> CompanyDatatypes.Company) -> - ww_s2m8 - @ [CompanyDatatypes.Dept] - @ CompanyDatatypes.Company - lvl11_s1FV - (\ (x'_a1oh :: [CompanyDatatypes.Dept]) -> - ww1_s2ma @ CompanyDatatypes.Company (c'_a1og x'_a1oh))) - -CompanyDatatypes.$fDataCompany_$cgmapM [InlPrag=INLINE[0]] - :: forall (m_aX4 :: * -> *). - GHC.Base.Monad m_aX4 => - (forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - -> CompanyDatatypes.Company -> m_aX4 CompanyDatatypes.Company -[GblId, - Arity=3, - Str=DmdType U(SALA)LU(L), - Unf=Unf{Src=Worker=CompanyDatatypes.$w$cgmapM5, TopLvl=True, - Arity=3, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ (m_aX4 :: * -> *)) - (w_s2m6 [Occ=Once!] :: GHC.Base.Monad m_aX4) - (w3_s2md [Occ=Once] - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (w4_s2me [Occ=Once!] :: CompanyDatatypes.Company) -> - case w_s2m6 - of _ - { GHC.Base.D:Monad ww_s2m8 [Occ=Once] _ ww2_s2ma [Occ=Once] _ -> - case w4_s2me of _ { CompanyDatatypes.C ww4_s2mg [Occ=Once] -> - CompanyDatatypes.$w$cgmapM5 - @ m_aX4 ww_s2m8 ww2_s2ma w3_s2md ww4_s2mg - } - }}] -CompanyDatatypes.$fDataCompany_$cgmapM = - \ (@ (m_aX4 :: * -> *)) - (w_s2m6 :: GHC.Base.Monad m_aX4) - (w3_s2md - :: forall d_aX7. Data.Data.Data d_aX7 => d_aX7 -> m_aX4 d_aX7) - (w4_s2me :: CompanyDatatypes.Company) -> - case w_s2m6 - of _ { GHC.Base.D:Monad ww_s2m8 ww1_s2m9 ww2_s2ma ww3_s2mb -> - case w4_s2me of _ { CompanyDatatypes.C ww4_s2mg -> - CompanyDatatypes.$w$cgmapM5 - @ m_aX4 ww_s2m8 ww2_s2ma w3_s2md ww4_s2mg - } - } - -CompanyDatatypes.$fDataCompany_$cgmapQi - :: forall u_aWW. - GHC.Types.Int - -> (forall d_aWX. Data.Data.Data d_aWX => d_aWX -> u_aWW) - -> CompanyDatatypes.Company - -> u_aWW -[GblId, - Arity=3, - Str=DmdType U(L)C(C(S))U(L), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ u_a1ol) - (i_a1om [Occ=Once!] :: GHC.Types.Int) - (f_a1on [Occ=Once!] - :: forall d_a1oo. Data.Data.Data d_a1oo => d_a1oo -> u_a1ol) - (x_a1op [Occ=Once!] :: CompanyDatatypes.Company) -> - case x_a1op of _ { CompanyDatatypes.C a22_aTo [Occ=Once] -> - case i_a1om of _ { GHC.Types.I# x1_a1p2 [Occ=Once!] -> - case x1_a1p2 of _ { - __DEFAULT -> Data.Maybe.fromJust1 @ u_a1ol; - 0 -> - f_a1on - @ [CompanyDatatypes.Dept] - CompanyDatatypes.$fDataCompany_$dData - a22_aTo - } - } - }}] -CompanyDatatypes.$fDataCompany_$cgmapQi = - \ (@ u_a1ol) - (i_a1om :: GHC.Types.Int) - (f_a1on - :: forall d_a1oo. Data.Data.Data d_a1oo => d_a1oo -> u_a1ol) - (x_a1op :: CompanyDatatypes.Company) -> - case x_a1op of _ { CompanyDatatypes.C a22_aTo -> - case i_a1om of _ { GHC.Types.I# x1_a1p2 -> - case x1_a1p2 of _ { - __DEFAULT -> Data.Maybe.fromJust1 @ u_a1ol; - 0 -> - f_a1on - @ [CompanyDatatypes.Dept] - CompanyDatatypes.$fDataCompany_$dData - a22_aTo - } - } - } - -CompanyDatatypes.$fDataCompany_$cgmapQr - :: forall r_aWE r'_aWF. - (r'_aWF -> r_aWE -> r_aWE) - -> r_aWE - -> (forall d_aWG. Data.Data.Data d_aWG => d_aWG -> r'_aWF) - -> CompanyDatatypes.Company - -> r_aWE -[GblId, - Arity=4, - Str=DmdType C(C(S))LLU(L), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=4, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ r_a1pQ) - (@ r'_a1pR) - (o_a1pS [Occ=Once!] :: r'_a1pR -> r_a1pQ -> r_a1pQ) - (r0_a1pT [Occ=Once] :: r_a1pQ) - (f_a1pU [Occ=Once!] - :: forall d_a1pV. Data.Data.Data d_a1pV => d_a1pV -> r'_a1pR) - (x0_a1pW [Occ=Once!] :: CompanyDatatypes.Company) -> - case x0_a1pW of _ { CompanyDatatypes.C a22_aTo [Occ=Once] -> - o_a1pS - (f_a1pU - @ [CompanyDatatypes.Dept] - CompanyDatatypes.$fDataCompany_$dData - a22_aTo) - r0_a1pT - }}] -CompanyDatatypes.$fDataCompany_$cgmapQr = - \ (@ r_a1pQ) - (@ r'_a1pR) - (o_a1pS :: r'_a1pR -> r_a1pQ -> r_a1pQ) - (r0_a1pT :: r_a1pQ) - (f_a1pU - :: forall d_a1pV. Data.Data.Data d_a1pV => d_a1pV -> r'_a1pR) - (x0_a1pW :: CompanyDatatypes.Company) -> - case x0_a1pW of _ { CompanyDatatypes.C a22_aTo -> - o_a1pS - (f_a1pU - @ [CompanyDatatypes.Dept] - CompanyDatatypes.$fDataCompany_$dData - a22_aTo) - r0_a1pT - } - -CompanyDatatypes.$fDataCompany_$cgmapQ - :: forall u_aWO. - (forall d_aWP. Data.Data.Data d_aWP => d_aWP -> u_aWO) - -> CompanyDatatypes.Company -> [u_aWO] -[GblId, - Arity=2, - Str=DmdType LU(L), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ u_a1pL) - (f_a1pM [Occ=Once!] - :: forall d_a1pN. Data.Data.Data d_a1pN => d_a1pN -> u_a1pL) - (eta_XcE [Occ=Once!] :: CompanyDatatypes.Company) -> - case eta_XcE of _ { CompanyDatatypes.C a22_aTo [Occ=Once] -> - GHC.Types.: - @ u_a1pL - (f_a1pM - @ [CompanyDatatypes.Dept] - CompanyDatatypes.$fDataCompany_$dData - a22_aTo) - (GHC.Types.[] @ u_a1pL) - }}] -CompanyDatatypes.$fDataCompany_$cgmapQ = - \ (@ u_a1pL) - (f_a1pM - :: forall d_a1pN. Data.Data.Data d_a1pN => d_a1pN -> u_a1pL) - (eta_XcE :: CompanyDatatypes.Company) -> - case eta_XcE of _ { CompanyDatatypes.C a22_aTo -> - GHC.Types.: - @ u_a1pL - (f_a1pM - @ [CompanyDatatypes.Dept] - CompanyDatatypes.$fDataCompany_$dData - a22_aTo) - (GHC.Types.[] @ u_a1pL) - } - -CompanyDatatypes.$fDataCompany_$cgmapQl - :: forall r_aWu r'_aWv. - (r_aWu -> r'_aWv -> r_aWu) - -> r_aWu - -> (forall d_aWw. Data.Data.Data d_aWw => d_aWw -> r'_aWv) - -> CompanyDatatypes.Company - -> r_aWu -[GblId, - Arity=4, - Str=DmdType C(C(S))LLU(L), - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=4, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (@ r_X1D5) - (@ r'_X1D7) - (o_X1D9 [Occ=Once!] :: r_X1D5 -> r'_X1D7 -> r_X1D5) - (r_X1Db [Occ=Once] :: r_X1D5) - (f_X1Dd [Occ=Once!] - :: forall d_a1qy. Data.Data.Data d_a1qy => d_a1qy -> r'_X1D7) - (eta_XcI [Occ=Once!] :: CompanyDatatypes.Company) -> - case eta_XcI of _ { CompanyDatatypes.C a22_aTo [Occ=Once] -> - o_X1D9 - r_X1Db - (f_X1Dd - @ [CompanyDatatypes.Dept] - CompanyDatatypes.$fDataCompany_$dData - a22_aTo) - }}] -CompanyDatatypes.$fDataCompany_$cgmapQl = - \ (@ r_X1D5) - (@ r'_X1D7) - (o_X1D9 :: r_X1D5 -> r'_X1D7 -> r_X1D5) - (r_X1Db :: r_X1D5) - (f_X1Dd - :: forall d_a1qy. Data.Data.Data d_a1qy => d_a1qy -> r'_X1D7) - (eta_XcI :: CompanyDatatypes.Company) -> - case eta_XcI of _ { CompanyDatatypes.C a22_aTo -> - o_X1D9 - r_X1Db - (f_X1Dd - @ [CompanyDatatypes.Dept] - CompanyDatatypes.$fDataCompany_$dData - a22_aTo) - } - -CompanyDatatypes.$fDataCompany_$cgmapT - :: (forall b_aWo. Data.Data.Data b_aWo => b_aWo -> b_aWo) - -> CompanyDatatypes.Company -> CompanyDatatypes.Company -[GblId, - Arity=2, - Str=DmdType LU(L)m, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) - Tmpl= \ (f_X1DL [Occ=Once!] - :: forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8) - (x0_X1DO [Occ=Once!] :: CompanyDatatypes.Company) -> - case x0_X1DO of _ { CompanyDatatypes.C a22_aTo [Occ=Once] -> - CompanyDatatypes.C - (f_X1DL - @ [CompanyDatatypes.Dept] - CompanyDatatypes.$fDataCompany_$dData - a22_aTo) - }}] -CompanyDatatypes.$fDataCompany_$cgmapT = - \ (f_X1DL - :: forall b_a1r8. Data.Data.Data b_a1r8 => b_a1r8 -> b_a1r8) - (x0_X1DO :: CompanyDatatypes.Company) -> - case x0_X1DO of _ { CompanyDatatypes.C a22_aTo -> - CompanyDatatypes.C - (f_X1DL - @ [CompanyDatatypes.Dept] - CompanyDatatypes.$fDataCompany_$dData - a22_aTo) - } - -CompanyDatatypes.$fDataCompany_$cdataCast2 - :: forall (c_aWc :: * -> *) (t_aWd :: * -> * -> *). - Data.Typeable.Internal.Typeable2 t_aWd => - (forall d_aWe e_aWf. - (Data.Data.Data d_aWe, Data.Data.Data e_aWf) => - c_aWc (t_aWd d_aWe e_aWf)) - -> Data.Maybe.Maybe (c_aWc CompanyDatatypes.Company) -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType AA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ (@ (c_a1rt :: * -> *)) (@ (t_a1ru :: * -> * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rt CompanyDatatypes.Company)}] -CompanyDatatypes.$fDataCompany_$cdataCast2 = - \ (@ (c_a1rt :: * -> *)) (@ (t_a1ru :: * -> * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rt CompanyDatatypes.Company) - -CompanyDatatypes.$fDataCompany_$cdataCast1 - :: forall (c_aVp :: * -> *) (t_aVq :: * -> *). - Data.Typeable.Internal.Typeable1 t_aVq => - (forall d_aVr. Data.Data.Data d_aVr => c_aVp (t_aVq d_aVr)) - -> Data.Maybe.Maybe (c_aVp CompanyDatatypes.Company) -[GblId, - Arity=2, - Caf=NoCafRefs, - Str=DmdType AA, - Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True, - ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) - Tmpl= \ (@ (c_a1rB :: * -> *)) (@ (t_a1rC :: * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rB CompanyDatatypes.Company)}] -CompanyDatatypes.$fDataCompany_$cdataCast1 = - \ (@ (c_a1rB :: * -> *)) (@ (t_a1rC :: * -> *)) _ _ -> - Data.Maybe.Nothing @ (c_a1rB CompanyDatatypes.Company) - -CompanyDatatypes.$fDataCompany [InlPrag=[ALWAYS] CONLIKE] - :: Data.Data.Data CompanyDatatypes.Company -[GblId[DFunId], - Str=DmdType, - Unf=DFun(arity=0) Data.Data.D:Data [{CompanyDatatypes.$fTypeableCompany}, - {CompanyDatatypes.$fDataCompany_$cgfoldl}, - {CompanyDatatypes.$fDataCompany_$cgunfold}, - {CompanyDatatypes.$fDataCompany_$ctoConstr}, - {CompanyDatatypes.$fDataCompany_$cdataTypeOf}, - {CompanyDatatypes.$fDataCompany_$cdataCast1}, - {CompanyDatatypes.$fDataCompany_$cdataCast2}, - {CompanyDatatypes.$fDataCompany_$cgmapT}, - {CompanyDatatypes.$fDataCompany_$cgmapQl}, - {CompanyDatatypes.$fDataCompany_$cgmapQr}, - {CompanyDatatypes.$fDataCompany_$cgmapQ}, - {CompanyDatatypes.$fDataCompany_$cgmapQi}, - {CompanyDatatypes.$fDataCompany_$cgmapM}, - {CompanyDatatypes.$fDataCompany_$cgmapMp}, - {CompanyDatatypes.$fDataCompany_$cgmapMo}]] -CompanyDatatypes.$fDataCompany = - Data.Data.D:Data - @ CompanyDatatypes.Company - (CompanyDatatypes.$fTypeableCompany_$ctypeOf - `cast` (Sym - <(Data.Typeable.Internal.NTCo:Typeable <CompanyDatatypes.Company>)> - :: (CompanyDatatypes.Company -> Data.Typeable.Internal.TypeRep) - ~# - Data.Typeable.Internal.Typeable CompanyDatatypes.Company)) - CompanyDatatypes.$fDataCompany_$cgfoldl - CompanyDatatypes.$fDataCompany_$cgunfold - CompanyDatatypes.$fDataCompany_$ctoConstr - CompanyDatatypes.$fDataCompany_$cdataTypeOf - CompanyDatatypes.$fDataCompany_$cdataCast1 - CompanyDatatypes.$fDataCompany_$cdataCast2 - CompanyDatatypes.$fDataCompany_$cgmapT - CompanyDatatypes.$fDataCompany_$cgmapQl - CompanyDatatypes.$fDataCompany_$cgmapQr - CompanyDatatypes.$fDataCompany_$cgmapQ - CompanyDatatypes.$fDataCompany_$cgmapQi - CompanyDatatypes.$fDataCompany_$cgmapM - CompanyDatatypes.$fDataCompany_$cgmapMp - CompanyDatatypes.$fDataCompany_$cgmapMo - - -