Skip to content

Eliminate use of unrefined types to simplify API appearance - #6

Open
tel wants to merge 2 commits into
masterfrom
feat-no-unrefined-types
Open

Eliminate use of unrefined types to simplify API appearance#6
tel wants to merge 2 commits into
masterfrom
feat-no-unrefined-types

Conversation

@tel

@teltel commented Jan 31, 2016

Copy link
Copy Markdown
Owner

Right now the Api type is ugly as all hell

data Api nat symbol star where ...

What is that? nat symbol star? Ugly! Confusing!

We can eliminate (probably?) the uses of nat and symbol if we never actually use unrefined types (see here) though I'm not yet sure how. This will reduce the type noise to just Api star which is easier to explain and less noisy. This is a big improvement!

@tel
telforce-pushed the feat-no-unrefined-types branch from c16d3bd to da22b15CompareJanuary 31, 2016 01:00
@tel

tel commented Jan 31, 2016

Copy link
Copy Markdown
OwnerAuthor

These instances are a bit broken by this change:

instanceHeaderEncode 'AccessControlAllowHeaders (Set (HeaderTypeText)) where
headerEncode _ = displaySetOpt .Set.map headerName
instanceHeaderEncode 'AccessControlAllowHeaders [HeaderTypeText] where
headerEncode = uniqueSet

@tel

tel commented Feb 5, 2016

Copy link
Copy Markdown
OwnerAuthor

I could probably replace those with something like Set SomeHeader for SomeHeader = exists (h :: HeaderType Symbol) . Sing h. That's a possible way forward!

@teltel added this to the Public 1.0.0 milestone Feb 8, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@tel