Skip to content

Commit

Permalink
more cleanup; comment out some of traces to avoid spamming everyone
Browse files Browse the repository at this point in the history
  • Loading branch information
ym-han committed Oct 8, 2023
1 parent d54e5ac commit 5d612e0
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions lib/haskell/natural4/src/LS/XPile/ExportTypes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,10 @@ import LS.Rule as SFL4
)
import LS.Types as SFL4
(
-- BoolStructR,
-- HornClause2,
MTExpr (..),
-- ParamText,
ParamType (TList1, TOne),
TypeSig (..),
-- mt2text,
mtexpr2text,
RuleName
)
Expand Down Expand Up @@ -235,18 +232,18 @@ instance ShowTypesHaskell FieldType where

instance ShowTypesHaskell Field where
showTypesHaskell f@(Field fn ft) =

Check warning on line 234 in lib/haskell/natural4/src/LS/XPile/ExportTypes.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Defined but not used: ‘f’

Check warning on line 234 in lib/haskell/natural4/src/LS/XPile/ExportTypes.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Defined but not used: ‘f’

Check warning on line 234 in lib/haskell/natural4/src/LS/XPile/ExportTypes.hs

View workflow job for this annotation

GitHub Actions / build (macos-11)

Defined but not used: ‘f’

Check warning on line 234 in lib/haskell/natural4/src/LS/XPile/ExportTypes.hs

View workflow job for this annotation

GitHub Actions / build (macos-11)

Defined but not used: ‘f’

Check warning on line 234 in lib/haskell/natural4/src/LS/XPile/ExportTypes.hs

View workflow job for this annotation

GitHub Actions / build (macos-12)

Defined but not used: ‘f’

Check warning on line 234 in lib/haskell/natural4/src/LS/XPile/ExportTypes.hs

View workflow job for this annotation

GitHub Actions / build (macos-12)

Defined but not used: ‘f’
trace ("Field: " ++ (show f) ) $
-- trace ("Field: " ++ (show f) ) $
pretty (hFieldName fn) <> pretty " :: " <> showTypesHaskell ft

instance ShowTypesHaskell JSchemaExp where
showTypesHaskell :: JSchemaExp -> Doc ann
showTypesHaskell (ExpTypeRecord tn fds) =
trace ("Record: " ++ (show tn) ++ (show (hTypeName tn))) $
-- trace ("Record: " ++ (show tn) ++ (show (hTypeName tn))) $
pretty "data " <> pretty (hTypeName tn) <> pretty " = " <> pretty (hTypeNameAsConstructorName tn) <>
nest 4 (braces (vsep (punctuate comma (map showTypesHaskell fds))))

showTypesHaskell (ExpTypeEnum tn enums) =
trace ("Enum: " ++ (show tn) ++ (show (hTypeName tn))) $
-- trace ("Enum: " ++ (show tn) ++ (show (hTypeName tn))) $
pretty "data " <> pretty (hTypeName tn) <>
nest 4
(pretty " = " <>
Expand Down Expand Up @@ -376,9 +373,6 @@ showRequireds fds =
showRef :: TypeName -> Doc ann
showRef n = [__di| "$ref": "#{defsLocation n}"|]

-- bracketArgs :: Pretty a => [a] -> Doc ann
-- bracketArgs = brackets . hsep . punctuate comma . map (dquotes . pretty)


-- Due to limitations of the JSON Form Web UI builder,
-- single references are not represented as single objects,
Expand Down

0 comments on commit 5d612e0

Please sign in to comment.