Skip to content

Commit

Permalink
Sort record types by field name in another place; solves another
Browse files Browse the repository at this point in the history
manifestation of issue #702.
  • Loading branch information
robdockins committed Apr 18, 2020
1 parent 194d02d commit ea1f206
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Cryptol/Symbolic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ import Cryptol.Utils.PP

import Prelude ()
import Prelude.Compat
import Data.List(sortBy)
import Data.Ord(comparing)

import Data.Time (NominalDiffTime)

Expand Down Expand Up @@ -123,7 +125,7 @@ finType ty =
TVIntMod n -> Just (FTIntMod n)
TVSeq n t -> FTSeq <$> numType n <*> finType t
TVTuple ts -> FTTuple <$> traverse finType ts
TVRec fields -> FTRecord <$> traverse (traverseSnd finType) fields
TVRec fields -> FTRecord <$> traverse (traverseSnd finType) (sortBy (comparing fst) fields)
TVAbstract {} -> Nothing
_ -> Nothing

Expand Down

0 comments on commit ea1f206

Please sign in to comment.