Skip to content

Commit

Permalink
Term.hs: move Head directly under Term. #148
Browse files Browse the repository at this point in the history
  • Loading branch information
epost committed Aug 22, 2019
1 parent 7e31026 commit 272aaa8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/Language/CQL/Term.hs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ data Term var ty sym en fk att gen sk
-- | Skolem term or labelled null; like a generator for a type rather than an entity.
| Sk sk

-- | A symbol (non-variable).
data Head ty sym en fk att gen sk
= HSym sym
| HFk fk
| HAtt att
| HGen gen
| HSk sk
deriving (Eq, Ord)

instance TyMap NFData '[var, ty, sym, en, fk, att, gen, sk] =>
NFData (Term var ty sym en fk att gen sk) where
rnf x = case x of
Expand Down Expand Up @@ -109,15 +118,6 @@ show' = dropQuotes . show

deriving instance TyMap Ord '[var, ty, sym, en, fk, att, gen, sk] => Ord (Term var ty sym en fk att gen sk)

-- | A symbol (non-variable).
data Head ty sym en fk att gen sk
= HSym sym
| HFk fk
| HAtt att
| HGen gen
| HSk sk
deriving (Eq, Ord)

instance (Show ty, Show sym, Show en, Show fk, Show att, Show gen, Show sk)
=> Show (Head ty sym en fk att gen sk) where
show x = case x of
Expand Down

0 comments on commit 272aaa8

Please sign in to comment.