To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit e78c6342 authored by nathyong's avatar nathyong
Browse files

Add HasName instance for Definition

parent da964c5f
......@@ -115,6 +115,17 @@ data Definition
instance Binary Definition
instance HasName Definition where
nameOf defn = case defn of
TypeDefinition name _ -> nameOf name
SignatureDefinition name _ _ -> nameOf name
FunctionDefinition name _ _ _ _ -> nameOf name
Constant name _ _ -> nameOf name
GlobalCell name _ -> nameOf name
ExposedFunction name _ _ _ -> nameOf name
toName = Name . nameOf
data ConstConstructor = IntCtor Integer
| FloatCtor Rational
| ListCtor [ConstConstructor]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment