Skip to content

Commit

Permalink
Fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
spl committed Nov 1, 2010
1 parent d76147d commit a82ab3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 5 additions & 4 deletions examples/Ex02AddingDatatypeSupport.hs
Expand Up @@ -25,8 +25,8 @@

module Ex02AddingDatatypeSupport where

import Generics.EMGM.Derive
import qualified Generics.EMGM.Functions as G
import qualified Generics.EMGM as G
import Generics.EMGM.Base

-- Using generic functions on your own datatypes

Expand All @@ -46,11 +46,12 @@ epTree = EP from' to' where
conLeaf, conBranch :: ConDescr
conLeaf = ConDescr {
conName = "Leaf",
conArity = 1, conLabels = [], conFixity = Nonfix
conArity = 1, conRecord = False, conFixity = Prefix
}

conBranch = ConDescr {
conName = "Branch",
conArity = 2, conLabels = [], conFixity = Nonfix
conArity = 2, conRecord = False, conFixity = Prefix
}

-- More structural definition:
Expand Down
1 change: 0 additions & 1 deletion examples/Ex03DefiningFunctions.hs
Expand Up @@ -28,7 +28,6 @@ newtype Empty a = Empty { selEmpty :: a }

-- Instance of Generic
instance Generic Empty where
rconstant = error "Unreachable"
rint = Empty 0
rinteger = Empty 0
rfloat = Empty 0
Expand Down

0 comments on commit a82ab3a

Please sign in to comment.