Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
haddock
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Glasgow Haskell Compiler
haddock
Commits
e2731b07
Commit
e2731b07
authored
4 years ago
by
Alex Biehl
Committed by
Alex Biehl
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Also make TyLit deterministic
parent
879d1fe2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
haddock-api/src/Haddock/Interface/AttachInstances.hs
+5
-2
5 additions, 2 deletions
haddock-api/src/Haddock/Interface/AttachInstances.hs
with
5 additions
and
2 deletions
haddock-api/src/Haddock/Interface/AttachInstances.hs
+
5
−
2
View file @
e2731b07
...
...
@@ -28,6 +28,7 @@ import Data.Maybe ( maybeToList, mapMaybe, fromMaybe )
import
qualified
Data.Map
as
Map
import
qualified
Data.Set
as
Set
import
GHC.Data.FastString
(
unpackFS
)
import
GHC.Core.Class
import
GHC.Driver.Session
import
GHC.Core
(
isOrphan
)
...
...
@@ -194,7 +195,8 @@ instance Ord SName where
-- For the benefit of the user (looks nice and predictable) and the
-- tests (which prefer output to be deterministic).
data
SimpleType
=
SimpleType
SName
[
SimpleType
]
|
SimpleTyLit
TyLit
|
SimpleIntTyLit
Integer
|
SimpleStringTyLit
String
deriving
(
Eq
,
Ord
)
...
...
@@ -218,7 +220,8 @@ simplify (AppTy t1 t2) = SimpleType s (ts ++ maybeToList (simplify_maybe t2))
simplify
(
TyVarTy
v
)
=
SimpleType
(
SName
(
tyVarName
v
))
[]
simplify
(
TyConApp
tc
ts
)
=
SimpleType
(
SName
(
tyConName
tc
))
(
mapMaybe
simplify_maybe
ts
)
simplify
(
LitTy
l
)
=
SimpleTyLit
l
simplify
(
LitTy
(
NumTyLit
n
))
=
SimpleIntTyLit
n
simplify
(
LitTy
(
StrTyLit
s
))
=
SimpleStringTyLit
(
unpackFS
s
)
simplify
(
CastTy
ty
_
)
=
simplify
ty
simplify
(
CoercionTy
_
)
=
error
"simplify:Coercion"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment